mean_sd_obj {anticlust} | R Documentation |
Compute the discrepancy in means and standard deviations between clusters.
mean_sd_obj(features, clusters)
features |
A matrix or data.frame of data points. Rows correspond to elements and columns correspond to features. |
clusters |
A clustering vector |
This function can be passed as the argument objective
to the
function anticlustering
to minimize differences in means
and standard deviations between anticlusters.
A value quantifying similarity in means and standard deviations. Higher values indicate that means and standard deviations are more similar.
Martin Papenberg martin.papenberg@hhu.de
data(schaper2019) features <- schaper2019[1:48, 3:6] ac <- anticlustering( features, K = 3, categories = schaper2019$room[1:48], objective = mean_sd_obj ) by(features, ac, function(x) round(colMeans(x), 2)) by(features, ac, function(x) round(apply(x, 2, sd), 2))