@@ -108,8 +108,8 @@ void SpecializedSolver::get_best_left_right_scores(const Dataview& dataview, int
108108 left_optimal_dt->make_leaf (left_tree.max_label , left_tree.size - left_tree.classification_score );
109109 } else {
110110 left_optimal_dt->update_split (left_tree.best_feature_index , left_tree.best_threshold , std::make_shared<Tree>(left_tree.best_left_label , -1 ), std::make_shared<Tree>(left_tree.best_right_label , -1 ));
111- RUNTIME_ASSERT (left_tree.best_left_label != -1 , " Left tree left label should be initialized." );
112- RUNTIME_ASSERT (left_tree.best_right_label != -1 , " Left tree right label should be initialized." );
111+ // RUNTIME_ASSERT(left_tree.best_left_label != -1, "Left tree left label should be initialized.");
112+ // RUNTIME_ASSERT(left_tree.best_right_label != -1, "Left tree right label should be initialized.");
113113 }
114114 left_optimal_dt->misclassification_score = left_tree.size - left_tree.classification_score ;
115115 RUNTIME_ASSERT (left_optimal_dt->misclassification_score >= 0 , " LR - Left tree misclassification score should be non-negative." );
@@ -118,8 +118,8 @@ void SpecializedSolver::get_best_left_right_scores(const Dataview& dataview, int
118118 right_optimal_dt->make_leaf (right_tree.max_label , right_tree.size - right_tree.classification_score );
119119 } else {
120120 right_optimal_dt->update_split (right_tree.best_feature_index , right_tree.best_threshold , std::make_shared<Tree>(right_tree.best_left_label , -1 ), std::make_shared<Tree>(right_tree.best_right_label , -1 ));
121- RUNTIME_ASSERT (right_tree.best_left_label != -1 , " Right tree left label should be initialized." );
122- RUNTIME_ASSERT (right_tree.best_right_label != -1 , " Right tree right label should be initialized." );
121+ // RUNTIME_ASSERT(right_tree.best_left_label != -1, "Right tree left label should be initialized.");
122+ // RUNTIME_ASSERT(right_tree.best_right_label != -1, "Right tree right label should be initialized.");
123123 }
124124 right_optimal_dt->misclassification_score = right_tree.size - right_tree.classification_score ;
125125 RUNTIME_ASSERT (right_optimal_dt->misclassification_score >= 0 , " LR - Right tree misclassification score should be non-negative." );
@@ -133,7 +133,6 @@ void SpecializedSolver::process_depth_one_feature(const Dataview& dataview,
133133 const std::vector<Dataset::FeatureElement>& current_feature = dataview.get_sorted_dataset_feature (current_feature_index);
134134 const int class_number = dataview.get_class_number ();
135135 const int dataset_size = dataview.get_dataset_size ();
136- int global_skip = 0 ;
137136
138137 left_tree.reset_label_frequency ();
139138 right_tree.reset_label_frequency ();
@@ -156,10 +155,9 @@ void SpecializedSolver::process_depth_one_feature(const Dataview& dataview,
156155 continue ;
157156 }
158157
159- global_skip--;
160158 tree.can_skip --;
161159
162- if (current_feature_data.unique_value_index == tree.previous_unique_value_index || tree.can_skip > 0 || global_skip > 0 ) {
160+ if (current_feature_data.unique_value_index == tree.previous_unique_value_index || tree.can_skip > 0 ) {
163161 tree.current_element_count ++;
164162 tree.current_label_frequency [current_feature_data.label ]++;
165163 tree.previous_value = current_feature_data.value ;
@@ -196,7 +194,6 @@ void SpecializedSolver::process_depth_one_feature(const Dataview& dataview,
196194 tree.best_right_label = right_label;
197195 } else {
198196 tree.can_skip = tree.classification_score - (left_classification_score + right_classification_score);
199- global_skip = std::max (global_skip, upper_bound - (dataset_size - left_tree.classification_score - right_tree.classification_score ));
200197 }
201198
202199 int remaining_size = tree.size - tree.current_element_count ;
0 commit comments