kmeans

Let

find

such that

where

cos defines

Equivalent form

under condition

where

For , let

then

replace with above expression

then

For and ,