sklearn.base
.BiclusterMixin¶
-
class
sklearn.base.
BiclusterMixin
[source]¶ Mixin class for all bicluster estimators in scikit-learn
Methods
get_indices
(i)Row and column indices of the i’th bicluster. get_shape
(i)Shape of the i’th bicluster. get_submatrix
(i, data)Returns the submatrix corresponding to bicluster i. -
__init__
()¶ Initialize self. See help(type(self)) for accurate signature.
-
biclusters_
¶ Convenient way to get row and column indicators together.
Returns the
rows_
andcolumns_
members.
-
get_indices
(i)[source]¶ Row and column indices of the i’th bicluster.
Only works if
rows_
andcolumns_
attributes exist.Parameters: i : int
The index of the cluster.
Returns: row_ind : np.array, dtype=np.intp
Indices of rows in the dataset that belong to the bicluster.
col_ind : np.array, dtype=np.intp
Indices of columns in the dataset that belong to the bicluster.
-
get_shape
(i)[source]¶ Shape of the i’th bicluster.
Parameters: i : int
The index of the cluster.
Returns: shape : (int, int)
Number of rows and columns (resp.) in the bicluster.
-
get_submatrix
(i, data)[source]¶ Returns the submatrix corresponding to bicluster i.
Parameters: i : int
The index of the cluster.
data : array
The data.
Returns: submatrix : array
The submatrix corresponding to bicluster i.
Notes
Works with sparse matrices. Only works if
rows_
andcolumns_
attributes exist.
-