L
- The type of the label(s) in each DatumF
- The type of the features in each Datumpublic interface Classifier<L,F> extends 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<Double,Double> |
evaluatePrecisionAndRecall(GeneralDataset<L,F> testData,
L targetLabel)
Evaluates the precision and recall of this classifier against a dataset, and the target label.
|
Collection<L> |
labels() |
Counter<L> |
scoresOf(Datum<L,F> example) |
Collection<L> labels()
default Pair<Double,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.