public abstract class ProbabilityDistribution extends Object implements Serializable, Cloneable
| Modifier | Constructor and Description |
|---|---|
protected |
ProbabilityDistribution(int numberOfParameters)
Constructor for the probability distribution
|
| Modifier and Type | Method and Description |
|---|---|
int |
getNumberOfParameters()
Returns the number of parameters of the probability distribution.
|
abstract double[] |
getParameterLowerBounds()
Returns the lower bounds of the parameters.
|
abstract double[] |
getParameterUpperBounds()
Returns the upper bounds of the parameters.
|
double[] |
getPDFGradientApproximation(double x,
double[] params)
Returns the approximate gradient of the probability density function,
pdf. |
double[][] |
getPDFHessianApproximation(double x,
double[] params)
Returns the approximate hessian of the probability density function,
pdf. |
double[] |
getRangeOfX()
Returns the proper range of the random variable having the current
probability distribution.
|
abstract double |
pdf(double x,
double[] params)
Returns the value of the probability density function.
|
void |
setRangeOfX(double[] range)
Sets the proper range of the random variable having the current
probability distribution.
|
protected ProbabilityDistribution(int numberOfParameters)
numberOfParameters - an int specifying the number of
parameters
Every subclass (specific probability distribution) must set the number of parameters.
public int getNumberOfParameters()
int, the number of parameterspublic abstract double[] getParameterLowerBounds()
Each ProbabilityDistribution subclass must override this
method.
double array containing the lower bounds of the
parameterspublic abstract double[] getParameterUpperBounds()
Each ProbabilityDistribution subclass must override this
method.
double array containing the upper bounds of the
parameterspublic double[] getPDFGradientApproximation(double x,
double[] params)
pdf.x - a double valueparams - a double array containing the parameter valuesdouble array containing the gradient approximation
for the value and parameterspublic double[][] getPDFHessianApproximation(double x,
double[] params)
pdf.x - a double valueparams - a double array containing the parameter valuesdouble matrix equal to the second partial
derivatives of the probability density function with respect to the
parameters evaluated at X = xpublic double[] getRangeOfX()
double array containing the lower bound (at index
0) and upper bound (at index 1) for the random variable Xpublic abstract double pdf(double x,
double[] params)
Each ProbabilityDistribution subclass must override this
method.
x - a double valueparams - a double array containing the parameter values
The actual interface for params must use ellipses, as in
double... params. This allows for different
types of signatures in each specific density function.
double value equal to the probability density
function given the parameters evaluated at X = xpublic void setRangeOfX(double[] range)
range - a double array containing the lower bound (at
index 0) and the upper bound (at index 1) for the random variable
Default: range[0]=Double.NEGATIVE_INFINITY and
range[1]=Double.POSITIVE_INFINITY.
Copyright © 1970-2015 Rogue Wave Software
Built March 24 2015.