|
BIJ API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--bijnum.BIJstats
BIJ statistical methods inherited from MatLab. Syntax is as close as possible to matlab. Copyright (c) 1999-2003, Michael Abramoff. All rights reserved.
Field Summary | |
static float |
CI95
Conversion from standard error to confidence intervals at different significance levels. |
static float |
CI99
|
static float |
CI99_9
|
Constructor Summary | |
BIJstats()
|
Method Summary | |
static float |
accuracy(float[] exp,
float[] truth,
int c)
Compute accuracy of a test for which the result is in exp and the ground truth in truth, for class c. |
static float |
accuracyMultipleClasses(float[] exp,
float[] truth,
int n)
Compute the accuracy of a test of which the result is in exp and the ground truth in truth, where test results in multiple classifications. |
static float |
avg(float[] v)
Compute average of all values in vector v. |
static float |
avg(float[] v,
float[] mask)
|
static float |
avgNoExtremes(float[] v,
float nrstddev)
|
static int |
binIndex(int[] histogram,
float fraction)
Compute the lowest bin into which the highest p percent of occurrences falls. |
static float |
correl(float[] a,
float[] b)
Compute the correlation of a vector with another vector b. |
static float[][] |
covariance(float[][] m,
boolean doShowProgress)
Compute the covariance matrix for a matrix of size NxM. |
static double |
erf(double x)
Compute the erf of x. |
static int[] |
histogram(float[] v,
float min,
float d,
int n)
Compute a histogram with n bins for the vector v, each bin separated by d. |
static float |
mean(float[][] m)
|
static float[] |
meanColumn(float[][] m)
|
static float[] |
meanColumnT(float[][] m)
|
static float |
mse(float[] a,
float[] b)
Compute Mean Square Error (or residual) of vectors a and b. |
static int |
n(float[] v)
|
static int |
n(float[] v,
float[] mask)
|
static float[] |
randomFraction(float[] v,
double fraction)
Randomly sample a fraction of the elements of vector v. |
static float |
rmse(float[] a,
float[] b)
Compute Root Mean Square Error of vectors a and b. |
static double |
sem(double avg,
double avg0,
double stderr0,
double avg1,
double stderr1)
Compute the combined standard error of the mean of the two standard errors stderr0 and stderr1 and corresponding averages avg0 and avg1. |
static double |
sem(float[] v)
sem(1) computes the standard error of the mean of the elements of v. |
static double |
sem(float[] v,
float[] mask)
sem(2) computes the standard error of the mean of the elements of v only where the mask value is not 0. |
static float[] |
sensitivities(float[] exp,
float[] truth,
int n)
Compute the sensitivities of a test of which the result is in exp and the ground truth in truth, for all classes n that occur in truth. |
static float |
sensitivity(float[] exp,
float[] truth,
int c)
Compute sensitivity of a test of which the result is in exp and the ground truth in truth, for class c. |
static float[] |
specificities(float[] exp,
float[] truth,
int n)
Compute the specificities of a test of which the result is in exp and the ground truth in truth, for all classes n that occur in truth. |
static float |
specificity(float[] exp,
float[] truth,
int c)
Compute specificity of a test of which the result is in exp and the ground truth in truth, for class c. |
static float[] |
spectrum(float[] v)
Compute the spectrum of v. |
static float |
stdev(float[] v)
Compute stdev (SQRT(var)) of all values in vector v. |
static float |
stdev(float[] v,
float[] mask)
stdev(2) computes the stddev of the elements of only where the mask value is not 0. |
static double |
sum(double[] v)
Compute average of all values in vector v. |
static double |
sum(float[] v)
sum(1) computes average of all values in vector v. |
static double |
sum(float[] v,
float[] mask)
sum(2) computes the sum of the elements of vector v only where the mask value is not 0. |
static float |
thresholdFraction(float[] v,
double fraction)
|
static float |
thresholdFraction(float[] v,
float fraction)
Find the value in vector over which fraction of all values in vector lie. |
static float |
ttest(float[] data1,
float[] data2)
Perform Student's t-test on two data sets data1 and data2, with the the t values into t and the probabilities into prob. |
static float[] |
unitvar(float[] v)
Make a new vector of v that has zero mean and unit variance. |
static float |
var(float[] v)
Compute variance of all elements in vector v. |
static double[] |
zeromean(double[] v)
Zero the mean of all elements of v. |
static float[] |
zeromean(float[] v)
Zero the mean of all elements of v. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static float CI95
public static float CI99
public static float CI99_9
Constructor Detail |
public BIJstats()
Method Detail |
public static float[][] covariance(float[][] m, boolean doShowProgress)
m
- a matrix of float[N][M]public static int n(float[] v)
public static int n(float[] v, float[] mask)
public static float avg(float[] v, float[] mask)
public static float stdev(float[] v, float[] mask)
v
- a float[] vector.mask
- a float[] with a value of ! 0 for all elements of v that are valid.public static double sem(float[] v)
v
- a float[] vector.public static double sem(float[] v, float[] mask)
v
- a float[] vector.mask
- a float[] with a value of ! 0 for all elements of v that are valid.public static double sem(double avg, double avg0, double stderr0, double avg1, double stderr1)
avg
- the average of the combination (avg0/avg1)avg0,
- stderr0 average and standard deviation of first component.avg1,
- stderr1 average and standard deviation of second component.public static float avgNoExtremes(float[] v, float nrstddev)
public static float[] meanColumnT(float[][] m)
public static float[] meanColumn(float[][] m)
public static float mean(float[][] m)
public static float avg(float[] v)
v
- a vector of float[]public static double sum(float[] v)
v
- a vector of float[]public static double sum(float[] v, float[] mask)
v
- a float[] vector.mask
- a float[] with a value of ! 0 for all elements of v that are valid.public static double sum(double[] v)
v
- a vector of float[]public static float var(float[] v)
v
- a vector of float[]public static float[] unitvar(float[] v)
v
- a float[] vectorpublic static double[] zeromean(double[] v)
v
- a vector.public static float[] zeromean(float[] v)
v
- a vector.public static float stdev(float[] v)
v
- a vector of float[]public static float thresholdFraction(float[] v, double fraction)
public static float thresholdFraction(float[] v, float fraction)
vector
- a vector of valuesfraction
- a float [0-1].public static int[] histogram(float[] v, float min, float d, int n)
v
- a float[] vectormin
- the lowest value for the first bin.d
- the difference in value between each binn
- the number of bins.public static int binIndex(int[] histogram, float fraction)
histogram
- an int[] with the ouccrence counts for each binp
- the fraction of histogram values desired.public static float correl(float[] a, float[] b)
a
- a float[] vector.b
- a float[] vector of same length.public static float[] spectrum(float[] v)
v
- a float[] vectorpublic static double erf(double x)
x
- the argumentpublic static float mse(float[] a, float[] b) throws java.lang.IllegalArgumentException
a
- a float[] vectorb
- a float[] vector.public static float rmse(float[] a, float[] b) throws java.lang.IllegalArgumentException
a
- a float[] vectorb
- a float[] vector.public static float ttest(float[] data1, float[] data2)
data1
- array of datapointsdata2
- array of datapointst
- prob
- public static float[] randomFraction(float[] v, double fraction)
v
- a vectorfraction
- the fraction of elements from v to be included.public static float[] sensitivities(float[] exp, float[] truth, int n) throws java.lang.IllegalArgumentException
exp
- an int[] vector of test results, where 0 <= exp[n] < n.truth
- an int[] vector of ground truth, where 0 <= truth[n] < n.n
- the number of classes to determine the sensitivity for.public static float[] specificities(float[] exp, float[] truth, int n) throws java.lang.IllegalArgumentException
exp
- an int[] vector of test results, where 0 <= exp[n] < n.truth
- an int[] vector of ground truth, where 0 <= truth[n] < n.n
- the number of classes to determine the sensitivity for.public static float accuracyMultipleClasses(float[] exp, float[] truth, int n) throws java.lang.IllegalArgumentException
exp
- an int[] vector of test results, where 0 <= exp[n] < n.truth
- an int[] vector of ground truth, where 0 <= truth[n] < n.n
- the number of classes to determine the sensitivity for.public static float sensitivity(float[] exp, float[] truth, int c) throws java.lang.IllegalArgumentException
exp
- a float[] vector of test results, where 0 <= exp[n] <= c.truth
- a float[] vector of ground truth, where 0 <= truth[n] <= c.c
- the class to determine sensitivity for.public static float specificity(float[] exp, float[] truth, int c) throws java.lang.IllegalArgumentException
exp
- an int[] vector of test results, where 0 <= exp[n] <= c.truth
- an int[] vector of ground truth, where 0 <= truth[n] <= c.c
- the class to determine specificity for.public static float accuracy(float[] exp, float[] truth, int c) throws java.lang.IllegalArgumentException
exp
- a float[] vector of test results, where 0 <= exp[n] <= c.truth
- a float[] vector of ground truth, where 0 <= truth[n] <= c.c
- the class to determine accuracy for.
|
BIJ API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |