notebook.community
Edit and run
You need some ground-truth labels
Entropy of cluster $i$: $-\displaystyle \sum_{j=1}^C\frac{m_{ij}}{\sum_k m_{ik}}\log_2 \frac{m_{ij}}{\sum_k m_{ik}}$
Lower entropy indicates higher purity.
In [ ]: