|
JMSLTM Numerical Library 6.1 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.imsl.stat.GammaDistribution
public class GammaDistribution
Evaluates a gamma probability density for a given set of data.
GammaDistribution evaluates the gamma density of a given
set of data, xData. If parameters are not supplied, the
Eval method fits the gamma probability density function to
the data by first calculating the shape and scale parameters using an MLE
technique for a best fit. The gamma probability density function is defined
as:
![]()
The DataMining package class NaiveBayesClassifier
uses GammaDistribution as a method to train continuous data.
| Constructor Summary | |
|---|---|
GammaDistribution()
|
|
| Method Summary | |
|---|---|
double[] |
eval(double[] xData)
Fits a gamma probability distribution to xData and
returns the probability density at each value. |
double[] |
eval(double[] xData,
Object[] parameters)
Evaluates a gamma probability distribution with a given set of parameters at each point in xData and returns the
probability density at each value. |
double |
eval(double xData,
Object[] parameters)
Evaluates a gamma probability density at a given point xData. |
Object[] |
getParameters()
Returns the current parameters of the gamma probability density function. |
double |
getScaleParameter()
Returns the maximum-likelihood estimate found for the gamma scale parameter. |
double |
getShapeParameter()
Returns the maximum-likelihood estimate found for the gamma shape parameter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GammaDistribution()
| Method Detail |
|---|
public double[] eval(double[] xData)
xData and
returns the probability density at each value.
eval in interface DistributionxData - a double array representing the points at
which the gamma probability distribution function is to
be evaluated
double array representing the gamma probability
density at each value of xData
public double[] eval(double[] xData,
Object[] parameters)
xData and returns the
probability density at each value.
eval in interface ProbabilityDistributionxData - a double array representing the points at
which the gamma probability distribution function is to
be evaluatedparameters - an Object array representing the
parameters used to evaluate the gamma distribution,
see method getParameters
double array representing the gamma probability
density at each value of xData
public double eval(double xData,
Object[] parameters)
xData.
eval in interface ProbabilityDistributionxData - a double representing the point at which the
gamma probability distribution function is to be evaluatedparameters - an Object array representing the
parameters used to evaluate the gamma distribution,
see method getParameters
double representing the gamma probability
density at xDatapublic Object[] getParameters()
getParameters in interface ProbabilityDistributionObject array containing the parameters
resulting from the last invocation of the
(Distribution) eval method with
the following signature, double[] eval(double[] xData).
This Object array can be used as input
to the eval methods that require an
Object array of distribution parameters
as input.public double getScaleParameter()
double representing the maximum-likelihood
estimate found for the gamma scale parameterpublic double getShapeParameter()
double representing the maximum-likelihood
estimate found for the gamma shape parameter
|
JMSLTM Numerical Library 6.1 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||