|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gate.util.OntologyMeasures
public class OntologyMeasures
Modified version of Precision and Recall called BDM that takes into account the distance of two concepts in an ontology.
Field Summary | |
---|---|
protected Map<String,Float> |
bdmByConceptsMap
|
protected Map<String,Float> |
bdmByTypeMap
|
protected URL |
bdmFileUrl
|
protected Map<String,AnnotationDiffer> |
differByTypeMap
|
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map<String,Float> bdmByTypeMap
protected URL bdmFileUrl
protected Map<String,AnnotationDiffer> differByTypeMap
protected Map<String,Float> bdmByConceptsMap
Constructor Detail |
---|
public OntologyMeasures()
public OntologyMeasures(Collection<OntologyMeasures> measures)
measures
- collection to be regrouped in one OntologyMeasuresMethod Detail |
---|
public void calculateBdm(Collection<AnnotationDiffer> differs)
differs
- annotation differ for the type and for possible
miscategorized types.public double getPrecisionStrictBdm(String type)
type
- annotation type
public 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 file
public List<String> getMeasuresRow(Object[] measures, String title)
public Map<String,AnnotationDiffer> getDifferByTypeMap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |