public class OntologyMeasures extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<String,Float> |
bdmByConceptsMap |
protected Map<String,Float> |
bdmByTypeMap |
protected URL |
bdmFileUrl |
protected Map<String,AnnotationDiffer> |
differByTypeMap |
Constructor and Description |
---|
OntologyMeasures() |
OntologyMeasures(Collection<OntologyMeasures> measures)
Constructor to be used when you have a collection of OntologyMeasures
and want to consider it as only one OntologyMeasures.
|
Modifier and Type | Method and Description |
---|---|
void |
calculateBdm(Collection<AnnotationDiffer> differs)
For a document get the annotation differs that contain the type to compare
and the annotation differs that may have miscategorized annotations
for this type.
|
Map<String,AnnotationDiffer> |
getDifferByTypeMap()
Be careful, don't modify it.
|
double |
getFMeasureAverageBdm(double beta)
Gets the average of strict and lenient F-Measure values.
|
double |
getFMeasureAverageBdm(String type,
double beta) |
double |
getFMeasureLenientBdm(double beta) |
double |
getFMeasureLenientBdm(String type,
double beta) |
double |
getFMeasureStrictBdm(double beta) |
double |
getFMeasureStrictBdm(String type,
double beta) |
List<String> |
getMeasuresRow(Object[] measures,
String title) |
double |
getPrecisionAverageBdm()
Gets the average of the strict and lenient precision values.
|
double |
getPrecisionAverageBdm(String type) |
double |
getPrecisionLenientBdm() |
double |
getPrecisionLenientBdm(String type) |
double |
getPrecisionStrictBdm() |
double |
getPrecisionStrictBdm(String type)
AP = (sum of BDMs for BDM-matching pair spurious/missing + Correct)
/ (Correct + Spurious)
|
double |
getRecallAverageBdm()
Gets the average of the strict and lenient recall values.
|
double |
getRecallAverageBdm(String type) |
double |
getRecallLenientBdm() |
double |
getRecallLenientBdm(String type) |
double |
getRecallStrictBdm() |
double |
getRecallStrictBdm(String type) |
Map<String,Float> |
read(URL bdmFile)
Read the BDM scores from a file.
|
void |
setBdmFile(URL url) |
protected URL bdmFileUrl
protected Map<String,AnnotationDiffer> differByTypeMap
public OntologyMeasures()
public OntologyMeasures(Collection<OntologyMeasures> measures)
measures
- collection to be regrouped in one OntologyMeasurespublic void calculateBdm(Collection<AnnotationDiffer> differs)
differs
- annotation differ for the type and for possible
miscategorized types.public double getPrecisionStrictBdm(String type)
type
- annotation typepublic double getPrecisionStrictBdm()
public double getRecallStrictBdm(String type)
public double getRecallStrictBdm()
public double getFMeasureStrictBdm(String type, double beta)
public double getFMeasureStrictBdm(double beta)
public double getPrecisionLenientBdm(String type)
public double getPrecisionLenientBdm()
public double getRecallLenientBdm(String type)
public double getRecallLenientBdm()
public double getFMeasureLenientBdm(String type, double beta)
public double getFMeasureLenientBdm(double beta)
public double getPrecisionAverageBdm(String type)
public double getPrecisionAverageBdm()
public double getRecallAverageBdm(String type)
public double getRecallAverageBdm()
public double getFMeasureAverageBdm(String type, double beta)
public double getFMeasureAverageBdm(double beta)
beta
- The relative weight of precision and recall. A value of 1
gives equal weights to precision and recall. A value of 0 takes the recall
value completely out of the equation.public void setBdmFile(URL url)
public Map<String,Float> read(URL bdmFile)
bdmFile
- URL of the BDM filepublic Map<String,AnnotationDiffer> getDifferByTypeMap()
Copyright © 2024 GATE. All rights reserved.