|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object opennlp.tools.util.eval.FMeasure
public final class FMeasure
The FMeasure
is an utility class for evaluators
which measure precision, recall and the resulting f-measure.
Evaluation results are the arithmetic mean of the precision
scores calculated for each reference sample and
the arithmetic mean of the recall scores calculated for
each reference sample.
Constructor Summary | |
---|---|
FMeasure()
|
Method Summary | |
---|---|
double |
getFMeasure()
Retrieves the f-measure score. |
double |
getPrecisionScore()
Retrieves the arithmetic mean of the precision scores calculated for each evaluated sample. |
double |
getRecallScore()
Retrieves the arithmetic mean of the recall score calculated for each evaluated sample. |
void |
mergeInto(FMeasure measure)
|
static double |
precision(Object[] references,
Object[] predictions)
Calculates the precision score for the given reference and predicted spans. |
static double |
recall(Object[] references,
Object[] predictions)
Calculates the recall score for the given reference and predicted spans. |
String |
toString()
Creates a human read-able String representation. |
void |
updateScores(Object[] references,
Object[] predictions)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FMeasure()
Method Detail |
---|
public double getPrecisionScore()
public double getRecallScore()
public double getFMeasure()
public void updateScores(Object[] references, Object[] predictions)
public void mergeInto(FMeasure measure)
public String toString()
String
representation.
toString
in class Object
public static double precision(Object[] references, Object[] predictions)
references
- the gold standard spanspredictions
- the predicted spans
public static double recall(Object[] references, Object[] predictions)
references
- the gold standard spanspredictions
- the predicted spans
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |