Mixin class for all bicluster estimators in scikit-learn.
This mixin defines the following functionality:
biclusters_ property that returns the row and column indicators;get_indices method that returns the row and column indices of a bicluster;get_shape method that returns the shape of a bicluster;get_submatrix method that returns the submatrix corresponding to a bicluster.>>> import numpy as np >>> from sklearn.base import BaseEstimator, BiclusterMixin >>> class DummyBiClustering(BiclusterMixin, BaseEstimator): ... def fit(self, X, y=None): ... self.rows_ = np.ones(shape=(1, X.shape[0]), dtype=bool) ... self.columns_ = np.ones(shape=(1, X.shape[1]), dtype=bool) ... return self >>> X = np.array([[1, 1], [2, 1], [1, 0], ... [4, 7], [3, 5], [3, 6]]) >>> bicluster = DummyBiClustering().fit(X) >>> hasattr(bicluster, "biclusters_") True >>> bicluster.get_indices(0) (array([0, 1, 2, 3, 4, 5]), array([0, 1]))
Convenient way to get row and column indicators together.
Returns the rows_ and columns_ members.
Row and column indices of the i’th bicluster.
Only works if rows_ and columns_ attributes exist.
The index of the cluster.
Indices of rows in the dataset that belong to the bicluster.
Indices of columns in the dataset that belong to the bicluster.
Shape of the i’th bicluster.
The index of the cluster.
Number of rows in the bicluster.
Number of columns in the bicluster.
Return the submatrix corresponding to bicluster i.
The index of the cluster.
The data.
The submatrix corresponding to bicluster i.
Works with sparse matrices. Only works if rows_ and columns_ attributes exist.
© 2007–2025 The scikit-learn developers
Licensed under the 3-clause BSD License.
https://scikit-learn.org/1.6/modules/generated/sklearn.base.BiclusterMixin.html