sklearn.base.BiclusterMixin

class sklearn.base.BiclusterMixin[source]

Mixin class for all bicluster estimators in scikit-learn

Attributes
biclusters_

Convenient way to get row and column indicators together.

Methods

get_indices(self, i)

Row and column indices of the i’th bicluster.

get_shape(self, i)

Shape of the i’th bicluster.

get_submatrix(self, i, data)

Returns the submatrix corresponding to bicluster i.

__init__(self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

property biclusters_

Convenient way to get row and column indicators together.

Returns the rows_ and columns_ members.

get_indices(self, i)[source]

Row and column indices of the i’th bicluster.

Only works if rows_ and columns_ attributes exist.

Parameters
iint

The index of the cluster.

Returns
row_indnp.array, dtype=np.intp

Indices of rows in the dataset that belong to the bicluster.

col_indnp.array, dtype=np.intp

Indices of columns in the dataset that belong to the bicluster.

get_shape(self, i)[source]

Shape of the i’th bicluster.

Parameters
iint

The index of the cluster.

Returns
shape(int, int)

Number of rows and columns (resp.) in the bicluster.

get_submatrix(self, i, data)[source]

Returns the submatrix corresponding to bicluster i.

Parameters
iint

The index of the cluster.

dataarray

The data.

Returns
submatrixarray

The submatrix corresponding to bicluster i.

Notes

Works with sparse matrices. Only works if rows_ and columns_ attributes exist.