Package org.nlpub.watset.eval
Class PrecisionRecall
java.lang.Object
org.nlpub.watset.eval.PrecisionRecall
A wrapper for precision and recall values that computes F-score.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPrecisionRecall(double precision, double recall) Wrap the precision and recall values. -
Method Summary
Modifier and TypeMethodDescriptiondoubleCompute the F1-score using precision and recall.doublegetFScore(double beta) Compute the Fβ-score using precision and recall.doubleGet the value of precision.doubleGet the value of recall.toString()Return the textual representation of precision, recall, and F1.
-
Constructor Details
-
PrecisionRecall
public PrecisionRecall(double precision, double recall) Wrap the precision and recall values.- Parameters:
precision- precisionrecall- recall
-
-
Method Details
-
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
Return the textual representation of precision, recall, and F1.
-