-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
DOC Add example link to KNeighborsClassifier class #26979
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
DOC Add example link to KNeighborsClassifier class #26979
Conversation
sklearn/neighbors/_classification.py
Outdated
@@ -37,6 +37,7 @@ class KNeighborsClassifier(KNeighborsMixin, ClassifierMixin, NeighborsBase): | |||
|
|||
Read more in the :ref:`User Guide <classification>`. | |||
|
|||
|
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.
By removing this line, it should solve the CI failure.
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 for pointing out the CI failure, I hadn't noticed it.
sklearn/neighbors/_classification.py
Outdated
|
||
See :ref:`sphx_glr_auto_examples_neighbors_plot_classification.py` | ||
for an example on how to use the API. |
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 think that we should put this example reference in the weights
parameter description.
Indeed, it shows two different classification decision boundaries that change due to this parameter. So I would move and rephrase to:
Refer to the example entitled
:ref:`sphx_glr_auto_examples_neighbors_plot_classification.py`
showing the impact of the `weights` parameter on the decision
boundary.
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.
Indeed. I've now moved and rephrased the reference link.
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 on my side. Thanks @emma-carballal
This adds a link to the example from plot_classification to KNearestNeighbors class to make it more discoverable.
@adrinjalali