I have two different outputs of the kmedoids matlab function, say s1 and s2. How do I find the number of items that were assigned to different clusters in s1 and s2 ? note that s1 and s2 may be equal but only the indexing of the clusters is different.

 Respuesta aceptada

the cyclist
the cyclist el 6 de Ag. de 2017

0 votos

You could use the histcounts function:
s1_counts = histcounts(s1,[unique(s1); Inf])

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Centro de ayuda y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by