class sklearn.cluster.bicluster.SpectralBiclustering(n_clusters=3, method=’bistochastic’, n_components=6, n_best=3, svd_method=’randomized’, n_svd_vecs=None, mini_batch=False, init=’k-means++’, n_init=10, n_jobs=None, random_state=None)
[source]
Spectral biclustering (Kluger, 2003).
Partitions rows and columns under the assumption that the data has an underlying checkerboard structure. For instance, if there are two row partitions and three column partitions, each row will belong to three biclusters, and each column will belong to two biclusters. The outer product of the corresponding row and column label vectors gives this checkerboard structure.
Read more in the User Guide.
Parameters: |
|
---|---|
Attributes: |
|
>>> from sklearn.cluster import SpectralBiclustering >>> import numpy as np >>> X = np.array([[1, 1], [2, 1], [1, 0], ... [4, 7], [3, 5], [3, 6]]) >>> clustering = SpectralBiclustering(n_clusters=2, random_state=0).fit(X) >>> clustering.row_labels_ array([1, 1, 1, 0, 0, 0], dtype=int32) >>> clustering.column_labels_ array([0, 1], dtype=int32) >>> clustering SpectralBiclustering(init='k-means++', method='bistochastic', mini_batch=False, n_best=3, n_clusters=2, n_components=6, n_init=10, n_jobs=None, n_svd_vecs=None, random_state=0, svd_method='randomized')
fit (X[, y]) | Creates a biclustering for X. |
get_indices (i) | Row and column indices of the i’th bicluster. |
get_params ([deep]) | Get parameters for this estimator. |
get_shape (i) | Shape of the i’th bicluster. |
get_submatrix (i, data) | Returns the submatrix corresponding to bicluster i . |
set_params (**params) | Set the parameters of this estimator. |
__init__(n_clusters=3, method=’bistochastic’, n_components=6, n_best=3, svd_method=’randomized’, n_svd_vecs=None, mini_batch=False, init=’k-means++’, n_init=10, n_jobs=None, random_state=None)
[source]
biclusters_
Convenient way to get row and column indicators together.
Returns the rows_
and columns_
members.
fit(X, y=None)
[source]
Creates a biclustering for X.
Parameters: |
|
---|
get_indices(i)
[source]
Row and column indices of the i’th bicluster.
Only works if rows_
and columns_
attributes exist.
Parameters: |
|
---|---|
Returns: |
|
get_params(deep=True)
[source]
Get parameters for this estimator.
Parameters: |
|
---|---|
Returns: |
|
get_shape(i)
[source]
Shape of the i’th bicluster.
Parameters: |
|
---|---|
Returns: |
|
get_submatrix(i, data)
[source]
Returns the submatrix corresponding to bicluster i
.
Parameters: |
|
---|---|
Returns: |
|
Works with sparse matrices. Only works if rows_
and columns_
attributes exist.
set_params(**params)
[source]
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form <component>__<parameter>
so that it’s possible to update each component of a nested object.
Returns: |
|
---|
© 2007–2018 The scikit-learn developers
Licensed under the 3-clause BSD License.
http://scikit-learn.org/stable/modules/generated/sklearn.cluster.bicluster.SpectralBiclustering.html