make_checkerboard
- sklearn.datasets.make_checkerboard(shape, n_clusters, *, noise=0.0, minval=10, maxval=100, shuffle=True, random_state=None)
Generate an array with block checkerboard structure for biclustering.
Read more in the User Guide.
The shape of the result.
The number of row and column clusters.
The standard deviation of the gaussian noise.
Minimum value of a bicluster.
Maximum value of a bicluster.
Shuffle the samples.
Determines random number generation for dataset creation. Pass an int for reproducible output across multiple function calls. See Glossary.
shapeThe generated array.
The indicators for cluster membership of each row.
The indicators for cluster membership of each column.
Kluger, Y., Basri, R., Chang, J. T., & Gerstein, M. (2003). Spectral biclustering of microarray data: coclustering genes and conditions. Genome research, 13(4), 703-716.
>>> from sklearn.datasets import make_checkerboard
>>> data, rows, columns = make_checkerboard(shape=(300, 300), n_clusters=10,
... random_state=42)
>>> data.shape
(300, 300)
>>> rows.shape
(100, 300)
>>> columns.shape
(100, 300)
>>> print(rows[0][:5], columns[0][:5])
[False False False True False] [False False False False False]