How can I drwa lines between k clusters using K-means

3 ビュー (過去 30 日間)
Ahmad Hani
Ahmad Hani 2019 年 3 月 30 日
コメント済み: Walter Roberson 2019 年 3 月 31 日
I have data set with n points and I use K-means for partitioning the data set into k=6 clusters
The resulting clusters shown in this figure
kmeans0.png
How can I Draw lines between these cluster to present each cluster as 2d regions
like this Figure
kmeans.png
  3 件のコメント
Image Analyst
Image Analyst 2019 年 3 月 31 日
編集済み: Image Analyst 2019 年 3 月 31 日
I was going recommend that also, but the lines in voronoi go between points, and if you have the points be the centroids, then I think it might be possible/likely to have lines/regions "contain" points not in that cluster. Moreover these regions would not necessarily be correct for new points. That is, if you have a point in a empty tail of some region, it doesn't necessarily mean that the point would be classified into that cluster if you ran the classification again with the new point. You might want to use boundary - I believe new points in the boundaries would be with the same cluster.
Attach your data so we can try more things.
Walter Roberson
Walter Roberson 2019 年 3 月 31 日
Good point, Image Analyst. If you look near y 30000, x 2000, there is blob split down the middle, and the centroids are going to be in the middle of those masses; there is no way that the voroni lines would happen to follow that split. (Indeed, I don't think kmeans can produce that split; you would need to split along a plane such as svm might do.)

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeVoronoi Diagram についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by