-
-
Notifications
You must be signed in to change notification settings - Fork 25.5k
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
[MRG] DOC Add example about interpretation of coefficients of linear models #15706
Conversation
@glemaitre , I think that the build on Azure failed for reasons having nothing to do with my changes... |
Re the failure see #15713
|
It has been fixed on conda-forge side. Should be green now |
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.
Thanks @cmarmo , this is a nice addition
Made a bunch of comments but mostly looks good.
To avoid data leaks, I think we need to split the dataset before doing any sort of exploration.
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
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.
A first pass on the example.
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
…on.py Co-Authored-By: Nicolas Hug <[email protected]>
…on.py Co-Authored-By: Nicolas Hug <[email protected]>
…on.py Co-Authored-By: Nicolas Hug <[email protected]>
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
…on.py Co-Authored-By: Guillaume Lemaitre <[email protected]>
…on.py Co-Authored-By: Guillaume Lemaitre <[email protected]>
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
Apart of these glitches of rendering, LGTM |
Oh just a last thing, we should mention in the |
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
examples/inspection/plot_linear_model_coefficient_interpretation.py
Outdated
Show resolved
Hide resolved
I will merge when it is green. |
Thank you @cmarmo for a wonderful addition to the documentation |
…models (scikit-learn#15706) Co-authored-by: Nicolas Hug <[email protected]> Co-authored-by: Gael Varoquaux <[email protected]> Co-authored-by: Joel Nothman <[email protected]> Co-authored-by: Guillaume Lemaitre <[email protected]>
…models (scikit-learn#15706) Co-authored-by: Nicolas Hug <[email protected]> Co-authored-by: Gael Varoquaux <[email protected]> Co-authored-by: Joel Nothman <[email protected]> Co-authored-by: Guillaume Lemaitre <[email protected]>
What does this implement/fix? Explain your changes.
This PR adds an example in the inspection section, about the interpretation of coefficients in linear models.
Any other comments?
The example makes use of the seaborn package. I've added it to the build on Circle CI. If there is no consensus about that, I will re-write the plot in matplotlib.
Steps to finalise this PR