Skip to content

Inertia in k-means clustering #594

Answered by vnmabus
frederik-f asked this question in Q&A

You must be logged in to vote

In your case you have the discretization grid t = ( 0 , 1 , 2 , 3 ) and the functions x 0 , x 1 , x 2 with x 0 ( t ) = ( 1 , 2 , 3 , 4 ) , x 1 ( t ) = ( 6 , 5 , 4 , 3 ) and x 2 ( t ) = ( 5 , 3 , 1 , 1 ) .
The cluster centers are c 0 , c 1 with c 0 ( t ) = ( 5.5 , 4 , 2.5 , 1 ) and c 1 ( t ) = ( 1 , 2 , 3 , 4 ) .
The distance between two functions f and g is configurable using the metric parameter. By default is the L 2 distance, that is d ( f , g ) = T | f ( t ) g ( t ) | 2 d t (thus, analog to the Euclidean distance).
The distances appearing in the inertia are those between each observation and the cluster it belongs to (the closest one). Thus:
d 0

Replies: 1 comment 1 reply

You must be logged in to vote
1 reply
@frederik-f

Answer selected by frederik-f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants