math_utils
Class staticMathHelperMethods
java.lang.Object
math_utils.staticMathHelperMethods
public class staticMathHelperMethods
- extends java.lang.Object
Method Summary |
static float |
ANOVAstatistic(float[] vals,
int[] borders,
java.util.Map<java.lang.Integer,java.lang.Integer> index2class,
int[] sizes)
|
static double |
Average(double[] a)
|
static float |
Average(float[] a)
|
static float |
Average(float[][] a)
|
static float |
Average(float[] a,
int from,
int to)
|
static int |
binarySearch(float[] arr,
float val)
|
static double |
binomialCoefficient(int n,
int k)
|
static float |
calcROCscore(float[] a,
float[] b)
|
static float[][] |
computePairWiseScoreMatrix(float[][] expressionMatrix,
java.lang.String type)
|
static float[][] |
computePairWiseScoreMatrix(float[][] expressionMatrix,
java.lang.String type,
int from,
int to)
|
static float[] |
computeSortedScoresArray(float[][] correlationMatrix)
|
static void |
copyTwoArrays(float[][] matrix,
int from,
int to,
int i,
int j,
float[] iCopy,
float[] jCopy)
|
static float |
estimateFDRThreshold(float[][] dataMatrix,
float fdr,
float[] realArr,
java.lang.String type,
int from,
int to)
|
static float |
euclideanDistance(float[] a,
float[] b)
|
static float |
euclideanDistance(float[] a,
float[] b,
int from,
int to)
|
static double |
getCDFofBinomialDist(int successes,
int trails,
float p)
|
static double |
getHyperGeometricPval(int successes,
int sampleSize,
int successesInPopulation,
int populationSize)
|
static double |
getHyperGeometricPvalEstimates(int successes,
int sampleSize,
int successesInPopulation,
int populationSize)
|
static float[][] |
getMatrixDeepClone(float[][] mat)
|
static float |
getMaximalSupervisedSimilairtyROCScore(float[] a,
float[] b,
int[] borders,
int[] cSizes,
java.util.Random rand)
|
static float |
getMaximalSupervisedSimilairtyTScore(float[] a,
float[] b,
int[] borders,
int[] cSizes,
java.util.Random rand)
|
static float[] |
getShuffeledCorrelationEstimates(float[][] matrix,
java.lang.String type,
int iterations,
java.util.Random rand,
int from,
int to)
|
static float[] |
getSortedRealScoresSample(float[][] matrix,
float iterations,
java.lang.String type,
boolean dataMatrix)
|
static float[] |
getSortedRealScoresSample(float[][] matrix,
float iterations,
java.lang.String type,
int from,
int to,
boolean dataMatrix)
|
static double |
getTtestPval(double[] arr1,
double[] arr2)
|
static double |
getTtestPval(float[] arr,
int from,
int to)
|
static double |
HGmean(int sampleSize,
int successesInPopulation,
int populationSize)
|
static double |
HGSD(int sampleSize,
int successesInPopulation,
int populationSize)
|
static float |
manhattanDistance(float[] a,
float[] b)
|
static float |
pearsonCorrelation(float[] a,
float[] b)
|
static float |
pearsonCorrelation(float[] a,
float[] b,
float avgA,
float avgB,
float aS,
float bS)
|
static float |
pearsonCorrelation(float[] a,
float[] b,
float avgA,
float avgB,
float aS,
float bS,
int from,
int to)
|
static float |
pearsonCorrelation(float[] a,
float[] b,
int from,
int to)
|
static void |
printMatrix(float[][] m)
|
static float |
robustPearson(float[] a,
float[] b,
int from,
int to)
|
static void |
shuffleArray(java.util.Random rand,
int[] arr)
|
static void |
shuffleArrays(java.util.Random rand,
float[] iCopy,
float[] jCopy)
|
static float |
SpearmanCorrelation(float[] a,
float[] b)
|
static float |
SpearmanCorrelation(float[] a,
float[] b,
int from,
int to)
|
static float |
sStatistic(float[][] a,
float avg)
|
static float |
sStatistic(float[] a,
float avg)
|
static float |
sStatistic(float[] a,
float avg,
int from,
int to)
|
static void |
standardizeByGenes(float[][] matrix)
|
static void |
standardizeByGenes(float[][] matrix,
int[] borders)
|
static double |
variance(double[] a,
double avg)
|
static float |
variance(float[] a,
float avg)
|
static float |
variance(float[] a,
float avg,
int from,
int to)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
staticMathHelperMethods
public staticMathHelperMethods()
pearsonCorrelation
public static float pearsonCorrelation(float[] a,
float[] b)
getTtestPval
public static double getTtestPval(float[] arr,
int from,
int to)
getTtestPval
public static double getTtestPval(double[] arr1,
double[] arr2)
pearsonCorrelation
public static float pearsonCorrelation(float[] a,
float[] b,
int from,
int to)
robustPearson
public static float robustPearson(float[] a,
float[] b,
int from,
int to)
SpearmanCorrelation
public static float SpearmanCorrelation(float[] a,
float[] b)
pearsonCorrelation
public static float pearsonCorrelation(float[] a,
float[] b,
float avgA,
float avgB,
float aS,
float bS)
pearsonCorrelation
public static float pearsonCorrelation(float[] a,
float[] b,
float avgA,
float avgB,
float aS,
float bS,
int from,
int to)
Average
public static float Average(float[] a)
Average
public static float Average(float[][] a)
Average
public static double Average(double[] a)
Average
public static float Average(float[] a,
int from,
int to)
sStatistic
public static float sStatistic(float[] a,
float avg)
sStatistic
public static float sStatistic(float[][] a,
float avg)
variance
public static float variance(float[] a,
float avg)
variance
public static double variance(double[] a,
double avg)
variance
public static float variance(float[] a,
float avg,
int from,
int to)
sStatistic
public static float sStatistic(float[] a,
float avg,
int from,
int to)
euclideanDistance
public static float euclideanDistance(float[] a,
float[] b)
euclideanDistance
public static float euclideanDistance(float[] a,
float[] b,
int from,
int to)
manhattanDistance
public static float manhattanDistance(float[] a,
float[] b)
printMatrix
public static void printMatrix(float[][] m)
binarySearch
public static int binarySearch(float[] arr,
float val)
computePairWiseScoreMatrix
public static float[][] computePairWiseScoreMatrix(float[][] expressionMatrix,
java.lang.String type)
computePairWiseScoreMatrix
public static float[][] computePairWiseScoreMatrix(float[][] expressionMatrix,
java.lang.String type,
int from,
int to)
computeSortedScoresArray
public static float[] computeSortedScoresArray(float[][] correlationMatrix)
copyTwoArrays
public static void copyTwoArrays(float[][] matrix,
int from,
int to,
int i,
int j,
float[] iCopy,
float[] jCopy)
shuffleArrays
public static void shuffleArrays(java.util.Random rand,
float[] iCopy,
float[] jCopy)
shuffleArray
public static void shuffleArray(java.util.Random rand,
int[] arr)
getSortedRealScoresSample
public static float[] getSortedRealScoresSample(float[][] matrix,
float iterations,
java.lang.String type,
int from,
int to,
boolean dataMatrix)
SpearmanCorrelation
public static float SpearmanCorrelation(float[] a,
float[] b,
int from,
int to)
getSortedRealScoresSample
public static float[] getSortedRealScoresSample(float[][] matrix,
float iterations,
java.lang.String type,
boolean dataMatrix)
standardizeByGenes
public static void standardizeByGenes(float[][] matrix,
int[] borders)
standardizeByGenes
public static void standardizeByGenes(float[][] matrix)
getMatrixDeepClone
public static float[][] getMatrixDeepClone(float[][] mat)
estimateFDRThreshold
public static float estimateFDRThreshold(float[][] dataMatrix,
float fdr,
float[] realArr,
java.lang.String type,
int from,
int to)
getShuffeledCorrelationEstimates
public static float[] getShuffeledCorrelationEstimates(float[][] matrix,
java.lang.String type,
int iterations,
java.util.Random rand,
int from,
int to)
binomialCoefficient
public static double binomialCoefficient(int n,
int k)
getHyperGeometricPval
public static double getHyperGeometricPval(int successes,
int sampleSize,
int successesInPopulation,
int populationSize)
HGmean
public static double HGmean(int sampleSize,
int successesInPopulation,
int populationSize)
HGSD
public static double HGSD(int sampleSize,
int successesInPopulation,
int populationSize)
getHyperGeometricPvalEstimates
public static double getHyperGeometricPvalEstimates(int successes,
int sampleSize,
int successesInPopulation,
int populationSize)
getCDFofBinomialDist
public static double getCDFofBinomialDist(int successes,
int trails,
float p)
ANOVAstatistic
public static float ANOVAstatistic(float[] vals,
int[] borders,
java.util.Map<java.lang.Integer,java.lang.Integer> index2class,
int[] sizes)
getMaximalSupervisedSimilairtyTScore
public static float getMaximalSupervisedSimilairtyTScore(float[] a,
float[] b,
int[] borders,
int[] cSizes,
java.util.Random rand)
getMaximalSupervisedSimilairtyROCScore
public static float getMaximalSupervisedSimilairtyROCScore(float[] a,
float[] b,
int[] borders,
int[] cSizes,
java.util.Random rand)
calcROCscore
public static float calcROCscore(float[] a,
float[] b)