check if data are well separated by clustering
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
the cyclist
el 20 de Jul. de 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 comentarios
Ver también
Categorías
Más información sobre Cluster Analysis and Anomaly Detection en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!