Skip to contents

[Experimental] This version can take in data as is and will calculate the distance matrix internally and convert it into similarities with a Gaussian RBF.

Usage

rs_spectral_clustering(
  data,
  distance_type,
  epsilon,
  k_neighbours,
  n_clusters,
  max_iters,
  seed
)

Arguments

data

Numerical matrix. The data to cluster. Rows = samples, columns = features.

distance_type

String. One of c("euclidean", "manhattan", "canberra", "cosine", "correlation"). Unknown strings raise an error.

epsilon

Numerical. The epsilon parameter for the Gaussian Radial Basis function

k_neighbours

Integer. Number of neighbours to consider in the kNN graph generation

n_clusters

Integer. Number of clusters to identify

max_iters

Integer. Number of iterations for k-means clustering

seed

Integer. Seed for reproducibility

Value

A vector with the 1-based cluster membership of the samples.