edu.stanford.nlp.stats
Class AccuracyStats<L>

java.lang.Object
  extended by 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

Constructor Summary
AccuracyStats(L posLabel, String saveFile)
           
AccuracyStats(ProbabilisticClassifier<L,F> classifier, GeneralDataset<L,F> data, L posLabel)
           
 
Method Summary
 String getDescription(int numDigits)
           
<F> double
score(ProbabilisticClassifier<L,F> classifier, GeneralDataset<L,F> data)
           
static String toStringArr(int[] acc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccuracyStats

public AccuracyStats(ProbabilisticClassifier<L,F> classifier,
                     GeneralDataset<L,F> data,
                     L posLabel)

AccuracyStats

public AccuracyStats(L posLabel,
                     String saveFile)
Method Detail

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