Class AUPRCEvaluation

  • All Implemented Interfaces:
    ScoreEvaluation

    @Reference(authors="J. Davis and M. Goadrich",title="The relationship between Precision-Recall and ROC curves",booktitle="Proc. 23rd Int. Conf. Machine Learning (ICML)",url="https://doi.org/10.1145/1143844.1143874",bibkey="DBLP:conf/icml/DavisG06") @Reference(authors="T. Saito and M. Rehmsmeier",title="The Precision-Recall Plot is More Informative than the ROC Plot When Evaluating Binary Classifiers on Imbalanced Datasets",booktitle="PLoS ONE 10(3)",url="https://doi.org/10.1371/journal.pone.0118432",bibkey="doi:10.1371/journal.pone.0118432")
    public class AUPRCEvaluation
    extends java.lang.Object
    implements ScoreEvaluation
    Compute the area under the precision-recall curve (AUPRC).

    References:

    J. Davis and M. Goadrich
    The relationship between Precision-Recall and ROC curves
    Proc. 23rd Int. Conf. Machine Learning (ICML)

    T. Saito and M. Rehmsmeier
    The Precision-Recall Plot is More Informative than the ROC Plot When Evaluating Binary Classifiers on Imbalanced Datasets
    PLoS ONE 10(3)

    Since:
    0.8.0
    Author:
    Erich Schubert
    • Constructor Detail

      • AUPRCEvaluation

        public AUPRCEvaluation()
    • Method Detail

      • materializePRC

        public static AUPRCEvaluation.PRCurve materializePRC​(ScoreEvaluation.Adapter adapter)
        Compute the PR curve given a predicate function and an iterator.
        Parameters:
        adapter - Adapter for different input data types
        Returns:
        area under curve
      • computeAUPRC

        public static double computeAUPRC​(ScoreEvaluation.Adapter adapter)
        Compute the area under the PR curve given a set of positive IDs and a sorted list of (comparable, ID)s, where the comparable object is used to decided when two objects are interchangeable.
        Parameters:
        adapter - Adapter for different input data types
        Returns:
        area under curve
      • expected

        public double expected​(int pos,
                               int all)
        Description copied from interface: ScoreEvaluation
        Expected score for a random result.
        Specified by:
        expected in interface ScoreEvaluation
        Parameters:
        pos - Number of positive elements
        all - Total number of elements
        Returns:
        Expected score