use of edu.stanford.nlp.coref.statistical.EvalUtils.B3Evaluator in project CoreNLP by stanfordnlp.
the class Clusterer method evaluatePolicy.
private double evaluatePolicy(List<ClustererDoc> docs, boolean training) {
isTraining = 0;
B3Evaluator evaluator = new B3Evaluator();
for (ClustererDoc doc : docs) {
State currentState = new State(doc);
while (!currentState.isComplete()) {
currentState.doBestAction(classifier);
}
currentState.updateEvaluator(evaluator);
}
isTraining = 1;
double score = evaluator.getF1();
Redwood.log("scoref.train", String.format("B3 F1 score on %s: %.4f", training ? "train" : "validate", score));
return score;
}
Aggregations