autointent.metrics.scoring_map#

autointent.metrics.scoring_map(labels, scores)#

Calculate the mean average precision (MAP) score for multilabel classification.

The MAP score measures the precision at different levels of ranking, averaged across all queries. The ideal value is 1, indicating perfect ranking, while the worst value is 0.

This function utilizes sklearn.metrics.label_ranking_average_precision_score() for computation.

Parameters:
  • labels (autointent.metrics.custom_types.LABELS_VALUE_TYPE) – ground truth labels for each sample

  • scores (autointent.metrics.custom_types.SCORES_VALUE_TYPE) – for each sample, this list contains scores for each of n_classes classes

Returns:

mean average precision score

Return type:

float