-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
DOC Birch numpydoc docstring validation #15511
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
sklearn/cluster/_k_means.py
Outdated
@@ -648,7 +647,7 @@ def _init_centroids(X, k, init, random_state=None, x_squared_norms=None, | |||
|
|||
|
|||
class KMeans(TransformerMixin, ClusterMixin, BaseEstimator): | |||
"""K-Means clustering | |||
"""K-Means clustering. |
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.
Other PRs are starting to put a newline after the triple quote right before the beginning of the docstring.
I prefer the convention here, but I am not sure what has been agreed upon.
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.
That was an issue in the validation script numpy/numpydoc#241 the current version without the newline is the correct style.
These changes look good to me. |
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 @abbiepopa ! A few minor comments otherwise LGTM.
sklearn/ensemble/_weight_boosting.py
Outdated
@@ -809,7 +824,7 @@ def staged_predict_proba(self, X): | |||
The training input samples. Sparse matrix can be CSC, CSR, COO, | |||
DOK, or LIL. COO, DOK, and LIL are converted to CSR. | |||
|
|||
Returns | |||
Yields | |||
------- |
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.
same as above
sklearn/ensemble/_weight_boosting.py
Outdated
@@ -1126,7 +1141,7 @@ def staged_predict(self, X): | |||
X : {array-like, sparse matrix} of shape (n_samples, n_features) | |||
The training input samples. | |||
|
|||
Returns | |||
Yields | |||
------- |
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.
same as above
Co-Authored-By: Roman Yurchak <[email protected]>
Co-Authored-By: Roman Yurchak <[email protected]>
Co-Authored-By: Roman Yurchak <[email protected]>
Co-Authored-By: Roman Yurchak <[email protected]>
Thank you @rth , I think I commit all of your suggestions, but lmk if it didn't go through properly! |
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.
@rth merge if happy
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 @abbiepopa !
Reference Issues/PRs
Addresses #15440 (Apply numpydoc validation to docstrings) for sklearn.cluster.Birch
What does this implement/fix? Explain your changes.
Applies numpydoc validation to sklearn.cluster.Birch docstrings
Any other comments?
All numpydoc tests passed