I'm wondering if there is a good way to calculate the clustering criterion based on BIC formula, for a k-means output in R? I'm a bit confused as to how to calculate that BIC so that I can compare it with other clustering models. Currently I'm using the stats package implementation of k-means.
Solved – Compute BIC clustering criterion (to validate clusters after K-means)
bicclusteringk-meansr
Best Answer
To calculate the BIC for the kmeans results, I have tested the following methods:
The r code for above formula is:
the problem is when i using the above r code, the calculated BIC was monotone increasing. what's the reason?
[ref2] Ramsey, S. A., et al. (2008). "Uncovering a macrophage transcriptional program by integrating evidence from motif scanning and expression dynamics." PLoS Comput Biol 4(3): e1000021.
I have used the new formula from https://stackoverflow.com/questions/15839774/how-to-calculate-bic-for-k-means-clustering-in-r
This method given the lowest BIC value at cluster number 155.
using @ttnphns provided method, the corresponding R code as listed below. However, the problem is what the difference between Vc and V? And how to calculate the element-wise multiplication for two vectors with different length?