Class PrecisionRecall

    • Constructor Detail

      • PrecisionRecall

        public PrecisionRecall​(double precision,
                               double recall)
        Wrap the precision and recall values.
        Parameters:
        precision - precision
        recall - recall
    • Method Detail

      • getPrecision

        public double getPrecision()
        Get the value of precision.
        Returns:
        precision
      • getRecall

        public double getRecall()
        Get the value of recall.
        Returns:
        recall
      • getF1Score

        public double getF1Score()
        Compute the F1-score using precision and recall.
        Returns:
        F1-score
      • getFScore

        public double getFScore​(double beta)
        Compute the Fβ-score using precision and recall.
        Parameters:
        beta - beta value
        Returns:
        Fβ-score value
      • toString

        public String toString()
        Return the textual representation of precision, recall, and F1.
        Overrides:
        toString in class Object
        Returns:
        the textual representation