Calculate Normalized Mutual Information (NMI)
Arguments
- pred
Predicted cluster labels.
- truth
Ground truth cell type labels.
Value
NMI value between 0 and 1.
Examples
pred <- factor(rep(c("A", "B"), each = 20))
truth <- factor(rep(c("A", "B"), each = 20))
calc_nmi(pred, truth)
#> A
#> 1