-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
DOC Ensures that SpectralCoclustering passes numpydoc validation #21282
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,14 +114,20 @@ def _check_parameters(self): | |
) | ||
|
||
def fit(self, X, y=None): | ||
"""Creates a biclustering for X. | ||
"""Create a biclustering for X. | ||
|
||
Parameters | ||
---------- | ||
X : array-like of shape (n_samples, n_features) | ||
Training instances to cluster. | ||
|
||
y : Ignored | ||
Not used. | ||
|
||
Returns | ||
------- | ||
self: object | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace with self : object |
||
Fitted biclustering for X. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace with Returns a fitted instance. |
||
""" | ||
X = self._validate_data(X, accept_sparse="csr", dtype=np.float64) | ||
self._check_parameters() | ||
|
@@ -255,6 +261,13 @@ class SpectralCoclustering(BaseSpectral): | |
initialization. Use an int to make the randomness deterministic. | ||
See :term:`Glossary <random_state>`. | ||
|
||
References | ||
---------- | ||
|
||
* Dhillon, Inderjit S, 2001. `Co-clustering documents and words using | ||
bipartite spectral graph partitioning | ||
<http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.140.3011>`__. | ||
|
||
Attributes | ||
---------- | ||
rows_ : array-like of shape (n_row_clusters, n_rows) | ||
|
@@ -284,6 +297,12 @@ class SpectralCoclustering(BaseSpectral): | |
|
||
.. versionadded:: 1.0 | ||
|
||
See Also | ||
-------- | ||
SpectralClustering: Performs a low-dimension embedding of the | ||
affinity matrix between samples, followed by clustering, e.g., by KMeans, | ||
of the components of the eigenvectors in the low dimensional space. | ||
Comment on lines
+302
to
+304
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not able to make suggestions. I assume that when opening the PR, you unchecked the checkbox that allows maintainers to make some editing. Here, you should replace with: SpectralClustering : Apply clustering to a projection of the normalized Laplacian. |
||
|
||
Examples | ||
-------- | ||
>>> from sklearn.cluster import SpectralCoclustering | ||
|
@@ -297,14 +316,6 @@ class SpectralCoclustering(BaseSpectral): | |
array([0, 0], dtype=int32) | ||
>>> clustering | ||
SpectralCoclustering(n_clusters=2, random_state=0) | ||
|
||
References | ||
---------- | ||
|
||
* Dhillon, Inderjit S, 2001. `Co-clustering documents and words using | ||
bipartite spectral graph partitioning | ||
<http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.140.3011>`__. | ||
|
||
""" | ||
|
||
def __init__( | ||
|
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.
Replace with