Skip to content

Commit 1f39304

Browse files
bugfix wip
1 parent ce459bd commit 1f39304

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cpp/APLRRegressor.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,12 @@ void APLRRegressor::initialize()
287287
for (size_t i = 0; i < static_cast<size_t>(X_train.cols()); ++i)
288288
{
289289
bool term_has_one_unique_value{check_if_base_term_has_only_one_unique_value(i)};
290-
if(!term_has_one_unique_value)
290+
Term copy_of_base_term{Term(i)};
291+
if(term_has_one_unique_value)
291292
{
292-
Term copy_of_base_term{Term(i)};
293-
add_term_to_terms_eligible_current(copy_of_base_term);
293+
copy_of_base_term.ineligible_boosting_steps=std::numeric_limits<size_t>::max();
294294
}
295+
add_term_to_terms_eligible_current(copy_of_base_term);
295296
}
296297

297298
predictions_current=VectorXd::Constant(y_train.size(),0);

0 commit comments

Comments
 (0)