Skip to content

Commit 22bed15

Browse files
fixed handling of variables with one unique value
1 parent f8c7cdd commit 22bed15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/APLRRegressor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,11 @@ void APLRRegressor::initialize()
288288
{
289289
bool term_has_one_unique_value{check_if_base_term_has_only_one_unique_value(i)};
290290
Term copy_of_base_term{Term(i)};
291+
add_term_to_terms_eligible_current(copy_of_base_term);
291292
if(term_has_one_unique_value)
292293
{
293-
copy_of_base_term.ineligible_boosting_steps=std::numeric_limits<size_t>::max();
294+
terms_eligible_current[terms_eligible_current.size()-1].ineligible_boosting_steps=std::numeric_limits<size_t>::max();
294295
}
295-
add_term_to_terms_eligible_current(copy_of_base_term);
296296
}
297297

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

0 commit comments

Comments
 (0)