# K-Medoid Clustering with Point Weights

I asked the same question at Cross Validated, here

I implemented a K-Medoid clustering algorithm recently; I have a number of points $$x_1, ..., x_n$$ which have various properties and a distance function $$d$$ that maps two points to some nonnegative number. The clustering works fine (with some number $$k$$ of cluster medoids where $$k$$ is a lot smaller than $$n$$), but I wanted to be able to change the clustering according to a property of my points, more specifically I'd like more clusters to appear where my points have a high value in some property. I tried scaling the distance matrix like this:

$$newd (x_i, x_j) = p(x_i) * d(x_i, x_j)$$
where $$p(x)$$ is the value of the property of $$x$$.

My expected result was to see more clusters around points with a high value of $$p$$, but instead, I get the exact same clusters. I'm probably missing something very basic here.

So, to sum up, my question: I'd like to see more clusters around points with a certain property. I assume I can achieve this by changing my distance function, but I don't quite understand how to do it?

• If you want a cluster around x_i to be more likely, you need make the scaling factor smaller. So what about $d' = \frac{1}{p} d$ ? Oct 9, 2020 at 22:14