Skip to content
Snippets Groups Projects

Resolve "integration-sota"

Merged Charly Lamothe requested to merge 15-integration-sota into master
1 file
+ 3
0
Compare changes
  • Side-by-side
  • Inline
@@ -30,6 +30,8 @@ class EnsembleSelectionForest(ForestPruningSOTA, metaclass=ABCMeta):
mean_so_far = val_predictions[idx_best_score]
while nb_selected_trees < self._extracted_forest_size:
# every new tree is selected with replacement as specified in the base paper
# this matrix contains at each line the predictions of the previous subset + the corresponding tree of the line
# mean update formula: u_{t+1} = (n_t * u_t + x_t) / (n_t + 1)
mean_prediction_subset_with_extra_tree = (nb_selected_trees * mean_so_far + val_predictions) / (nb_selected_trees + 1)
predictions_subset_with_extra_tree = self._activation(mean_prediction_subset_with_extra_tree)
@@ -37,6 +39,7 @@ class EnsembleSelectionForest(ForestPruningSOTA, metaclass=ABCMeta):
idx_best_extra_tree = self._best_score_idx(scores_subset_with_extra_tree)
lst_pruned_forest.append(self._base_estimator.estimators_[idx_best_extra_tree])
# update new mean prediction
mean_so_far = mean_prediction_subset_with_extra_tree[idx_best_extra_tree]
nb_selected_trees += 1
Loading