Skip to contents

Setup a SpectralLaplaceConfig object for spectral clustering with an exponential (Laplacian) kernel, via the 'kernlab' package. The exponential kernel decays more slowly than the Gaussian of setup_SpectralRBF and so keeps more weight on distant pairs.

Usage

setup_SpectralLaplace(
  k = 3L,
  sigma = NULL,
  iterations = 200L,
  nystrom = NULL,
  features = NULL
)

Arguments

k

Integer [2, Inf): Number of clusters. Must be no more than the number of cases.

sigma

Optional Numeric (0, Inf): Inverse kernel width. Unset uses 1.

iterations

Integer [1, Inf): Maximum number of k-means iterations run on the spectral embedding.

nystrom

Optional NystromConfig: Approximate the affinity matrix from a sample of the cases, from setup_Nystrom. NULL decomposes it in full.

features

Optional Character vector: Names of at least 2 distinct feature columns to cluster on. NULL clusters on all numeric features.

Value

SpectralLaplaceConfig object.

Details

Argument names are rtemis' own. They map to kernlab::specc() as: k -> centers, sigma -> kpar = list(sigma) with kernel = "laplacedot", nystrom -> nystrom.red and nystrom.sample; iterations keeps its name.

References

Ng AY, Jordan MI, Weiss Y (2001). On Spectral Clustering: Analysis and an Algorithm. Advances in Neural Information Processing Systems, 14, 849-856.

Author

EDG

Examples

setup_SpectralLaplace(k = 3L, sigma = 0.5)
#> <SpectralLaplace ClusteringConfig>
#>          k: <int> 3
#>      sigma: <nmr> 0.50
#> iterations: <int> 200
#>    nystrom: <NUL> NULL