Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
merged 15 commits into from
Nov 17, 2019

Conversation

abbiepopa
Copy link
Contributor

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

@@ -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.
Copy link
Contributor

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.

Copy link
Member

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.

@eickenberg
Copy link
Contributor

These changes look good to me.

Copy link
Member

@rth rth left a 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.

@@ -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
-------
Copy link
Member

Choose a reason for hiding this comment

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

same as above

@@ -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
-------
Copy link
Member

Choose a reason for hiding this comment

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

same as above

@abbiepopa
Copy link
Contributor Author

Thank you @rth , I think I commit all of your suggestions, but lmk if it didn't go through properly!

Copy link
Member

@agramfort agramfort left a 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

Copy link
Member

@rth rth left a comment

Choose a reason for hiding this comment

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

Thanks @abbiepopa !

@rth rth changed the title [MRG] Birch numpy docs DOC Birch numpydoc docstring validation Nov 17, 2019
@rth rth merged commit 54e78b7 into scikit-learn:master Nov 17, 2019
adrinjalali pushed a commit to adrinjalali/scikit-learn that referenced this pull request Nov 18, 2019
adrinjalali pushed a commit to adrinjalali/scikit-learn that referenced this pull request Nov 18, 2019
panpiort8 pushed a commit to panpiort8/scikit-learn that referenced this pull request Mar 3, 2020
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.

5 participants