ValueError: IsolationForest should either be a classifier to be used with response_method=decision_function or the response_method should be 'predict'. Got a regressor with response_method=decision_function instead.
I did find a solution by changing 'scoring="roc_auc"' to 'scoring=roc_auc_fixed' where 'roc_auc_fixed' is a variable declared as follows:
At the start of the experiments:
From 'In [4]:'
and 'In [5]:'
Both failed with the following error:
ValueError: IsolationForest should either be a classifier to be used with response_method=decision_function or the response_method should be 'predict'. Got a regressor with response_method=decision_function instead.
I did find a solution by changing 'scoring="roc_auc"' to 'scoring=roc_auc_fixed' where 'roc_auc_fixed' is a variable declared as follows:
roc_auc_fixed = make_scorer(roc_auc_score, response_method="predict")
Looking at the class declaration and wondering if it should use the following:
class IsolationForest(OutlierMixin, BaseEstimator):
or
class IsolationForest(ClassifierMixin, BaseEstimator):
instead of
class IsolationForest(BaseEstimator):
Using PyCharm (Pro) as IDE. Just running in standard 'console' mode (i.e., not using any notebooks)
Version: