Does K mean limiting clustering?

I am making kmeans clusters to parse my data. So far it works fine. This is my code:

library(Ckmeans.1d.dp)
file=read.csv(file.choose(),header=T)
attach(file)
sortfile=file[order(normalized),]
results=Ckmeans.1d.dp(normalized,3)
plot(results)

      

Now I can get the clusters and centers, but I'm more interested in getting the "limits" of the cluster. Not the maximum value in one cluster among the data that I used, but the cluster limits that I have now. Is it possible? How can i do this?

+3


source to share


1 answer


K-Me label values ​​based on their nearest centroids (cluster centers). Thus, "limits" between clusters (called decision frontiers) are points that have at least two different centralized centers as their closest centroids (for example, have the same distance on them).



For example, in 2D, for each point of the plane, its nearest centroids are calculated. If it has more than one (for example, at least two centroids are at the minimum distance from it), then it is part of the solution boundary.

+1


source







All Articles