Assign points to a mean?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi guys,
im currently trying to write my own code for a Lloyd Algorithm to make a custom kmeans function. But I really struggle how I can assign my sample points to my mean points.
Anyone knows how I can assign the random samples to their clostest point?
0 件のコメント
回答 (1 件)
Image Analyst
2020 年 5 月 11 日
You can use randperm() or randsample() to get a list of random indexes. Then just call mean().
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!