L
- The type of the label(s) in each DatumF
- The type of the features in each Datumpublic interface Classifier<L,F>
extends java.io.Serializable
RVFClassifier
.Modifier and Type | Method and Description |
---|---|
L |
classOf(Datum<L,F> example) |
default double |
evaluateAccuracy(GeneralDataset<L,F> testData)
Evaluate the accuracy of this classifier on the given dataset.
|
default Pair<java.lang.Double,java.lang.Double> |
evaluatePrecisionAndRecall(GeneralDataset<L,F> testData,
L targetLabel)
Evaluates the precision and recall of this classifier against a dataset, and the target label.
|
java.util.Collection<L> |
labels() |
Counter<L> |
scoresOf(Datum<L,F> example) |
java.util.Collection<L> labels()
default Pair<java.lang.Double,java.lang.Double> evaluatePrecisionAndRecall(GeneralDataset<L,F> testData, L targetLabel)
testData
- The dataset to evaluate the classifier on.targetLabel
- The target label (e.g., for relation extraction, this is the relation we're interested in).default double evaluateAccuracy(GeneralDataset<L,F> testData)
testData
- The dataset to evaluate the classifier on.