Skip to content
Snippets Groups Projects
Commit c8241d19 authored by mkirsz's avatar mkirsz
Browse files

Fix

parent e449d567
No related branches found
No related tags found
No related merge requests found
Pipeline #51652 passed
...@@ -36,6 +36,7 @@ class LinearRegressor { ...@@ -36,6 +36,7 @@ class LinearRegressor {
int verbose = config.get<int>("VERBOSE"); int verbose = config.get<int>("VERBOSE");
double lambda = config.get<double>("LAMBDA"); double lambda = config.get<double>("LAMBDA");
double rcond = config.size("LAMBDA")==2 ? config.get<double>("LAMBDA",1) : 1e-8; double rcond = config.size("LAMBDA")==2 ? config.get<double>("LAMBDA",1) : 1e-8;
weights.resize(Phi.cols());
if (lambda == 0) { if (lambda == 0) {
OLS::solve(Phi, T, weights, rcond, OLS::Algorithm::GELSD); OLS::solve(Phi, T, weights, rcond, OLS::Algorithm::GELSD);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment