Skip to content

DOC add link to plot_iris_dtc example in DecisionTreeClassifier documentation #30650

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
wants to merge 1 commit into from

Conversation

Crucible0
Copy link

This pull request adds a reference link to the plot_iris_dtc.py example in the documentation for DecisionTreeClassifier.

Changes:

  • Added a link to plot_iris_dtc.py in the DecisionTreeClassifier API docstring to give an example.

Purpose:

  • To make it easier for users to discover examples relevant to DecisionTreeClassifier.

Related Issue:

Towards #30621.

Copy link

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 0d4daf6. Link to the linter CI: here

Copy link
Member

@virchan virchan left a comment

Choose a reason for hiding this comment

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

Thank you for the PR @Crucible0! I have a few comments.

It might be a good idea to include the example in the plot_tree documentation as well.

@Crucible0
Copy link
Author

Thank you for the PR @Crucible0! I have a few comments.

It might be a good idea to include the example in the plot_tree documentation as well.

Thank you for the feedback! I'll include the example in the plot_tree documentation and update the pull request shortly.

@@ -944,6 +944,10 @@ class DecisionTreeClassifier(ClassifierMixin, BaseDecisionTree):
...
array([ 1. , 0.93..., 0.86..., 0.93..., 0.93...,
0.93..., 0.93..., 1. , 0.93..., 1. ])

See :ref:`sphx_glr_auto_examples_tree_plot_iris_dtc.py` for an
example of training and visualizing a decision tree classifer on
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi. I believe you mean classifier (missing an "i").

@adrinjalali
Copy link
Member

I actually think this particular file is referenced enough in the tree.rst file and not sure if we need to link it from the docstring as well. So I'm leaning towards closing this one, and you can probably remove it from your list @StefanieSenger .

Sorry about this @Crucible0 , it's not trivial as which examples really need to be added in different places, and sometimes we don't actually need more links.

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

Successfully merging this pull request may close these issues.

4 participants