Description of variables:
-
$N$ - number of objects (integer). -
$w$ - weight of each object (vector length$N$ ) -
$D$ - matrix of distances (matrix size$N\times N$ ) -
$n$ - number of clusters (integer) -
$A$ - matrix of probabilities (matrix size$N\times n$ )
Let's define function
Let's call that the pairwise squared deviations of points (PSDP).
The problem is to find
There are problems, where distance matric is specific. And so that's hard to recalcelate distances and centroids.
So that will be good to use just precalculated distance matrix and to not calculate centroids.