|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gate.util.ClassificationMeasures
public class ClassificationMeasures
Given two annotation sets, a type and a feature, compares the feature values. It finds matching annotations and treats the feature values as classifications. Its purpose is to calculate the extent of agreement between the feature values in the two annotation sets. It computes observed agreement and Kappa measures.
Constructor Summary | |
---|---|
ClassificationMeasures()
|
|
ClassificationMeasures(Collection<ClassificationMeasures> tables)
Given a list of ClassificationMeasures, this will combine to make a megatable. |
Method Summary | |
---|---|
void |
calculateConfusionMatrix(AnnotationSet aS1,
AnnotationSet aS2,
String type,
String feature,
boolean verbose)
Create a confusion matrix in which annotations of identical span bearing the specified feature name are compared in terms of feature value. |
protected void |
computeKappaPairwise()
Compute Cohen's and Pi kappas for two annotators. |
float |
getAgreedTrials()
Gets the number of annotations for which the two annotation sets are in agreement with regards to the annotation type. |
float[][] |
getConfusionMatrix()
To understand exactly which types are being confused with which other types you will need to view this array in conjunction with featureValues, which gives the class labels (annotation types) in the correct order. |
List<List<String>> |
getConfusionMatrix(String title)
|
SortedSet<String> |
getFeatureValues()
This is necessary to make sense of the confusion matrix. |
float |
getKappaCohen()
Kappa is defined as the observed agreements minus the agreement expected by chance. |
float |
getKappaPi()
Kappa is defined as the observed agreements minus the agreement expected by chance. |
List<String> |
getMeasuresRow(Object[] measures,
String documentName)
|
float |
getObservedAgreement()
Portion of the instances on which the annotators agree. |
float |
getTotalTrials()
Gets the total number of annotations in the two sets. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassificationMeasures()
public ClassificationMeasures(Collection<ClassificationMeasures> tables)
tables
- tables to combineMethod Detail |
---|
public float getObservedAgreement()
public float getKappaCohen()
public float getKappaPi()
public float[][] getConfusionMatrix()
public SortedSet<String> getFeatureValues()
public void calculateConfusionMatrix(AnnotationSet aS1, AnnotationSet aS2, String type, String feature, boolean verbose)
aS1
- annotation set to compare to the secondaS2
- annotation set to compare to the firsttype
- annotation type containing the features to comparefeature
- feature name whose values will be comparedverbose
- message error output when ignoring annotationsprotected void computeKappaPairwise()
public float getAgreedTrials()
public float getTotalTrials()
public List<List<String>> getConfusionMatrix(String title)
title
- matrix title
public List<String> getMeasuresRow(Object[] measures, String documentName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |