kmeansbic <- function(fit) {
m <- length(fit$cluster)
k <- nrow(fit$centers)
d <- fit$tot_withinss
return(d + 2 * log(m) * k)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.