public class ConfusionMatrixGenerator extends Object
Classifier
Modifier and Type | Class and Description |
---|---|
static class |
ConfusionMatrixGenerator.ConfusionMatrix
a confusion matrix, backed by a
Map representing the linearized matrix |
Modifier and Type | Method and Description |
---|---|
static <T> ConfusionMatrixGenerator.ConfusionMatrix |
getConfusionMatrix(IndexReader reader,
Classifier<T> classifier,
String classFieldName,
String textFieldName,
long timeoutMilliseconds)
get the
ConfusionMatrixGenerator.ConfusionMatrix of a given Classifier ,
generated on the given IndexReader , class and text fields. |
public static <T> ConfusionMatrixGenerator.ConfusionMatrix getConfusionMatrix(IndexReader reader, Classifier<T> classifier, String classFieldName, String textFieldName, long timeoutMilliseconds) throws IOException
ConfusionMatrixGenerator.ConfusionMatrix
of a given Classifier
,
generated on the given IndexReader
, class and text fields.T
- the return type of the ClassificationResult
returned by the given Classifier
reader
- the IndexReader
containing the index used for creating the Classifier
classifier
- the Classifier
whose confusion matrix has to be generatedclassFieldName
- the name of the Lucene field used as the classifier's outputtextFieldName
- the nome the Lucene field used as the classifier's inputtimeoutMilliseconds
- timeout to wait before stopping creating the confusion matrixConfusionMatrixGenerator.ConfusionMatrix
IOException
- if problems occurr while reading the index or using the classifierCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.