@@ -191,39 +191,40 @@ class SpectralCoclustering(BaseSpectral):
191
191
192
192
Parameters
193
193
----------
194
- n_clusters : integer, optional, default: 3
194
+ n_clusters : int, default= 3
195
195
The number of biclusters to find.
196
196
197
- svd_method : string, optional , default: 'randomized'
197
+ svd_method : {'randomized', 'arpack'} , default= 'randomized'
198
198
Selects the algorithm for finding singular vectors. May be
199
199
'randomized' or 'arpack'. If 'randomized', use
200
200
:func:`sklearn.utils.extmath.randomized_svd`, which may be faster
201
201
for large matrices. If 'arpack', use
202
202
:func:`scipy.sparse.linalg.svds`, which is more accurate, but
203
203
possibly slower in some cases.
204
204
205
- n_svd_vecs : int, optional, default: None
205
+ n_svd_vecs : int, default= None
206
206
Number of vectors to use in calculating the SVD. Corresponds
207
207
to `ncv` when `svd_method=arpack` and `n_oversamples` when
208
208
`svd_method` is 'randomized`.
209
209
210
- mini_batch : bool, optional, default: False
210
+ mini_batch : bool, default= False
211
211
Whether to use mini-batch k-means, which is faster but may get
212
212
different results.
213
213
214
- init : {'k-means++', 'random' or an ndarray}
215
- Method for initialization of k-means algorithm; defaults to
216
- 'k-means++'.
214
+ init : {'k-means++', 'random', or ndarray of shape \
215
+ (n_clusters, n_features), default='k-means++'
216
+ Method for initialization of k-means algorithm; defaults to
217
+ 'k-means++'.
217
218
218
- n_init : int, optional, default: 10
219
+ n_init : int, default= 10
219
220
Number of random initializations that are tried with the
220
221
k-means algorithm.
221
222
222
223
If mini-batch k-means is used, the best initialization is
223
224
chosen and the algorithm runs once. Otherwise, the algorithm
224
225
is run for each initialization and the best solution chosen.
225
226
226
- n_jobs : int or None, optional ( default=None)
227
+ n_jobs : int, default=None
227
228
The number of jobs to use for the computation. This works by breaking
228
229
down the pairwise matrix into n_jobs even slices and computing them in
229
230
parallel.
@@ -232,24 +233,24 @@ class SpectralCoclustering(BaseSpectral):
232
233
``-1`` means using all processors. See :term:`Glossary <n_jobs>`
233
234
for more details.
234
235
235
- random_state : int, RandomState instance or None ( default)
236
+ random_state : int, RandomState instance, default=None
236
237
Used for randomizing the singular value decomposition and the k-means
237
238
initialization. Use an int to make the randomness deterministic.
238
239
See :term:`Glossary <random_state>`.
239
240
240
241
Attributes
241
242
----------
242
- rows_ : array-like, shape (n_row_clusters, n_rows)
243
+ rows_ : array-like of shape (n_row_clusters, n_rows)
243
244
Results of the clustering. `rows[i, r]` is True if
244
245
cluster `i` contains row `r`. Available only after calling ``fit``.
245
246
246
- columns_ : array-like, shape (n_column_clusters, n_columns)
247
+ columns_ : array-like of shape (n_column_clusters, n_columns)
247
248
Results of the clustering, like `rows`.
248
249
249
- row_labels_ : array-like, shape (n_rows,)
250
+ row_labels_ : array-like of shape (n_rows,)
250
251
The bicluster label of each row.
251
252
252
- column_labels_ : array-like, shape (n_cols,)
253
+ column_labels_ : array-like of shape (n_cols,)
253
254
The bicluster label of each column.
254
255
255
256
Examples
@@ -319,55 +320,58 @@ class SpectralBiclustering(BaseSpectral):
319
320
320
321
Parameters
321
322
----------
322
- n_clusters : integer or tuple (n_row_clusters, n_column_clusters)
323
+ n_clusters : int or tuple (n_row_clusters, n_column_clusters), default=3
323
324
The number of row and column clusters in the checkerboard
324
325
structure.
325
326
326
- method : string, optional, default: 'bistochastic'
327
+ method : {'bistochastic', 'scale', 'log'}, default= 'bistochastic'
327
328
Method of normalizing and converting singular vectors into
328
329
biclusters. May be one of 'scale', 'bistochastic', or 'log'.
329
330
The authors recommend using 'log'. If the data is sparse,
330
331
however, log normalization will not work, which is why the
331
- default is 'bistochastic'. CAUTION: if `method='log'`, the
332
- data must not be sparse.
332
+ default is 'bistochastic'.
333
333
334
- n_components : integer, optional, default: 6
334
+ .. warning::
335
+ if `method='log'`, the data must be sparse.
336
+
337
+ n_components : int, default=6
335
338
Number of singular vectors to check.
336
339
337
- n_best : integer, optional, default: 3
340
+ n_best : int, default= 3
338
341
Number of best singular vectors to which to project the data
339
342
for clustering.
340
343
341
- svd_method : string, optional , default: 'randomized'
344
+ svd_method : {'randomized', 'arpack'} , default= 'randomized'
342
345
Selects the algorithm for finding singular vectors. May be
343
346
'randomized' or 'arpack'. If 'randomized', uses
344
347
:func:`~sklearn.utils.extmath.randomized_svd`, which may be faster
345
348
for large matrices. If 'arpack', uses
346
349
`scipy.sparse.linalg.svds`, which is more accurate, but
347
350
possibly slower in some cases.
348
351
349
- n_svd_vecs : int, optional, default: None
352
+ n_svd_vecs : int, default= None
350
353
Number of vectors to use in calculating the SVD. Corresponds
351
354
to `ncv` when `svd_method=arpack` and `n_oversamples` when
352
355
`svd_method` is 'randomized`.
353
356
354
- mini_batch : bool, optional, default: False
357
+ mini_batch : bool, default= False
355
358
Whether to use mini-batch k-means, which is faster but may get
356
359
different results.
357
360
358
- init : {'k-means++', 'random' or an ndarray}
359
- Method for initialization of k-means algorithm; defaults to
360
- 'k-means++'.
361
+ init : {'k-means++', 'random'} or ndarray of (n_clusters, n_features), \
362
+ default='k-means++'
363
+ Method for initialization of k-means algorithm; defaults to
364
+ 'k-means++'.
361
365
362
- n_init : int, optional, default: 10
366
+ n_init : int, default= 10
363
367
Number of random initializations that are tried with the
364
368
k-means algorithm.
365
369
366
370
If mini-batch k-means is used, the best initialization is
367
371
chosen and the algorithm runs once. Otherwise, the algorithm
368
372
is run for each initialization and the best solution chosen.
369
373
370
- n_jobs : int or None, optional ( default=None)
374
+ n_jobs : int, default=None
371
375
The number of jobs to use for the computation. This works by breaking
372
376
down the pairwise matrix into n_jobs even slices and computing them in
373
377
parallel.
@@ -376,24 +380,24 @@ class SpectralBiclustering(BaseSpectral):
376
380
``-1`` means using all processors. See :term:`Glossary <n_jobs>`
377
381
for more details.
378
382
379
- random_state : int, RandomState instance or None ( default)
383
+ random_state : int, RandomState instance, default=None
380
384
Used for randomizing the singular value decomposition and the k-means
381
385
initialization. Use an int to make the randomness deterministic.
382
386
See :term:`Glossary <random_state>`.
383
387
384
388
Attributes
385
389
----------
386
- rows_ : array-like, shape (n_row_clusters, n_rows)
390
+ rows_ : array-like of shape (n_row_clusters, n_rows)
387
391
Results of the clustering. `rows[i, r]` is True if
388
392
cluster `i` contains row `r`. Available only after calling ``fit``.
389
393
390
- columns_ : array-like, shape (n_column_clusters, n_columns)
394
+ columns_ : array-like of shape (n_column_clusters, n_columns)
391
395
Results of the clustering, like `rows`.
392
396
393
- row_labels_ : array-like, shape (n_rows,)
397
+ row_labels_ : array-like of shape (n_rows,)
394
398
Row partition labels.
395
399
396
- column_labels_ : array-like, shape (n_cols,)
400
+ column_labels_ : array-like of shape (n_cols,)
397
401
Column partition labels.
398
402
399
403
Examples
0 commit comments