Eclipse
IntelliJ
NetBeans
XpoLog
Upload
API List
Favorites
Packages
Classes
Methods
Limit search to favorites
Recent
Register
Login
Classic Mode
Library:
Apache Jakarta Commons Math 1.1
Package:
org.apache.commons.math.random
Class
public
class
EmpiricalDistributionImpl
implements
Serializable
,
EmpiricalDistribution
Overview
Inheritance
Members
Usage
Source
Books
Since
Not specified.
Version
$Revision:
Author(s)
Not specified.
Implements
EmpiricalDistribution
interface. This implementation uses what amounts to the
Variable Kernel Method
with Gaussian smoothing:
Digesting the input file
Pass the file once to compute min and max.
Divide the range from min-max into
binCount
"bins."
Pass the data file again, computing bin counts and univariate statistics (mean, std dev.) for each of the bins
Divide the interval (0,1) into subintervals associated with the bins, with the length of a bin's subinterval proportional to its count.
Generating random values from the distribution
Generate a uniformly distributed value in (0,1)
Select the subinterval to which the value belongs.
Generate a random Gaussian value with mean = mean of the associated bin and std dev = std dev of associated bin.
USAGE NOTES:
The
binCount
is set by default to 1000. A good rule of thumb is to set the bin count to approximately the length of the input file divided by 10.
The input file
must
be a plain text file containing one valid numeric entry per line.
Wiki javadoc
Use
textile entry format
.
Add your comments here.
NOTE: Usage information is based only on libraries in your favorites list.
In Constructors
In Fields
Returned by
As method parameter
Home
-
About
-
FAQ
-
Privacy
-
Contact
EmpiricalDistributioninterface. This implementation uses what amounts to the Variable Kernel Method with Gaussian smoothing:Digesting the input file
- Pass the file once to compute min and max.
- Divide the range from min-max into
- Pass the data file again, computing bin counts and univariate
statistics (mean, std dev.) for each of the bins
- Divide the interval (0,1) into subintervals associated with the bins,
with the length of a bin's subinterval proportional to its count.
Generating random values from the distributionbinCount"bins."USAGE NOTES:
binCountis set by default to 1000. A good rule of thumb is to set the bin count to approximately the length of the input file divided by 10.