public class SectorEvaluation extends AnnotatorEvaluation
AnnotatorEvaluation.Measure| Modifier and Type | Field and Description |
|---|---|
protected int |
countPredictions |
protected int |
countSections |
protected boolean |
enableSegmentationEval |
protected boolean |
enableSegmentEval |
protected boolean |
enableSentenceEval |
protected static org.slf4j.Logger |
log |
protected SegmentationEvaluation |
segmentationEval |
protected ClassificationEvaluation |
segmentClassEval |
protected ClassificationEvaluation |
sentenceClassEval |
protected Class |
targetEncoderClass |
countAnnotations, countDocs, countExamples, countSentences, countTokens, expectedSource, experimentName, predictedSource| Constructor and Description |
|---|
SectorEvaluation(String experimentName,
Annotation.Source expected,
Annotation.Source predicted)
Initialize evaluation for segmentation only
|
SectorEvaluation(String experimentName,
Annotation.Source expected,
Annotation.Source predicted,
LookupCacheEncoder targetEncoder)
Initialize evaluation for classification and segmentation
|
| Modifier and Type | Method and Description |
|---|---|
void |
calculateScores(Collection<Document> docs)
Evaluate the whole SECTOR model.
|
double |
getScore()
Return the MAP score from this Evaluation run.
|
static String |
printDatasetStats(Dataset dataset)
Print out some stats about the Dataset.
|
String |
printEvaluationStats()
Print out the Evaluation results table.
|
String |
printSingleClassStats()
Print out Evaluation results table for single classes.
|
static String |
printSingleClassStats(ClassificationEvaluation eval) |
SectorEvaluation |
withMergeEnabled(boolean enabled)
Enable/disable merging adjacent sections with same label into one (in both GOLD and PRED).
|
SectorEvaluation |
withRecalculateK(boolean enabled)
Enable/disable recalculation of K for each document in the evaluation.
|
SectorEvaluation |
withSegmentationEvaluation(boolean enable)
Enable/disable evaluation for segmentation (Pk/WD).
|
SectorEvaluation |
withSegmentClassEvaluation(boolean enable)
Enable/disable evaluation for segment-based classification (Prec/Rec/F1).
|
SectorEvaluation |
withSentenceClassEvaluation(boolean enable)
Enable/disable evaluation for sentence-based classification (Prec/Rec/F1).
|
calculateScores, countAnnotations, countDocuments, countExamples, countSentences, countTokens, div, fDbl, fInt, fStrprotected static final org.slf4j.Logger log
protected boolean enableSentenceEval
protected boolean enableSegmentEval
protected boolean enableSegmentationEval
protected int countSections
protected int countPredictions
protected ClassificationEvaluation sentenceClassEval
protected ClassificationEvaluation segmentClassEval
protected SegmentationEvaluation segmentationEval
protected Class targetEncoderClass
public SectorEvaluation(String experimentName, Annotation.Source expected, Annotation.Source predicted, LookupCacheEncoder targetEncoder)
public SectorEvaluation(String experimentName, Annotation.Source expected, Annotation.Source predicted)
public SectorEvaluation withSentenceClassEvaluation(boolean enable)
public SectorEvaluation withSegmentationEvaluation(boolean enable)
public SectorEvaluation withSegmentClassEvaluation(boolean enable)
public SectorEvaluation withRecalculateK(boolean enabled)
public SectorEvaluation withMergeEnabled(boolean enabled)
public void calculateScores(Collection<Document> docs)
calculateScores in class AnnotatorEvaluationpublic double getScore()
getScore in class AnnotatorEvaluationpublic static String printDatasetStats(Dataset dataset)
public String printEvaluationStats()
printEvaluationStats in class AnnotatorEvaluationpublic String printSingleClassStats()
public static String printSingleClassStats(ClassificationEvaluation eval)
Copyright © 2019. All rights reserved.