Why does this Error is shown when we use kmeans clustering : X must have more rows than the number of clusters.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Pradya Panyainkaew
am 3 Jan. 2018
Kommentiert: Pradya Panyainkaew
am 8 Jan. 2018
I have a matrix size 8688x100 and I try to use kmeans function to cluster these data points into various number of cluster such as 2, 3, 4 and 5, respectively. However, matlab software show a message "Error using kmeans X must have more rows than the number of clusters.". How can I fix it ?
0 Kommentare
Akzeptierte Antwort
A. P. B.
am 4 Jan. 2018
In the kmeans documentation kmeans(X,k) .. here X is a n by d matrix where n is the number of instances and d is the dimension so your data X = 8688x100 you cluster your data into 5 clusters . Try this: kmeans(X(:),5)
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!