kernel_kmeans | R Documentation |
Kernel k-means with different algorithm options. Spectral relaxation uses standard randomly initialized k-means on the eigen vectors of the kernel matrix while the QR decomposition of the eigen vectors yields a single solution directly. The last option is to use the kernel matrix to optimize average distances without utilizing the spectral relaxation.
kernel_kmeans(
K,
n_k,
algorithm = "spectral_qr",
spectral_qr_refine = TRUE,
kernel_eigen_vectors = NULL,
max_iter = 100,
num_init = 100,
tol = 1e-08,
parallel = 1,
...
)
K |
kernel |
n_k |
number of clusters |
algorithm |
one of "spectral", "spectral_qr", or "kernelized" |
spectral_qr_refine |
refine QR result with kernelized k-means |
kernel_eigen_vectors |
eigenvectors of the kernel matrix can be pre-computed |
max_iter |
maximum number of iterations |
num_init |
number of kmeans++ initializations for kernelized k-means and spectral clustering |
tol |
delta error convergence threshold for spectral clustering |
parallel |
number of threads for |
... |
ignored |
The tol
parameter is only used by the spectral relaxation algorithm
which makes use of KMeans_rcpp
. Other iterative
algorithms are considered converged only if cluster assignments do not change.
list
of cluster assignments and k-means objective
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.