-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
[MRG] DOC add versionadded versionchanged for 0.21 #16737
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
@jnothman @adrinjalali @cmarmo could you have a look? |
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 didn't check for completeness, but these changes look good to me, except the two notes I'm not sure about. Thanks @Reksbril
I'll wait for another review before changing what you have.
sklearn/cluster/_agglomerative.py
Outdated
.. versionchanged:: 0.21 | ||
8000 ``n_components_`` was renamed to ``n_connected_components_``. | ||
|
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'm not sure if we need these. Its true that the attribute was renamed, but from the perspective of n_connected_components_
, nothing has changed since its introduction. Not sure if we should do a versionadded instead or not. WDYT @jnothman ?
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 feel like these might be useful, e.g. for a user to understand why and when their code started to break. No strong opinion though
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.
Maybe versionadded
and:
n_connected_components_
was added to replacen_components_
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.
+1 for the @thomasjpfan versionadded
formulation.
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 the PR and for your patience @Reksbril
Made a few comments but mostly looks good. Just not sure about the usefulness of some of these
sklearn/cluster/_agglomerative.py
Outdated
.. versionchanged:: 0.21 | ||
``n_components_`` was renamed to ``n_connected_components_``. | ||
|
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 feel like these might be useful, e.g. for a user to understand why and when their code started to break. No strong opinion though
sklearn/neighbors/_base.py
Outdated
@@ -534,6 +534,10 @@ def kneighbors(self, X=None, n_neighbors=None, return_distance=True): | |||
"""Finds the K-neighbors of a point. | |||
Returns indices of and distances to the neighbors of each point. | |||
|
|||
.. versionchanged:: 0.21 |
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 feel like we wouldn't need these. Thoughts @adrinjalali ?
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 agree we do not need the versionchanged for NotFittedError
.
Co-Authored-By: Nicolas Hug <contact@nicolas-hug.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.
Thanks @Reksbril
LGTM, though I think we don't need the NotFittedError entries. Let's see what others think
@adrinjalali @ThomasDelteil could you check? |
Hi @Reksbril could you please modify the |
@cmarmo oh, thanks, I've missed this one |
sklearn/cluster/_agglomerative.py
Outdated
@@ -1003,6 +1006,9 @@ class FeatureAgglomeration(AgglomerativeClustering, AgglomerationTransform): | |||
n_connected_components_ : int | |||
The estimated number of connected components in the graph. | |||
|
|||
.. versionchanged:: 0.21 | |||
``n_components_`` was renamed to ``n_connected_components_`` |
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.
Should be modified as above (versionchanged -> versionadded)
@cmarmo I've made the requested change |
@thomasjpfan this is the last PR to close #15426. I suppose failing checks are related to the current work on |
Co-authored-by: Mateusz Górski <mateuszg122@gmail.com> Co-authored-by: Nicolas Hug <contact@nicolas-hug.com> Co-authored-by: Thomas J Fan <thomasjpfan@gmail.com>
Co-authored-by: Mateusz Górski <mateuszg122@gmail.com> Co-authored-by: Nicolas Hug <contact@nicolas-hug.com> Co-authored-by: Thomas J Fan <thomasjpfan@gmail.com>
Co-authored-by: Mateusz Górski <mateuszg122@gmail.com> Co-authored-by: Nicolas Hug <contact@nicolas-hug.com> Co-authored-by: Thomas J Fan <thomasjpfan@gmail.com>
Co-authored-by: Mateusz Górski <mateuszg122@gmail.com> Co-authored-by: Nicolas Hug <contact@nicolas-hug.com> Co-authored-by: Thomas J Fan <thomasjpfan@gmail.com>
Part of work in #15426.
I think there shouldn't have been anything added in files:
sklearn/compose/_column_transformer.py
sklearn/ensemble/_voting.py
but I decided to include these changes too. I will just remove them if necessary.