Skip to contents

Calculate the cluster inertia

Usage

calc_inertia(x, data)

# S3 method for class 'KMeansCluster'
calc_inertia(x, data)

Arguments

x

KMeansCluster class.

data

Numerical matrix. The original data used to generate the k-means clusters. Shape of samples x features

Value

The cluster inertia