|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.classifiers.utils.PValueComputation
public class PValueComputation
This class can be used to compute any p-value from a given statistic. Therefore the array of scores has to be sorted.
Arrays.sort(double[])| Constructor Summary | |
|---|---|
PValueComputation()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PValueComputation()
| Method Detail |
|---|
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-value
Arrays.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 score
myScore 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||