Why do I get this message : Error using kmeans ---X must have more rows than the number of clusters.
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (3)
Andree-Sylvie Carbonneau
le 15 Jan 2014
2 commentaires
José-Luis
le 15 Jan 2014
size(ab)?
Andree-Sylvie Carbonneau
le 16 Jan 2014
Modifié(e) : Andree-Sylvie Carbonneau
le 16 Jan 2014
Thulfiqar Hussein
le 22 Mar 2017
0 votes
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.
Laura Hensel
le 29 Fév 2020
0 votes
You should also check if you have any missing values in your matrix
Catégories
En savoir plus sur k-Means and k-Medoids Clustering dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!