edu.cmu.minorthird.classify.transform
Class ContingencyTable
java.lang.Object
edu.cmu.minorthird.classify.transform.ContingencyTable
public class ContingencyTable
- extends java.lang.Object
- Author:
- Vitor Carvalho
March 2005
A 2-by-2 matrix indicating the association between 2 variables.
Useful in feature selection or feature association experiments.
Contains scores for Chi-Squared, Pointwise Mutual-Information,
Compensated Pointwise Mutual Info
Given 2 variables X and Y, the matrix is
[a b] a = X and Y ; b = X and Not Y
[c d] c = Not X and Y; d = Not X and Not Y
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ContingencyTable
public ContingencyTable(long a,
long b,
long c,
long d)
getChiSquared
public double getChiSquared()
getPMutualInfo
public double getPMutualInfo()
getCompensatedPMutualInfo
public double getCompensatedPMutualInfo(int count)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
total
public long total()
main
public static void main(java.lang.String[] args)