Class PRGCEvaluation

  • All Implemented Interfaces:
    ScoreEvaluation

    @Reference(authors="P. Flach and M. Knull",
               title="Precision-Recall-Gain Curves: {PR} Analysis Done Right",
               booktitle="Neural Information Processing Systems (NIPS 2015)",
               url="http://papers.nips.cc/paper/5867-precision-recall-gain-curves-pr-analysis-done-right",
               bibkey="DBLP:conf/nips/FlachK15")
    public class PRGCEvaluation
    extends java.lang.Object
    implements ScoreEvaluation
    Compute the area under the precision-recall-gain curve

    References:

    P. Flach and M. Knull
    Precision-Recall-Gain Curves: PR Analysis Done Right
    Neural Information Processing Systems (NIPS 2015)

    Since:
    0.8.0
    Author:
    Robert Gehde, Erich Schubert
    • Field Detail

    • Constructor Detail

      • PRGCEvaluation

        public PRGCEvaluation()
    • Method Detail

      • materializePRGC

        public static PRGCEvaluation.PRGCurve materializePRGC​(ScoreEvaluation.Adapter adapter)
        Compute the PRG curve given a predicate function and an iterator.
        Parameters:
        adapter - Adapter for different input data types
        Returns:
        PRG curve
      • computePRGAUC

        private static double computePRGAUC​(ScoreEvaluation.Adapter adapter,
                                            PRGCEvaluation.PRGCurve curve)
        Compute the precision-recall-gain-curve
        Parameters:
        adapter - Input adapter
        curve - Optional output curve (may be null)
        Returns:
        AUC value
      • 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