Implemented NMI measure for external validation