|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EmpiricalDistribution
Represents an empirical probability distribution -- a probability distribution derived from observed data without making any assumptions about the functional form of the population distribution that the data come from.
Implementations of this interface maintain data structures, called distribution digests, that describe empirical distributions and support the following operations:
EmpiricalDistribution
implementations to
build grouped frequency histograms representing the input data or to
generate random values "like" those in the input file -- i.e., the values
generated will follow the distribution of the values in the file.
Method Summary | |
---|---|
int |
getBinCount()
Returns the number of bins. |
java.util.List |
getBinStats()
Returns a list of SummaryStatistics
containing statistics describing the values in each of the bins. |
double |
getNextValue()
Generates a random value from this distribution. |
StatisticalSummary |
getSampleStats()
Returns a StatisticalSummary
describing this distribution. |
double[] |
getUpperBounds()
Returns the array of upper bounds for the bins. |
boolean |
isLoaded()
Property indicating whether or not the distribution has been loaded. |
void |
load(double[] dataArray)
Computes the empirical distribution from the provided array of numbers. |
void |
load(java.io.File file)
Computes the empirical distribution from the input file. |
void |
load(java.net.URL url)
Computes the empirical distribution using data read from a URL. |
Method Detail |
---|
void load(double[] dataArray)
dataArray
- the data arrayvoid load(java.io.File file) throws java.io.IOException
file
- the input file
java.io.IOException
- if an IO error occursvoid load(java.net.URL url) throws java.io.IOException
url
- url of the input file
java.io.IOException
- if an IO error occursdouble getNextValue() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if the distribution has not been loadedStatisticalSummary getSampleStats() throws java.lang.IllegalStateException
StatisticalSummary
describing this distribution.
Preconditions:
java.lang.IllegalStateException
- if the distribution has not been loadedboolean isLoaded()
int getBinCount()
java.util.List getBinStats()
SummaryStatistics
containing statistics describing the values in each of the bins. The
List is indexed on the bin number.
double[] getUpperBounds()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |