Information-theoric metrics#

Information-theoric evaluation metrics for ontological predictions.

References

Clark WT, Radivojac P. Information-theoretic evaluation of predicted ontological annotations. Bioinformatics. 2013;29(13):i53-i61. doi:10.1093/bioinformatics/btt228.

Preprocessing#

chamois.predictor.information.information_accretion(y_true, hierarchy)#

Compute the information accretion using frequencies from the given labels.

Scores#

chamois.predictor.information.remaining_uncertainty_score(y_true, y_pred, information_accretion)#

Compute the remaining uncertainty score for a prediction.

Parameters:
  • y_true (numpy.ndarray of shape (n_samples, n_classes)) – The true labels for all observations.

  • y_pred (numpy.ndarray of shape (n_samples, n_classes)) – The predicted labels for all observations.

  • information_accretion (numpy.ndarray of shape (n_classes,)) – The information accretion for each class.

chamois.predictor.information.misinformation_score(y_true, y_pred, information_accretion)#

Compute the misinformation score for a prediction.

Parameters:
  • y_true (numpy.ndarray of shape (n_samples, n_classes)) – The true labels for all observations.

  • y_pred (numpy.ndarray of shape (n_samples, n_classes)) – The predicted labels for all observations.

  • information_accretion (numpy.ndarray of shape (n_classes,)) – The information accretion for each class.

chamois.predictor.information.semantic_distance_score(y_true, y_scores, information_accretion, *, k=2)#

Curves#

chamois.predictor.information.information_theoric_curve(y_true, y_scores, information_accretion)#

Return the information theoric curve for the predictions.

chamois.predictor.information.weighted_information_theoric_curve(y_true, y_scores, information_accretion)#

Return the weighted information theoric curve for the predictions.

chamois.predictor.information.weighted_precision_recall_curve(y_true, y_scores, information_accretion)#