R/ClusterPurity.R

Defines functions ClusterPurity

Documented in ClusterPurity

# Cluster Purity
ClusterPurity <- function(ComputedClusters, TrueClasses) {
  sum(apply(table(ComputedClusters,TrueClasses), 1, max)) / length(ComputedClusters)
}

Try the IntNMF package in your browser

Any scripts or data that you put into this service are public.

IntNMF documentation built on May 1, 2019, 6:35 p.m.