Skip to contents

Spectral clustering algorithm with normalized graph laplacian.

Usage

run_spectral(
  caclust,
  dims = 30,
  use_gap = TRUE,
  nclust = NULL,
  spectral_method = "kmeans",
  iter_max = 10,
  num_seeds = 10,
  return_eig = TRUE
)

Arguments

caclust

Caclust-class object.

dims

Integer. Number of dimensions to choose from SVD of graph laplacian.

use_gap

Logical, TRUE/FALSE. If TRUE, 'eigengap' method will be used to find the most important eigenvector automatically, and the number of output clusters equals number of selected eigenvectors. If FALSE, 'nclust'(integer) should be specified. The eigenvectors corresponding with the smallest 'nclust' eigenvalues will be selcted and 'nclust' clusters will be detected by skmeans/kmeans/GMM.

nclust

Integer. Number of clusters.

spectral_method

character. Name of the method to cluster the eigenvectors. Can be on of the following 3:

  • "kmeans": k-means clustering

  • "skmeans": spherical k-means clustering

  • "GMM": Gaussian-Mixture-Model fuzzy clustering.

iter_max

Number of iterations for k-means clustering and GMM.

num_seeds

Number of times k-means clustering is repeated.

return_eig

Logical. Whether or not to return eigenvectors and store them in caclust-object.

Value

The clustering results of type 'caclust'.

See also

Other biclustering: caclust, make_SNN(), run_leiden()