Skip to content

DOC Ensures that SpectralBiclustering passes numpydoc validation #21393

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 1 commit into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion maint_tools/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"MultiTaskElasticNetCV",
"OrthogonalMatchingPursuitCV",
"PassiveAggressiveRegressor",
"SpectralBiclustering",
"SpectralCoclustering",
"SpectralEmbedding",
"StackingRegressor",
Expand Down
1 change: 0 additions & 1 deletion sklearn/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,6 @@ def get_indices(self, i):
Indices of rows in the dataset that belong to the bicluster.
col_ind : ndarray, dtype=np.intp
Indices of columns in the dataset that belong to the bicluster.

"""
rows = self.rows_[i]
columns = self.columns_[i]
Expand Down
27 changes: 18 additions & 9 deletions sklearn/cluster/_bicluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 data.

y : Ignored
Not used, present for API consistency by convention.

Returns
-------
self : object
SpectralBiclustering instance.
"""
X = self._validate_data(X, accept_sparse="csr", dtype=np.float64)
self._check_parameters()
Expand Down Expand Up @@ -439,6 +445,17 @@ class SpectralBiclustering(BaseSpectral):

.. versionadded:: 1.0

See Also
--------
SpectralCoclustering : Spectral Co-Clustering algorithm (Dhillon, 2001).

References
----------

* Kluger, Yuval, et. al., 2003. `Spectral biclustering of microarray
data: coclustering genes and conditions
<http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.135.1608>`__.

Examples
--------
>>> from sklearn.cluster import SpectralBiclustering
Expand All @@ -452,14 +469,6 @@ class SpectralBiclustering(BaseSpectral):
array([0, 1], dtype=int32)
>>> clustering
SpectralBiclustering(n_clusters=2, random_state=0)

References
----------

* Kluger, Yuval, et. al., 2003. `Spectral biclustering of microarray
data: coclustering genes and conditions
<http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.135.1608>`__.

"""

def __init__(
Expand Down