K-means: see the initial centroids
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Phu Lai
le 2 Déc 2016
Commenté : Massimo Zanetti
le 6 Déc 2016
Hi everyone,
Is it possible to see the randomly selected initial centroids when using the built-in kmeans function? I want to keep track of the centroids in each iteration.
Thanks.
0 commentaires
Réponse acceptée
Massimo Zanetti
le 2 Déc 2016
Yes it is possible.
kmeans allows you to set option parameters via the statset function. In the help page kmeans there some examples on how using stateset.
Set the parameter 'OutputFcn' as shown in this tutorial, for displaying iteration results in iterative solvers: https://it.mathworks.com/help/matlab/math/output-functions.html
4 commentaires
Massimo Zanetti
le 6 Déc 2016
Nope.. I have tried setting 'MaxIter'=0, but it seems it is the same as setting 'MaxIter'=1. The kmeans function is a black box :(
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!