Skip to content
Prev 359577 / 398503 Next

K mean clustering with extra constraints

Hannah,

Let me see if I can understand your question. 

You have 10 observations of a single variable (perhaps some sort of price?).

You also have an equivalence matrix between these observations (which you possibly called nodes) which stipulates if they are connected together or not. Given that you have this matrix, it is not clear to me why you want further (k-means or other) clustering.

The only thing that seems to me to be reasonable to check is whether two or more of the groups can be merged. But that has nothing to do with clustering.

I may have misunderstood the problem, so sorry. 

Btw, no, the k-means function in R can not handle constraints. 

Ranjan
On Thu, 24 Mar 2016 19:08:51 +0100 Tsai Rainbow <rainbowafmb at gmail.com> wrote: