Skip to content

Commit

Permalink
fix intercept always resetting to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Kieran Elmes committed Mar 27, 2022
1 parent 6a888b6 commit 9e60784
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/regression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void check_beta_order(robin_hood::unordered_flat_map<int_fast64_t, float>* beta,
}

float update_intercept(float *rowsum, float *Y, int n, float lambda, float intercept) {
float sumn = 0.0;
float sumn = intercept*n;
for (int i = 0; i < n; i++) {
sumn -= rowsum[i];
}
Expand Down

0 comments on commit 9e60784

Please sign in to comment.