diff --git a/maint_tools/test_docstrings.py b/maint_tools/test_docstrings.py index edbc05d260dee..f1db833ea275f 100644 --- a/maint_tools/test_docstrings.py +++ b/maint_tools/test_docstrings.py @@ -12,9 +12,7 @@ numpydoc_validation = pytest.importorskip("numpydoc.validate") # List of modules ignored when checking for numpydoc validation. -DOCSTRING_IGNORE_LIST = [ - "SpectralCoclustering", -] +DOCSTRING_IGNORE_LIST = [] FUNCTION_DOCSTRING_IGNORE_LIST = [ "sklearn._config.config_context", diff --git a/sklearn/cluster/_bicluster.py b/sklearn/cluster/_bicluster.py index bd1c4e0da003b..6b1c824fc32ec 100644 --- a/sklearn/cluster/_bicluster.py +++ b/sklearn/cluster/_bicluster.py @@ -27,7 +27,6 @@ def _scale_normalize(X): Returns the normalized matrix and the row and column scaling factors. - """ X = make_nonnegative(X) row_diag = np.asarray(1.0 / np.sqrt(X.sum(axis=1))).squeeze() @@ -48,7 +47,6 @@ def _bistochastic_normalize(X, max_iter=1000, tol=1e-5): """Normalize rows and columns of ``X`` simultaneously so that all rows sum to one constant and all columns sum to a different constant. - """ # According to paper, this can also be done more efficiently with # deviation reduction and balancing algorithms. @@ -137,7 +135,6 @@ def fit(self, X, y=None): def _svd(self, array, n_components, n_discard): """Returns first `n_components` left and right singular vectors u and v, discarding the first `n_discard`. - """ if self.svd_method == "randomized": kwargs = {} @@ -290,6 +287,17 @@ class SpectralCoclustering(BaseSpectral): .. versionadded:: 1.0 + See Also + -------- + SpectralBiclustering : Partitions rows and columns under the assumption + that the data has an underlying checkerboard structure. + + References + ---------- + * Dhillon, Inderjit S, 2001. `Co-clustering documents and words using + bipartite spectral graph partitioning + `__. + Examples -------- >>> from sklearn.cluster import SpectralCoclustering @@ -303,14 +311,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 - `__. - """ def __init__(