public class PValueComputation extends Object
Arrays.sort(double[])| Constructor and Description |
|---|
PValueComputation() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getBorder(double[] sortedScores,
double pValue)
This method finds the first index that has a significant score.
|
static int |
getIndex(double[] sortedScores,
double myScore)
This method searches in
sortedScores for the index
i so that
sortedScores[i-1] < myScore <= sortedScores[i]. |
static int |
getIndex(double[] sortedScores,
double myScore,
int start)
This method searches in
sortedScores beginning at
start for the index i so that
sortedScores[i-1] < myScore <= sortedScores[i]. |
static double |
getPValue(double[] sortedScores,
double myScore)
This method searches for the insertion point of the score in a given
sorted array of scores and returns the p-value for this score.
|
static double |
getPValue(double[] sortedScores,
double myScore,
int start)
This method searches for the insertion point of the score in a given
sorted array of scores from index
start and returns the
p-value for this score. |
static double |
getThreshold(double[] sortedScores,
int signIndex)
This method returns the threshold that determines if an observed score is
significant.
|
public static final double getPValue(double[] sortedScores,
double myScore)
sortedScores - the array of sorted scoresmyScore - the score that is searched in the array and that corresponds
to the p-valueArrays.sort(double[]),
getIndex(double[], double)public static final double getPValue(double[] sortedScores,
double myScore,
int start)
start and returns the
p-value for this score.sortedScores - the array of sorted scoresmyScore - the score that is searched in the array and that corresponds
to the p-valuestart - the start position in the array where to start the search
(accelerates the search)Arrays.sort(double[]),
getIndex(double[], double, int)public static final int getIndex(double[] sortedScores,
double myScore)
sortedScores for the index
i so that
sortedScores[i-1] < myScore <= sortedScores[i]. This
index could be seen as insertion point for myScore.sortedScores - the array of sorted scoresmyScore - the current scoremyScore should be insertedArrays.sort(double[]),
getIndex(double[], double, int)public static final int getIndex(double[] sortedScores,
double myScore,
int start)
sortedScores beginning at
start for the index i so that
sortedScores[i-1] < myScore <= sortedScores[i]. This
index could be seen as insertion point for myScore.sortedScores - the array of sorted scoresmyScore - the current scorestart - the start index (inclusive)myScore should be insertedArrays.sort(double[])public static final int getBorder(double[] sortedScores,
double pValue)
sortedScores - the array of sorted scorespValue - the p-value that is used to determine what is significant and
what not (the smaller, the more significant)Arrays.sort(double[])public static final double getThreshold(double[] sortedScores,
int signIndex)
sortedScores - the array of sorted scoressignIndex - the index of the first significant score