Skip to content
Snippets Groups Projects

Resolve "integration-sota"

Merged Charly Lamothe requested to merge 15-integration-sota into master
1 file
+ 4
2
Compare changes
  • Side-by-side
  • Inline
+ 4
2
@@ -154,10 +154,12 @@ class Trainer(object):
@@ -154,10 +154,12 @@ class Trainer(object):
return result
return result
def _evaluate_predictions(self, model, X, aggregation_function):
def _evaluate_predictions(self, model, X, aggregation_function):
if type(model) in [OmpForestRegressor, SimilarityForestRegressor, KMeansForestRegressor, EnsembleSelectionForestRegressor,
if type(model) in [OmpForestRegressor, OmpForestBinaryClassifier, OmpForestMulticlassClassifier]:
OmpForestBinaryClassifier, OmpForestMulticlassClassifier, SimilarityForestClassifier, KMeansForestClassifier, EnsembleSelectionForestClassifier]:
estimators = model.forest
estimators = model.forest
estimators = np.asarray(estimators)[model._omp.coef_ != 0]
estimators = np.asarray(estimators)[model._omp.coef_ != 0]
 
elif type(model) in [SimilarityForestRegressor, KMeansForestRegressor, EnsembleSelectionForestRegressor,
 
SimilarityForestClassifier, KMeansForestClassifier, EnsembleSelectionForestClassifier]:
 
estimators = model.selected_trees
elif type(model) in [RandomForestRegressor, RandomForestClassifier]:
elif type(model) in [RandomForestRegressor, RandomForestClassifier]:
estimators = model.estimators_
estimators = model.estimators_
Loading