I'm a bit confused with concept of K-medoids.
It seems that original algorithm (PAM) describes that swap step should be performed by swaping only one of the medoids with one non-medoid point from the whole dataset (not only in cluster of that medoid), which will lead to smallest error in that moment.
First of all, is my understanding correct?
My original idea (which I implemented) swaps all of the medoids in one iteration, each medoid can be replaced by a point from its cluster, that leads to smallest error in its cluster. Is this a bad approach?
I was mislead by K-means, which calculates its centroid based only on the points from its cluster, but now I'm not sure if the same logic has sense for K-medoids.
Also, just to add, I implemented K-means++ like initialization, to optimize the procedure.