[SYSTEMML-2071] Fix stepwise linregDS script (incorrect indexing range) The recent modification of all operations to support large-dense blocks in SYSTEMML-2046 also improved the left indexing error handling for cases where the rhs matrix is smaller than the specified left indexing range. For this reason, stepwise linear regression DS currently fails with left indexing issues. This patch makes the necessary script modifications of two relevant indexing expressions.
Project: http://git-wip-us.apache.org/repos/asf/systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/f6c12dda Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/f6c12dda Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/f6c12dda Branch: refs/heads/master Commit: f6c12dda62fcbbb71c37a24856d16b1a3a543b00 Parents: 98595c5 Author: Matthias Boehm <[email protected]> Authored: Sat Jan 13 17:51:42 2018 -0800 Committer: Matthias Boehm <[email protected]> Committed: Sat Jan 13 17:52:44 2018 -0800 ---------------------------------------------------------------------- scripts/algorithms/StepLinearRegDS.dml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/systemml/blob/f6c12dda/scripts/algorithms/StepLinearRegDS.dml ---------------------------------------------------------------------- diff --git a/scripts/algorithms/StepLinearRegDS.dml b/scripts/algorithms/StepLinearRegDS.dml index 05f4b26..a86bcbb 100644 --- a/scripts/algorithms/StepLinearRegDS.dml +++ b/scripts/algorithms/StepLinearRegDS.dml @@ -137,7 +137,7 @@ if (dir == "forward") { AICs[1, i] = AIC_1; - beta_out_all[, (i - 1) * y_ncol + 1 : i * y_ncol] = beta_out_i[, 1:1]; + beta_out_all[1:nrow(beta_out_i), (i - 1) * y_ncol + 1 : i * y_ncol] = beta_out_i[, 1:1]; } @@ -192,7 +192,7 @@ if (dir == "forward") { tmp[1, 1] = i; columns_fixed_ordered_2 = append(columns_fixed_ordered, tmp ) [AIC_2, beta_out_i] = linear_regression (X, y, m_orig, columns_fixed_ordered_2, write_beta, 0); - beta_out_all_2[, (i - 1) * y_ncol + 1 : i * y_ncol] = beta_out_i[,1:1]; + beta_out_all_2[1:nrow(beta_out_i), (i - 1) * y_ncol + 1 : i * y_ncol] = beta_out_i[,1:1]; AICs[1, i] = AIC_2; }
