Assign points to a mean?
Mostrar comentarios más antiguos
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?
Respuestas (1)
Image Analyst
el 11 de Mayo de 2020
0 votos
You can use randperm() or randsample() to get a list of random indexes. Then just call mean().
Categorías
Más información sobre k-Means and k-Medoids Clustering en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!