|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectutil.gen.Histogram
Generates histograms.
Constructor Summary | |
Histogram(double[] scores,
int numberOfBins,
double tailTrimFraction)
Given an array of scores, creates a histogram of set number of bins, trims tails by a set fraction of the data. |
|
Histogram(double minimum,
double maximum,
int numberOfBins)
|
Method Summary | |
void |
count(double value)
Increments the proper bin. |
void |
countAll(double[] values)
Counts all the values incrementing the proper bin. |
void |
countAll(float[] values)
Counts all the values incrementing the proper bin. |
int[][] |
fetchCenteredFowardAndReverseCounts()
Returns two columns as int[columns][counts] centered on max value with zeros as filler. |
int |
findBinHits(double value)
Given a value, finds the corresponding bin and returns the number of hits to that bin. |
int |
findBinIndex(double value)
Returns the index of the containing bin or -1 if value is too small or big. |
int[] |
getBinCounts()
|
java.lang.String[] |
getBinLabels()
|
double |
getIncrement()
|
double |
getMaximum()
|
double |
getMinimum()
|
int |
getNumberOfBins()
|
int |
getNumLessThanMin()
|
int |
getNumMoreThanMax()
|
int[] |
getReversedBinCounts()
|
double |
getTotalBinCounts()
Including num less than and num more than. |
void |
makeBins()
|
double |
numberBinHitsToLeftAndIncludingValue(double value)
Returns number of bin hits in the bins to the right of the value's bin including the numMoreThanMax. |
double |
numberBinHitsToRightAndIncludingValue(double value)
Returns number of bin hits in the bins to the right of the value's bin including the numMoreThanMax. |
double |
numberBinHitsToRightOfValue(double value)
Returns number of bin hits in the bins to the right of the value's bin including the numMoreThanMax. |
void |
printCenteredForwardAndReverseCounts()
Prints two columns, forward counts and reversed counts centered on max value with zeros as filler. |
static void |
printHistogram(int[] stars)
Prints a simple histogram. |
static long |
printHistogram(int[] realCounts,
int[] stars,
java.lang.String[] binLabels)
Prints a simple histogram scaled using stars but real counts shown. |
static void |
printHistogram(int[] stars,
java.io.PrintWriter out)
Prints a simple histogram to a PrintWriter. |
void |
printScaledHistogram()
Prints scaled histogram. |
double |
pValue(double value)
Returns a two tailed, p value given a threshold. |
double |
pValueLeftSide(double value)
Returns a one tailed, left side, p value given a threshold. |
double |
pValueRightSide(double value)
Returns a one tailed, right side, p value given a threshold. |
void |
setIncrement(double increment)
|
void |
setMaximum(double maximum)
|
void |
setMinimum(double minimum)
|
void |
setNumberOfBins(int numberOfBins)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Histogram(double minimum, double maximum, int numberOfBins)
public Histogram(double[] scores, int numberOfBins, double tailTrimFraction)
Method Detail |
public double pValueRightSide(double value)
public double pValueLeftSide(double value)
public double pValue(double value)
public double numberBinHitsToRightOfValue(double value)
public double numberBinHitsToRightAndIncludingValue(double value)
public double numberBinHitsToLeftAndIncludingValue(double value)
public void makeBins()
public void countAll(float[] values)
public void countAll(double[] values)
public void count(double value)
public int findBinIndex(double value)
public int findBinHits(double value)
public void printScaledHistogram()
public static long printHistogram(int[] realCounts, int[] stars, java.lang.String[] binLabels)
public static void printHistogram(int[] stars, java.io.PrintWriter out)
public int[] getReversedBinCounts()
public double getTotalBinCounts()
public int[] getBinCounts()
public java.lang.String[] getBinLabels()
public int[][] fetchCenteredFowardAndReverseCounts()
public void printCenteredForwardAndReverseCounts()
public static void printHistogram(int[] stars)
public double getIncrement()
public void setIncrement(double increment)
public double getMaximum()
public void setMaximum(double maximum)
public double getMinimum()
public void setMinimum(double minimum)
public int getNumberOfBins()
public void setNumberOfBins(int numberOfBins)
public int getNumLessThanMin()
public int getNumMoreThanMax()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |