-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] DOC: Add display='diagram' guides to visualize estimators #18806
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 display='diagram' guides to visualize estimators #18806
Conversation
@@ -91,7 +91,7 @@ | |||
print("model score: %.3f" % clf.score(X_test, y_test)) | |||
|
|||
# %% | |||
# HTML representation of ``Pipeline`` | |||
# HTML representation of ``Pipeline`` (Display Diagram) |
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.
You can revert this change
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.
I was following the discussion on #18305 which suggested putting that in for SEO purposes.
@@ -117,6 +117,12 @@ the test data:: | |||
>>> accuracy_score(pipe.predict(X_test), y_test) | |||
0.97... | |||
|
|||
.. note:: Diagram rendering of estimators |
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.
I would create a section instead of just a note.
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.
Was following @NicolasHug 's direction of adding a note (#18305 (comment))
The default configuration for displaying a pipeline is 'text': | ||
``set_config(display='text')``. To visualize the diagram in Jupyter | ||
Notebook, use ``set_config(display='diagram')`` and then call the pipeline | ||
object. |
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.
You can give an example such that it is rendered in the documentation. One without the diagram and one with the diagram
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.
Unfortunately rendering the diagram in Getting Started is infeasible because it's not an image, it's interactive HTML. E.g. in the user guide section 6.1, it doesn't show the interactive HTML as well.
Thanks for the PR @hongshaoyang. Note that @reshamas had already opened a PR for this issue: #18758 As suggested in #18305 (comment), I think we should create an new dedicated example instead. Since #18758 is already open, I'll close this PR if you don't mind, but feel free to comment on the original issue if you're intersted |
Reference Issues/PRs
Closes #18305 .
What does this implement/fix? Explain your changes.
Any other comments?