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!