mlr_measures_clust.wss: Within Sum of Squares

mlr_measures_clust.wssR Documentation

Within Sum of Squares

Description

The total within-cluster sum of squares measures the compactness of the clustering by summing the squared Euclidean distances of each observation to its cluster centroid across all clusters: WSS = \sum_{k=1}^{K} \sum_{i \in C_k} \| x_i - \mu_k \|^2. Lower values indicate tighter clusters.

Dictionary

This mlr3::Measure can be instantiated via the dictionary mlr3::mlr_measures or with the associated sugar function mlr3::msr():

mlr_measures$get("clust.wss")
msr("clust.wss")

Meta Information

  • Task type: “clust”

  • Range: [0, \infty)

  • Minimize: TRUE

  • Average: macro

  • Required Prediction: “partition”

  • Required Packages: mlr3, mlr3cluster

See Also

Dictionary of Measures: mlr3::mlr_measures

as.data.table(mlr_measures) for a complete table of all (also dynamically created) mlr3::Measure implementations.

Other cluster measures: mlr_measures_clust.avg_between, mlr_measures_clust.avg_within, mlr_measures_clust.ch, mlr_measures_clust.davies_bouldin, mlr_measures_clust.dunn, mlr_measures_clust.dunn2, mlr_measures_clust.entropy, mlr_measures_clust.pearsongamma, mlr_measures_clust.silhouette, mlr_measures_clust.wb_ratio


mlr3cluster documentation built on June 11, 2026, 5:06 p.m.