|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--MJAbase | +--MJAmath
MAExplorer Open Java class to access MJAmath methods and data structures. This provides access to builtin math methods
List of methods available to Plugin-writers
get_okBetaCF() return true if nr_betacf() was ok get_okBetaI() return true if if nr_betai() was ok get_okProbKS() return true if nr_probks() was ok get_dKS() return K-S statistic for Kolmogorov-Smirnov stat d & prob get_probKS() return probability of null hypoth same distrib for K-S stat get_nXY() return # of genes used in calcXYstat computation get_rSq() return correlation coefficient get_mnX() return mean X get_mnY() return mean Y get_sdX() return standard deviation X get_sdY() return standard deviation Y nr_gammln() - Return ln(gamma()) of x by polynomial evaluation. nr_betacf() - evaluation fct for the incomplete Beta function 'x(a,b). nr_betai() - return the incomplete Beta function 'x(a,b). nr_sort() - quick-sort of bin of data[1:n] in assend. numerical order. nr_kstwo() - Kolmogorov-Smirnov stat d & prob of the null hypothesis of nr_probks() - Calc Kolmogorov-Smirnov probability Qks. calcXYstat() - statistics string for display euclideanDistance() - compute Euclidean distance of 2 vectors cityBlockDistance() - compute city-block distance of 2 vectors calcPearsonCorrCoef() - compute Pearson correlation coefficient log2Zero() - compute log2((x==0.0 ? 0.0 : x) - avoids log2(0.0)! log2() - compute log(x) base 2. alog2() - compute alog(x) base 2. logZero() - compute log10((x==0.0 ? 0.0 : x) - avoids log(0.0)! log10() - compute log(x) base 10. alog10() - compute alog(x) base 10.
This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file.
Method Summary | |
double |
alog10(double x)
alog10() - compute alog(x) base 10. |
double |
alog2(double x)
alog2() - compute alog(x) base 2. |
float |
calcPearsonCorrCoef(float[] data1,
float[] data2,
int n,
boolean usePopulationCovar)
calcPearsonCorrCoef() - compute Pearson correlation coefficient The data is data1[0:n-1] and data2[0:n-1]. |
java.lang.String |
calcXYstat(int n,
float[] xList,
float[] yList,
int[] propList,
java.lang.String xLbl,
java.lang.String yLbl)
calcXYstat() - compute correlation statistics string for display rSq=.., n=.., X(mn+-sd)=(..+-..), Y(mn+-sd)=(..+-..) If propList[] is not null, then test if filtered using IS_FILTERED property. |
float |
cityBlockDistance(float[] data1,
float[] data2,
int n,
boolean rtnAbsSumFlag)
cityBlockDistance() - compute city-block distance of 2 vectors. |
float |
euclideanDistance(float[] data1,
float[] data2,
int n,
boolean rtnDistSqFlag)
euclideanDistance() - compute Euclidean distance of 2 vectors as either the Euclidean distance or (sum dist**2). |
double |
get_dKS()
get_dKS() - K-S statistic for Kolmogorov-Smirnov stat d & prob of the null hypothesis of 2 bins of data. |
double |
get_mnX()
get_mnX() - get mean X previously computed |
double |
get_mnY()
get_mnY() - get mean Y previously computed |
int |
get_nXY()
get_nXY() - # of genes used in calcXYstat computation |
boolean |
get_okBetaCF()
get_okBetaCF() - test if nr_betaCF() was ok |
boolean |
get_okBetaI()
get_okBetaI() - test if nr_betai() was ok |
boolean |
get_okProbKS()
get_okProbKS() - test if Kolmogorov-Smirnov test was ok |
double |
get_probKS()
get_probKS() - probability of null hypoth same distrib for previously computed Kolmogorov-Smirnov stat d & prob of the null hypothesis of 2 bins of data. |
double |
get_rSq()
get_rSq() - get correlation coefficient previously computed |
double |
get_sdX()
get_sdX() - get standard deviation X previously computed |
double |
get_sdY()
get_sdY() - get standard deviation Y previously computed |
double |
log10(double x)
log10() - compute log(x) base 10. |
double |
log2(double x)
log2() - compute log(x) base 2. |
double |
log2Zero(double x)
log2Zero() - compute log2((x==0.0 ? 0.0 : x) - avoids log2(0.0)! This defaults log2(0.0) to log2(1.0). |
double |
logZero(double x)
logZero() - compute log10((x==0.0 ? 0.0 : x) - avoids log(0.0)! This defaults log10(0.0) to log(1.0). |
double |
nr_betacf(double a,
double b,
double x)
nr_betacf() - evaluation fct for the incomplete Beta function 'x(a,b). |
double |
nr_betai(double a,
double b,
double x)
nr_betai() - return the incomplete Beta function 'x(a,b). |
double |
nr_gammln(double xx)
nr_gammln() - Return ln(gamma()) of x by polynomial evaluation. |
boolean |
nr_kstwo(double[] data1,
int n1,
double[] data2,
int n2)
nr_kstwo() - Kolmogorov-Smirnov statistic d and the probability of the null hypothesis of 2 bins of data. |
double |
nr_probks(double alam)
nr_probks() - Calc Kolmogorov-Smirnov probability Qks. |
boolean |
nr_sort(int n,
double[] data)
nr_sort() - quick-sort of bin of data[1:n] in assend. |
Methods inherited from class MJAbase |
cvtHashtable2SimpleTable, cvtTable2Hashtable |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public final boolean get_okBetaCF()
nr_betacf(double, double, double)
public final boolean get_okBetaI()
nr_betai(double, double, double)
public final boolean get_okProbKS()
nr_kstwo(double[], int, double[], int)
,
nr_probks(double)
public final double get_dKS()
nr_kstwo(double[], int, double[], int)
public final double get_probKS()
public final int get_nXY()
public final double get_rSq()
calcXYstat(int, float[], float[], int[], java.lang.String, java.lang.String)
public final double get_mnX()
calcXYstat(int, float[], float[], int[], java.lang.String, java.lang.String)
public final double get_mnY()
calcXYstat(int, float[], float[], int[], java.lang.String, java.lang.String)
public final double get_sdX()
calcXYstat(int, float[], float[], int[], java.lang.String, java.lang.String)
public final double get_sdY()
calcXYstat(int, float[], float[], int[], java.lang.String, java.lang.String)
public final double nr_gammln(double xx)
xx
- argpublic final double nr_betacf(double a, double b, double x)
a
- argb
- argx
- argpublic final double nr_betai(double a, double b, double x)
a
- - a parameter of 'x(a,b)b
- - b parameter of 'x(a,b)x
- - x parameter of 'x(a,b)public final boolean nr_sort(int n, double[] data)
n
- is the amount of data.data
- is the set of data [1:n].public final boolean nr_kstwo(double[] data1, int n1, double[] data2, int n2)
data1
- [1:n1] data1n2
- # of items in data 1data1
- [1:n2] data2n2
- # of items in data 2dKS - K-S statistic, and probKS - probl of null hypoth same distribution
public final double nr_probks(double alam)
alam
- the value computed in kstwo().public final java.lang.String calcXYstat(int n, float[] xList, float[] yList, int[] propList, java.lang.String xLbl, java.lang.String yLbl)
rSq - string "rSq=.., n=.., X(mn+-sd)=(..+-..), Y(mn+-sd)=(..+-..)" nXY - # of data points mnX - mean X value mnY - mean Y value sdX - std deviation of X values sdY - std deviation of Y values
n
- size of listsxList
- is X class datayList
- is Y class datapropList
- is properties dataxLbl
- is label for the X datayLbl
- is label for the Y datapublic final float euclideanDistance(float[] data1, float[] data2, int n, boolean rtnDistSqFlag)
data1
- is vector [0:n-1] of object 1data2
- is vector [0:n-1] of object 2n
- is size of vectorrtnDistSqFlag
- return (sum dist**2) else Euclidean distance.public final float cityBlockDistance(float[] data1, float[] data2, int n, boolean rtnAbsSumFlag)
data1
- is vector [0:n-1] of object 1data2
- is vector [0:n-1] of object 2n
- is size of vectorpublic final float calcPearsonCorrCoef(float[] data1, float[] data2, int n, boolean usePopulationCovar)
data1
- is vector [0:n-1] of object 1data2
- is vector [0:n-1] of object 2n
- is size of vectorusePopulationCovar
- flag to compute popuplation covariance
(Weinstein) U. Scherf, Nat.Genetics (2000) 24:236-244, pg 243.
else use version for large samples in Snedecore & Cochran 1st
Edition page 175.public final double log2Zero(double x)
x
- argument for log2public final double log2(double x)
x
- argument for log2public final double alog2(double x)
x
- argument for alogpublic final double logZero(double x)
x
- argument for logpublic final double log10(double x)
x
- argument for logpublic final double alog10(double x)
x
- argument for alog
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |