Performs clustering according to the spectral coclustering algorithm
Source:R/sklearn-cluster.R
SpectralCoclustering.Rd
This is a wrapper around the Python class sklearn.cluster.SpectralCoclustering.
Super classes
rgudhi::PythonClass
-> rgudhi::SKLearnClass
-> rgudhi::BaseClustering
-> SpectralCoclustering
Methods
Method new()
The SpectralCoclustering class constructor.
Usage
SpectralCoclustering$new(
n_clusters = 3L,
svd_method = c("randomized", "arpack"),
n_svd_vecs = NULL,
mini_batch = FALSE,
init = c("k-means++", "random"),
n_init = 10L,
random_state = NULL
)
Arguments
n_clusters
An integer value specifying the number of biclusters to find. Defaults to
3L
.svd_method
A string specifying the algorithm for finding singular vectors. May be
"randomized"
or"arpack"
. If"randomized"
, usessklearn.utils.extmath.randomized_svd()
, which may be faster for large matrices. If"arpack"
, usesscipy.sparse.linalg.svds()
, which is more accurate, but possibly slower in some cases. Defaults to"randomized"
.n_svd_vecs
An integer value specifying the number of vectors to use in calculating the SVD. Corresponds to
ncv
whensvd_method == "arpack"
andn_oversamples
whensvd_method == "randomized"
. Defaults toNULL
.mini_batch
A boolean value specifying whether to use mini-batch k-means, which is faster but may get different results. Defaults to
FALSE
.init
A string specifying the method for initialization of k-means algorithm. Choices are
"k-means++"
or"random"
. Defaults to"k-means++"
.n_init
An integer value specifying the number of random initializations that are tried with the k-means algorithm. If mini-batch k-means is used, the best initialization is chosen and the algorithm runs once. Otherwise, the algorithm is run for each initialization and the best solution chosen. Defaults to
10L
.random_state
An integer value specifying a pseudo random number generator used for the initialization of the
lobpcg
eigenvectors decomposition wheneigen_solver == "amg"
, and for the k-means initialization. Defaults toNULL
which uses clock time.