Skip to contents

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