-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
IsolationForest(max_features=0.8).predict(X) fails input validation #5732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
ping @ngoix
|
Yes we can't apply The original Isolation Forest algorithm does not consider sub-sampling features. We let this argument because it was supposed to be an easy extension. Seems that it is not the case. I vote for removing |
To me the issue comes from the fact that the validity of |
Yes but even if you replace this line by just
|
Yes, because you should not do that either. Since you inherit form |
Ok great! I didn't know about |
When subsampling features
IsolationForest
fails the input validation when callingpredict()
.gives the following:
In
predict
one of the individual fitted estimators is used for input validation:self.estimators_[0]._validate_X_predict(X, check_input=True)
but it is passed the fullX
which has all the features. After looking into it a bit,bagging.py
sub-samples the features itself, where asforest.py
delegates it to the underlyingDecisionTree
.The text was updated successfully, but these errors were encountered: