|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcsli.util.stat.ClassificationAgreement
public class ClassificationAgreement
Calculates agreement and evaluation statistics for classification annotations. Currently, methods support only two-way comparison, though they support any number of possible classes. In cases where a comparison is being made between a reference and hypothesized classification, the first dimension of the matrix should refer to the reference classification, and the second dimension the hypothesized classification.
| Constructor Summary | |
|---|---|
ClassificationAgreement()
|
|
| Method Summary | |
|---|---|
static boolean |
checkTable(int[][] cTable)
Checks to see if the contingency table is properly formed, i.e. |
static void |
compareFiles(File f1,
File f2)
Read in two files to compare, with possibly multiple columns of data which will be compared separately |
static int |
correct(int[][] cTable)
Return the total number of agreeing classifications. |
static double |
error(int[][] cTable)
Evaluates the error between two n-class classifications. |
static double |
fscore(int[][] cTable)
Evaluates the positive fscore of a binary classification ref/hyp contingency table. |
static double |
fscore(int[][] cTable,
int cls)
Evaluates the fscore for a particular class in a ref/hyp contingency table. |
static int |
hypClassSum(int[][] cTable,
int c)
Sum the number of classifications the refernce annotation made for a given class. |
static double |
kappaCohen(int[][] cTable)
Evaluates n-class kappa between two annotations, using the cohen chance calculation. |
static double |
kappaSiegel(int[][] cTable)
Evaluates n-class kappa between two annotations, using the siegel chance calculation. |
static void |
main(String[] args)
For testing purposes. |
static int[][] |
makeTable(int[] ref,
int[] hyp,
int numClasses)
Make a contingency table from two classification arrays, reference and hypoethsized, with the specified number of possible target classes. |
static double |
precision(int[][] cTable)
Evaluates positive precision in a binary-classification ref/hyp contingency table. |
static double |
precision(int[][] cTable,
int val)
Evaluates the precision of a specified class in a multi-class classification. |
static void |
printTable(int[][] cTable)
|
static double |
recall(int[][] cTable)
Evaluates positive recall in a binary classification ref/hyp contingency table. |
static double |
recall(int[][] cTable,
int val)
Evaluates the recall of particular class in a multi-class classification. |
static int |
refClassSum(int[][] cTable,
int c)
Sum the number of classifications the reference annotation made for the given class. |
static int |
sum(int[][] cTable)
Calculate the total number of data-points in the table. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassificationAgreement()
| Method Detail |
|---|
public static boolean checkTable(int[][] cTable)
public static int correct(int[][] cTable)
public static double error(int[][] cTable)
public static double fscore(int[][] cTable)
public static double fscore(int[][] cTable,
int cls)
public static int hypClassSum(int[][] cTable,
int c)
public static double kappaCohen(int[][] cTable)
public static double kappaSiegel(int[][] cTable)
public static void main(String[] args)
public static int[][] makeTable(int[] ref,
int[] hyp,
int numClasses)
public static double precision(int[][] cTable)
public static double precision(int[][] cTable,
int val)
public static double recall(int[][] cTable)
public static double recall(int[][] cTable,
int val)
public static int refClassSum(int[][] cTable,
int c)
public static int sum(int[][] cTable)
public static void printTable(int[][] cTable)
public static void compareFiles(File f1,
File f2)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||