Class PrecisionAtKEvaluation

  • All Implemented Interfaces:
    ScoreEvaluation

    public class PrecisionAtKEvaluation
    extends java.lang.Object
    implements ScoreEvaluation
    Evaluate using Precision@k, or R-precision (when k=0).

    When k=0, then it is set to the number of positive objects, and the returned value is the R-precision, or the precision-recall break-even-point (BEP).

    Since:
    0.7.0
    Author:
    Erich Schubert
    • Constructor Detail

      • PrecisionAtKEvaluation

        public PrecisionAtKEvaluation​(int k)
        Constructor.
        Parameters:
        k - k to evaluate at. May be 0.
    • Method Detail

      • 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