8000 Isolation Forest feature max features < 1 · Issue #8318 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Isolation Forest feature max features < 1 #8318

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

Closed
itay955 opened this issue Feb 8, 2017 · 3 comments
Closed

Isolation Forest feature max features < 1 #8318

itay955 opened this issue Feb 8, 2017 · 3 comments

Comments

@itay955
Copy link
itay955 commented Feb 8, 2017

Regarding Isolation Forest released recently,
I found a bug on the decision_function method.
if you use max features less than 1 than the trees doesn't fit with the test.
it needs to first feature select the features for that specific tree.

instead of:
for i, tree in enumerate(self.estimators_):
leaves_index = tree.apply(X)
node_indicator = tree.decision_path(X)

it should be:
for i, tree in enumerate(self.estimators_):
X_i = X[:,self.estimators_features_[i]]
leaves_index = tree.apply(X_i)
node_indicator = tree.decision_path(X_i)

@jnothman
Copy link
Member
jnothman commented Feb 8, 2017

Thanks. This should be fixed in master. See #5732

@jnothman jnothman closed this as completed Feb 8, 2017
@kuttire
Copy link
kuttire commented Feb 21, 2017

Hi, This does not seem to be fixed. The module still gives an error if max features < 1

@jnothman
Copy link
Member
jnothman commented Feb 22, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0