Skip to content

Commit e69aad9

Browse files
wip
1 parent 7b99a27 commit e69aad9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cpp/APLRRegressor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2702,6 +2702,8 @@ void APLRRegressor::set_intercept(double value)
27022702
{
27032703
if (model_has_not_been_trained())
27042704
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.");
27052707
intercept = value;
27062708
term_coefficients[0] = value;
27072709
}

0 commit comments

Comments
 (0)