File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -706,14 +706,11 @@ void APLRRegressor::determine_interactions_to_consider(const std::vector<size_t>
706706 {
707707 Term interaction{Term (new_term_index)};
708708 Term model_term_without_given_terms{terms[model_term_index]};
709- bool model_term_has_given_terms{terms[model_term_index].given_terms .size ()>0 };
710- if (model_term_has_given_terms)
711- {
712- model_term_without_given_terms.given_terms .clear ();
713- add_necessary_given_terms_to_interaction (interaction, terms[model_term_index]);
714- }
709+ model_term_without_given_terms.given_terms .clear ();
715710 model_term_without_given_terms.cleanup_when_this_term_was_added_as_a_given_term ();
716- interaction.given_terms .push_back (model_term_without_given_terms);
711+ Term model_term_with_added_given_term{terms[model_term_index]};
712+ model_term_with_added_given_term.given_terms .push_back (model_term_without_given_terms);
713+ add_necessary_given_terms_to_interaction (interaction, model_term_with_added_given_term);
717714 bool interaction_level_is_too_high{interaction.get_interaction_level ()>max_interaction_level};
718715 if (interaction_level_is_too_high) continue ;
719716 bool interaction_is_already_in_the_model{false };
You can’t perform that action at this time.
0 commit comments