We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b99a27 commit e69aad9Copy full SHA for e69aad9
cpp/APLRRegressor.h
@@ -2702,6 +2702,8 @@ void APLRRegressor::set_intercept(double value)
2702
{
2703
if (model_has_not_been_trained())
2704
throw std::runtime_error("The model must be trained with fit() before set_intercept() can be run.");
2705
+ if (!std::isfinite(value))
2706
+ throw std::runtime_error("The updated intercept must be finite.");
2707
intercept = value;
2708
term_coefficients[0] = value;
2709
}
0 commit comments