Effacer les filtres
Effacer les filtres

cluster plotting in matlab

2 vues (au cours des 30 derniers jours)
Jay Hanuman
Jay Hanuman le 19 Déc 2016
Commenté : the cyclist le 19 Déc 2016
I attached data file of n*4 size. I used
[idx,C] = kmeans(X,3)
for clustering and obtain idx as cluster index and C as centroid, but I want to plot which shows these three clusters. how to do it.

Réponses (1)

the cyclist
the cyclist le 19 Déc 2016
The documentation for kmeans gives several examples of plotting the output (including the code to do so).
  2 commentaires
Jay Hanuman
Jay Hanuman le 19 Déc 2016
in Documentation cluster plotting given only for 2 variable, but I have 4 variable data so I don't know how to do it for 4 variable
the cyclist
the cyclist le 19 Déc 2016
It is of course not possible to plot four spatial dimensions. The main alternatives would all involve plotting some projection of your data onto a smaller number of dimensions. Possibilities are
  • Use plot3 or scatter3 to plot 3 out of 4 dimensions, each in turn
  • Just use plot as in the example, and plot each pair in turn

Connectez-vous pour commenter.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by