Skip to content
Snippets Groups Projects

Resolve "integration-sota"

Merged Charly Lamothe requested to merge 15-integration-sota into master
4 files
+ 16
26
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -41,7 +41,7 @@ class OmpForest(BaseEstimator, metaclass=ABCMeta):
# print(set([type(y) for y in y_forest]))
self._base_forest_estimator.fit(X_forest, y_forest)
self._extract_subforest(X_omp,
self.predict_base_estimator(X_forest) if use_distillation else y_omp) # type: OrthogonalMatchingPursuit
self.predict_base_estimator(X_omp) if use_distillation else y_omp) # type: OrthogonalMatchingPursuit
return self
def _extract_subforest(self, X, y):
@@ -153,11 +153,6 @@ class SingleOmpForest(OmpForest):
"""
forest_predictions = np.array([tree.predict(X) for tree in self._base_forest_estimator.estimators_])
if self._models_parameters.normalize_D:
forest_predictions = forest_predictions.T
forest_predictions /= self._forest_norms
forest_predictions = forest_predictions.T
weights = self._omp.coef_
select_trees = np.mean(forest_predictions[weights != 0], axis=0)
return select_trees
Loading