Description Usage Arguments Value Author(s) References See Also
View source: R/kmeans_clustersRProg.R
The som_kmeansR function with 100 epochs training is run for a custom number of times for each k value of clusters and the best of these is selected based on sum of squared errors (err). The Davies-Bouldin index is calculated for each k-clustering. The function has been coded in R code starting from kmeans_clusters.m script present in somtoolbox for Matlab by Vesanto and adapted to show a progress bar when working embedded in the shiny app.
1 | kmeans_clustersRProg(codebook, k = 5, times = 5, seed = NULL)
|
codebook |
SOM codebook |
k |
Maximum number of clusters (the function will be run from 2 to k clusters) |
times |
Number of times the som_kmeansR function is iterated |
seed |
Number for set.seed function |
This function returns a list containing the cluster number assignment for each sample, the cluster centroids, the total quantization error, the DB-index for each number of clusters, and the random seed number used
Sabina Licen, Pierluigi Barbieri
J. Vesanto, J. Himberg, E. Alhoniemi, J. Parhankagas, SOM Toolbox for Matlab 5, Report A57, 2000, Available at: www.cis.hut.fi/projects/somtoolbox/package/papers/techrep.pdf
som_mdistR, som_kmeansRProg, db_indexR
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.