JMSLTM Numerical Library 6.1

com.imsl.stat
Interface ProbabilityDistribution

All Superinterfaces:
Distribution, Serializable
All Known Implementing Classes:
GammaDistribution, LogNormalDistribution, NormalDistribution, PoissonDistribution

public interface ProbabilityDistribution
extends Distribution, Serializable

Public interface for a user-supplied probability distribution.

The purpose of this interface is to evaluate the probability density of a given set of data by either fitting the probability density function to the data or by evaluating the probability density function with supplied parameters. Both eval methods return the probability density at each value of the given set of data. After the probability distribution is fitted to the data, the GetParameters method can be used to return the distribution parameters used to fit the probability density function to the data.

The DataMining package class NaiveBayesClassifier uses an implementation of ProbabilityDistribution to train continuous data.

See Also:
Example

Method Summary
 double[] eval(double[] xData, Object[] parameters)
          Evaluates the user-supplied probability density of each value in xData using the supplied probability distribution parameters.
 double eval(double xData, Object[] parameters)
          Evaluation method for the user-supplied distribution function and parameters.
 Object[] getParameters()
          Returns the current parameters of the probability density function.
 
Methods inherited from interface com.imsl.stat.Distribution
eval
 

Method Detail

eval

double[] eval(double[] xData,
              Object[] parameters)
Evaluates the user-supplied probability density of each value in xData using the supplied probability distribution parameters.

Parameters:
xData - a double array containing the points at which the probability density function is to be evaluated
parameters - an Object array containing the probability distribution parameters to be used in evaluating xData, see method getParameters
Returns:
a double array representing the probability density of each value in xData

eval

double eval(double xData,
            Object[] parameters)
Evaluation method for the user-supplied distribution function and parameters. Evaluates the user-supplied probability density at xData using the supplied probability distribution parameters.

Parameters:
xData - a double scalar value containing the point the distribution function is to evaluate
parameters - an Object array containing the probability distribution parameters to be used in evaluating xData. See method getParameters.
Returns:
a double scalar value representing the probability density at xData

getParameters

Object[] getParameters()
Returns the current parameters of the probability density function.

Returns:
an Object 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.

JMSLTM Numerical Library 6.1

Copyright © 1970-2010 Visual Numerics, Inc.
Built July 30 2010.