public class ClassificationMeasures extends Object
Constructor and Description |
---|
ClassificationMeasures() |
ClassificationMeasures(Collection<ClassificationMeasures> tables)
Given a list of ClassificationMeasures, this will combine to make
a megatable.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public ClassificationMeasures()
public ClassificationMeasures(Collection<ClassificationMeasures> tables)
tables
- tables to combinepublic 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 titleCopyright © 2024 GATE. All rights reserved.