mixmo.core.metrics_ensemble.compute_pairwise_diversity

mixmo.core.metrics_ensemble.compute_pairwise_diversity(targets, prediction_matrix, diversity_func)[source]

Computes the pairwise diversity matrix.

Parameters
  • targets (array of shape = [n_samples]:) – Class labels of each sample in X.

  • prediction_matrix (array of shape = [n_samples, n_classifiers]:) – Predicted class labels for each classifier in the pool

  • diversity_func (Function) – Function used to estimate the pairwise diversity

Returns

diversity – The average pairwise diversity matrix calculated for the pool of classifiers

Return type

array of shape = [n_classifiers]