public class EvaluationMetric
extends java.lang.Object
update(double, double, double, double)
method. Formatted output reflecting
the current values of the statistics may be obtained via the toString()
method.Evalb
Constructor and Description |
---|
EvaluationMetric() |
Modifier and Type | Method and Description |
---|---|
Pair<java.lang.Double,java.lang.Double> |
getPFractionals()
Returns the components of the precision.
|
Pair<java.lang.Double,java.lang.Double> |
getRFractionals()
Returns the components of the recall.
|
double |
getTestInstances()
Returns the number of test instances (e.g., parse trees or sentences) used in
the calculation of the statistics.
|
double |
numRelevantExamples()
A convenience method that returns the number of true positive examples from
among the test instances.
|
java.lang.String |
toString() |
void |
update(double curP,
double curPnum,
double curR,
double curRnum)
Updates the evaluation statistics.
|
public void update(double curP, double curPnum, double curR, double curRnum)
curP
- Precision of the current test examplecurPnum
- The denominator used to calculate the current precisioncurR
- Recall of the current test examplecurRnum
- The denominator used to calculate the current recallpublic Pair<java.lang.Double,java.lang.Double> getPFractionals()
Pair
with the numerator of the precision in the first element
and the denominator of the precision in the second element.public Pair<java.lang.Double,java.lang.Double> getRFractionals()
Pair
with the numerator of the recall in the first element
and the denominator of the recall in the second element.public double getTestInstances()
update(double, double, double, double)
.public double numRelevantExamples()
public java.lang.String toString()
toString
in class java.lang.Object