Skip to content

Commit

Permalink
Utiliy removed from linear_regression_main.cpp line 167
Browse files Browse the repository at this point in the history
  • Loading branch information
lumi232 committed Feb 27, 2024
1 parent 43c49a2 commit 9ecf0aa
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/mlpack/methods/linear_regression/linear_regression_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,12 @@ void BINDING_FUNCTION(util::Params& params, util::Timers& timer)
timer.Start("load_responses");
responses = params.Get<rowvec>("training_responses");
timer.Stop("load_responses");

// Use the utility to check if regressors and responses have the same number of columns
util::CheckSameSizes(regressors, responses, "Linear Regression",
"responses", false, true);

if (responses.n_cols != regressors.n_cols)
{
Log::Fatal << "The responses must have the same number of columns "
"as the training set." << endl;
}
}

timer.Start("regression");
Expand Down

0 comments on commit 9ecf0aa

Please sign in to comment.