Why do I get this message : Error using kmeans ---X must have more rows than the number of clusters.
22 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Andree-Sylvie Carbonneau
il 15 Gen 2014
Risposto: Laura Hensel
il 29 Feb 2020
Hello,
When I run a collegue script, i get this error message: Error using kmeans ---X must have more rows than the number of clusters. What are my option to solve this problem?
Thank you.
Andree
0 Commenti
Risposta accettata
Kelly Kearney
il 15 Gen 2014
How many data points do you have? And how many clusters are you attempting to create? You can't group 4 points into 5 clusters, for example.
0 Commenti
Più risposte (3)
Thulfiqar Hussein
il 22 Mar 2017
the value (X/K) should be integer number without fractions. for example if you have 10 objects and cluster them to 3 groups you will get 10/3 = 3.3 and this error will pop up, but if you cluster them to 2 or 5 groups there will be no problem.
0 Commenti
Laura Hensel
il 29 Feb 2020
You should also check if you have any missing values in your matrix
0 Commenti
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!