public abstract class StatUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static double[] |
CRITICAL
Critical value used for Chi^2 test.
|
| Constructor and Description |
|---|
StatUtils() |
| Modifier and Type | Method and Description |
|---|---|
static double[][] |
chi2(double[][][] M,
double[][][] Exp)
Chi^2 - Chi-squared test.
|
static double[][] |
chi2(weka.core.Instances D)
Chi^2 - Do the chi-squared test on all pairs of labels.
|
static double |
chi2(weka.core.Instances Y,
int j,
int k)
Chi^2 - Do the chi-squared test on the j-th and k-th labels in Y.
|
static double[][] |
condDepMatrix(weka.core.Instances D,
Result result)
CondDepMatrix - Get a Conditional Dependency Matrix.
|
static double[][] |
F(weka.core.Instances D)
F - Relative frequency matrix (between p(j),p(k) and p(j,k)) in dataset D.
|
static int[][] |
getApproxC(weka.core.Instances D)
GetApproxP - A fast version of getC(D), based on frequent sets.
|
static double[][] |
getApproxP(weka.core.Instances D)
GetApproxP - A fast version of getP(D), based on frequent sets.
|
static int[][] |
getC(weka.core.Instances D)
GetC - Get pairwise co-ocurrence counts from the training data D.
|
static double[][] |
getP(weka.core.Instances D)
GetP - Get a pairwise empirical joint-probability matrix P[][] from dataset D.
|
static double[][] |
getP(int[][] C,
int N) |
static double[][] |
H(weka.core.Instances D)
H - Get a Conditional Entropy Matrix.
|
static double[][] |
H(int[][] C,
int N)
H - Get a Conditional Entropy Matrix.
|
static double |
H(int[][] C,
int j,
int k,
int Ncount)
H - Conditional Entropy H(y_j|y_k).
|
static double[][] |
I(double[][] P)
I - Mutual Information -- fast version, must calcualte P[][] = getP(D) first.
|
static double |
I(double[][] P,
int j,
int k)
I - Mutual Information.
|
static double[][] |
I(weka.core.Instances D,
int L)
I - Get an Unconditional Depndency Matrix.
|
static double |
I(weka.core.Instances D,
int j,
int k)
I - Mutual Information.
|
static double[][] |
I(int[][] C,
int N)
I - Get a Mutual Information Matrix.
|
static double |
I(int[][] C,
int j,
int k,
int Ncount)
I - Mutual Information I(y_j;y_k).
|
static double[][] |
jPMF(weka.core.Instances D,
int j,
int k)
jPMF - Joint PMF.
|
static double[][][] |
jPMF(weka.core.Instances D,
int j,
int k,
int l)
Joint Distribution.
|
static double[][] |
LEAD(weka.core.Instances D,
weka.classifiers.Classifier h,
Random r)
LEAD - Performs LEAD on dataset 'D', using BR with base classifier 'h', under random seed 'r'.
|
static double[][] |
LEAD(weka.core.Instances D,
weka.classifiers.Classifier h,
Random r,
String MDType) |
static double[][] |
LEAD(weka.core.Instances D,
Result result) |
static double[][] |
LEAD(weka.core.Instances D,
Result R,
String MDType)
LEAD - Performs LEAD on dataset 'D', with corresponding gresult 'R', and dependency measurement type 'MDType'.
|
static double[][] |
LEAD2(weka.core.Instances D,
Result result)
LEAD.
|
static void |
main(String[] args)
Main - do some tests.
|
static double[][] |
margDepMatrix(weka.core.Instances D,
String op)
MargDepMatrix - Get an Unconditional Depndency Matrix.
|
static double[] |
P(double[][] Y,
int[] x)
P - Empirical prior.
|
static double[] |
P(double[][] Y,
int[] j,
int[] x)
P - Empirical prior.
|
static double |
p(double[][] Y,
int j,
int k)
p - Empirical prior.
|
static double |
P(double[][] Y,
int j,
int v,
int k,
int w)
P - Empirical joint.
|
static double |
P(weka.core.Instances D,
int[] j,
int[] v)
P - Empirical joint.
|
static double |
p(weka.core.Instances D,
int j,
int j_)
p - Empirical prior.
|
static double |
P(weka.core.Instances D,
int j,
int v,
int k,
int w)
p - Empirical joint.
|
public static double[] P(double[][] Y,
int[] x)
Y - label matrixx - label valuespublic static double[] P(double[][] Y,
int[] j,
int[] x)
Y - label matrixx - label valuesj - label indicespublic static double p(double[][] Y,
int j,
int k)
Y - label matrixj - label indexk - label valuepublic static double p(weka.core.Instances D,
int j,
int j_)
D - Instancesj - label indexj_ - label valuepublic static double P(double[][] Y,
int j,
int v,
int k,
int w)
Y - label matrixj - 1st label indexv - 1st label valuek - 2nd label indexw - 2nd label valuepublic static double P(weka.core.Instances D,
int j,
int v,
int k,
int w)
D - Instancesj - 1st label indexv - 1st label valuek - 2nd label indexw - 2nd label valuepublic static double P(weka.core.Instances D,
int[] j,
int[] v)
D - Instancesj - label indices, e.g., 1,2,3v - label values, e.g., 0,0,1public static double[][] jPMF(weka.core.Instances D,
int j,
int k)
public static double[][][] jPMF(weka.core.Instances D,
int j,
int k,
int l)
public static double[][] getP(weka.core.Instances D)
public static int[][] getApproxC(weka.core.Instances D)
public static double[][] getApproxP(weka.core.Instances D)
public static double[][] getP(int[][] C,
int N)
public static int[][] getC(weka.core.Instances D)
public static double I(int[][] C,
int j,
int k,
int Ncount)
C - count matrixj - j-th label indexk - k-th label indexNcount - number of instances in the training setpublic static double H(int[][] C,
int j,
int k,
int Ncount)
C - count matrixj - j-th label indexk - k-th label indexNcount - number of instances in the training setpublic static double[][] I(double[][] P)
I(double[][], int, int)public static double I(double[][] P,
int j,
int k)
public static double I(weka.core.Instances D,
int j,
int k)
public static double[][] I(weka.core.Instances D,
int L)
D - datasetL - number of labelspublic static double chi2(weka.core.Instances Y,
int j,
int k)
public static double[][] chi2(weka.core.Instances D)
D - datasetchi2(Instances, int, int)public static double[][] chi2(double[][][] M,
double[][][] Exp)
M - measured joint P(Y_1,Y_2)Exp - expect joint P(Y_1)P(Y_2) given null hypothesispublic static double[][] margDepMatrix(weka.core.Instances D,
String op)
D - datasetop - how we will measure the dependencypublic static double[][] I(int[][] C,
int N)
public static double[][] H(int[][] C,
int N)
public static double[][] H(weka.core.Instances D)
public static double[][] F(weka.core.Instances D)
public static double[][] condDepMatrix(weka.core.Instances D,
Result result)
D - datasetpublic static double[][] LEAD2(weka.core.Instances D,
Result result)
public static double[][] LEAD(weka.core.Instances D,
Result R,
String MDType)
public static double[][] LEAD(weka.core.Instances D,
Result result)
public static double[][] LEAD(weka.core.Instances D,
weka.classifiers.Classifier h,
Random r)
throws Exception
Exceptionpublic static double[][] LEAD(weka.core.Instances D,
weka.classifiers.Classifier h,
Random r,
String MDType)
throws Exception
ExceptionCopyright © 2017. All Rights Reserved.