R/kmeansBIC.R

Defines functions kmeansbic

kmeansbic <- function(fit) {
  m <- length(fit$cluster)
  k <- nrow(fit$centers)
  d <- fit$tot_withinss
  return(d + 2 * log(m) * k)
}
cnfoley/mrclust documentation built on Oct. 20, 2021, 2:10 p.m.