[][src]Function smartcore::metrics::homogeneity_score

pub fn homogeneity_score<T: RealNumber, V: BaseVector<T>>(
    labels_true: &V,
    labels_pred: &V
) -> T

Homogeneity metric of a cluster labeling given a ground truth (range is between 0.0 and 1.0). A cluster result satisfies homogeneity if all of its clusters contain only data points which are members of a single class.

  • labels_true - ground truth class labels to be used as a reference.
  • labels_pred - cluster labels to evaluate.