check if data are well separated by clustering
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have data labelled with either 0 or 1s. I want to know how well they can be separated by clustering. However, each time I run k means, even though the grouping is consistent, the output for the same data point is random (either 0 or 1). What I am currently doing is to reverse the result is label comparison is lower than 50%, does that make sense? Also, I am wondering how to compare it in a context where I have three categories.
0 Commenti
Risposte (1)
the cyclist
il 20 Lug 2018
The reason that this happens is that there is randomness involved in the initial guess of centroid position. This will lead to different labeling.
I think a better way to try to get uniform labeling would be to use the final centroid position (the second output of the kmeans function), and assign labels based on that. For example, you could work systematically from smallest to largest value along the first dimension.
I don't think this will be perfect (especially if some clusters are not well separated), but it might work out.
0 Commenti
Vedere anche
Categorie
Scopri di più su Cluster Analysis and Anomaly Detection in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!