File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -767,10 +767,8 @@ void APLRRegressor::select_the_best_term_and_update_errors(size_t boosting_step)
767767 }
768768
769769 // Updating current predictions
770- VectorXd values{terms_eligible_current[best_term].calculate (X_train)};
771- VectorXd values_validation{terms_eligible_current[best_term].calculate (X_validation)};
772- linear_predictor_update=values*terms_eligible_current[best_term].coefficient ;
773- linear_predictor_update_validation=values_validation*terms_eligible_current[best_term].coefficient ;
770+ linear_predictor_update=terms_eligible_current[best_term].calculate_contribution_to_linear_predictor (X_train);
771+ linear_predictor_update_validation=terms_eligible_current[best_term].calculate_contribution_to_linear_predictor (X_validation);
774772 double error_after_updating_term=calculate_sum_error (calculate_errors (neg_gradient_current,linear_predictor_update,sample_weight_train));
775773 bool no_improvement{std::isgreaterequal (error_after_updating_term,neg_gradient_nullmodel_errors_sum)};
776774 if (no_improvement)
You can’t perform that action at this time.
0 commit comments