Skip to content

[MRG+2] FIX: make the deprecation in fit and not init in IsolationForest#11574

Merged
amueller merged 3 commits intoscikit-learn:masterfrom
glemaitre:is/11573
Jul 17, 2018
Merged

[MRG+2] FIX: make the deprecation in fit and not init in IsolationForest#11574
amueller merged 3 commits intoscikit-learn:masterfrom
glemaitre:is/11573

Conversation

@glemaitre
Copy link
Copy Markdown
Member

closes #11573

Rework IsolationForest issue

  • Change DeprecationWarning by a FutureWarning
  • Raise the warning into fit instead than init

@glemaitre glemaitre added this to the 0.20 milestone Jul 16, 2018
@amueller
Copy link
Copy Markdown
Member

looks good

Copy link
Copy Markdown
Member

@qinhanmin2014 qinhanmin2014 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need to update the docstring of contamination

@albertcthomas
Copy link
Copy Markdown
Contributor

LGTM. Thanks @glemaitre. Travis failure does not seem to be related to this PR.

Copy link
Copy Markdown
Member

@TomDLT TomDLT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need to update the docstring of contamination

+1

@glemaitre
Copy link
Copy Markdown
Member Author

What do you mean by updating the docstring

@qinhanmin2014
Copy link
Copy Markdown
Member

Seems that the docstring of parameter contamination fails to mention the change.

@glemaitre
Copy link
Copy Markdown
Member Author

glemaitre commented Jul 17, 2018 via email

Copy link
Copy Markdown
Member

@qinhanmin2014 qinhanmin2014 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if CIs are green, thanks @glemaitre

@qinhanmin2014 qinhanmin2014 changed the title [MRG] FIX: make the deprecation in fit and not init in IsolationForest [MRG+2] FIX: make the deprecation in fit and not init in IsolationForest Jul 17, 2018
@glemaitre glemaitre changed the title [MRG+2] FIX: make the deprecation in fit and not init in IsolationForest [NOMRG] FIX: make the deprecation in fit and not init in IsolationForest Jul 17, 2018
@glemaitre
Copy link
Copy Markdown
Member Author

We cannot merge this PR now. There is a strange side effect with ignore_warning and filterwarnings I think.

@glemaitre glemaitre changed the title [NOMRG] FIX: make the deprecation in fit and not init in IsolationForest [MRG+2] FIX: make the deprecation in fit and not init in IsolationForest Jul 17, 2018
@glemaitre
Copy link
Copy Markdown
Member Author

Ok it passed on my forked CI

@glemaitre
Copy link
Copy Markdown
Member Author

assert_array_almost_equal(intercept2, clf.intercept_, decimal=9)


@ignore_warnings
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really do not get this weird side-effect at a distance kind of thing ... it feels like something is really fishy here. I'll try to reproduce locally.

@amueller
Copy link
Copy Markdown
Member

travis passes. should we wait for the rest?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IsolationForest contamination deprecation in __init__ not in fit

6 participants