org.cogroo.tools.featurizer
Class FeaturizerCrossValidator
java.lang.Object
org.cogroo.tools.featurizer.FeaturizerCrossValidator
public class FeaturizerCrossValidator
- extends Object
Method Summary |
void |
evaluate(opennlp.tools.util.ObjectStream<FeatureSample> samples,
int nFolds)
Starts the evaluation. |
double |
getWordAccuracy()
Retrieves the accuracy for all iterations. |
long |
getWordCount()
Retrieves the number of words which where validated over all iterations. |
FeaturizerCrossValidator
public FeaturizerCrossValidator(String languageCode,
opennlp.tools.util.TrainingParameters params,
FeatureDictionary dict,
String cgFlags,
String factoryClass,
FeaturizerEvaluationMonitor... listeners)
evaluate
public void evaluate(opennlp.tools.util.ObjectStream<FeatureSample> samples,
int nFolds)
throws IOException,
opennlp.tools.util.InvalidFormatException,
IOException
- Starts the evaluation.
- Parameters:
samples
- the data to train and testnFolds
- number of folds
- Throws:
IOException
opennlp.tools.util.InvalidFormatException
getWordAccuracy
public double getWordAccuracy()
- Retrieves the accuracy for all iterations.
- Returns:
- the word accuracy
getWordCount
public long getWordCount()
- Retrieves the number of words which where validated over all iterations.
The result is the amount of folds multiplied by the total number of words.
- Returns:
- the word count
Copyright © 2012-2013 CoGrOO. All Rights Reserved.