-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
DOC Rework IsolationForest example #24917
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
Conversation
loc="upper left", | ||
) | ||
disp.ax_.set_title("Path length decision boundary of IsolationForest") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be nice to have a colorbar or have the level of the isoline in terms of the decision. I don't recall if setting plot_method="pcolormesh"
would make the level of the isoline. But we can for sure add a colorbar otherwise (cf. quick example)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's done, but I am having problems with interpreting the colorbar, so any feedback on that side is really appreciated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It corresponds to the score of confidence to be an outlier or not. 1 is an inlier and 0 is an outlier.
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reference Issues/PRs
Fixes #16113.
What does this implement/fix? Explain your changes.
The original narrative labels samples as "training observations", "new regular observations" and "new abnormal observations". This PR labels samples as "outlier" vs "inlier", which is closer to a real life user case.
This PR also implements a discrete decision boundary and a bit of narration, has suggested in this comment. For such purpose it uses a
DecisionBoundaryDisplay
, as it reduces boilerplate code and helps keeping the attention on the interpretation.Any other comments?
Side effect: Implements notebook style as intended in #22406.
Part of the "tutorialization" series.