edu.stanford.nlp.stats
Class AccuracyStats<L>
java.lang.Object
edu.stanford.nlp.stats.AccuracyStats<L>
- All Implemented Interfaces:
- Scorer<L>
public class AccuracyStats<L>
- extends Object
- implements Scorer<L>
Utility class for aggregating counts of true positives, false positives, and
false negatives and computing precision/recall/F1 stats. Can be used for a single
collection of stats, or to aggregate stats from a bunch of runs.
- Author:
- Kristina Toutanova, Jenny Finkel
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AccuracyStats
public AccuracyStats(ProbabilisticClassifier<L,F> classifier,
GeneralDataset<L,F> data,
L posLabel)
AccuracyStats
public AccuracyStats(L posLabel,
String saveFile)
score
public <F> double score(ProbabilisticClassifier<L,F> classifier,
GeneralDataset<L,F> data)
- Specified by:
score
in interface Scorer<L>
getDescription
public String getDescription(int numDigits)
- Specified by:
getDescription
in interface Scorer<L>
toStringArr
public static String toStringArr(int[] acc)
Stanford NLP Group