Skip to content

Commit 7b99a27

Browse files
wip
1 parent 07fdd7a commit 7b99a27

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
@@ -2700,6 +2700,8 @@ double APLRRegressor::get_cv_error()
27002700

27012701
void APLRRegressor::set_intercept(double value)
27022702
{
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.");
27032705
intercept = value;
27042706
term_coefficients[0] = value;
27052707
}

0 commit comments

Comments
 (0)