Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

riso.distributions
Interface Distribution  view Distribution download Distribution.java

All Superinterfaces:
ConditionalDistribution
All Known Subinterfaces:
Delta, LocationScaleDensity, Translatable
All Known Implementing Classes:
AbstractDistribution, DiscreteDelta, Gaussian, GaussianDelta, SplineDensity

public interface Distribution
extends ConditionalDistribution

Interface for all unconditional distribution models. Note that an unconditional distribution is a special kind of conditional distribution.


Method Summary
 double cdf(double x)
          Compute the cumulative distribution function.
 double[] effective_support(double epsilon)
          Returns the support of this distribution, if it is a finite interval; otherwise returns an interval which contains almost all of the mass.
 double expected_value()
          Returns the expected value of this distribution.
 MixGaussians initial_mix(double[] support)
          Returns a Gaussian mixture which is a reasonable initial approximation to this distribution.
 double log_p(double[] x)
          Compute the logarithm of the density at the point x.
 double log_prior()
          Computes the log of the prior probability of the parameters of this distribution, assuming some prior distribution has been established.
 int ndimensions()
          Return the number of dimensions in which this distribution lives.
 double p(double[] x)
          Compute the density at the point x.
 double[] random()
          Return an instance of a random variable from this distribution.
 double sqrt_variance()
          Returns the square root of the variance of this distribution.
 double update(double[][] x, double[] responsibility, int niter_max, double stopping_criterion)
          Use data to modify the parameters of the distribution.
 
Methods inherited from interface riso.distributions.ConditionalDistribution
clone, format_string, get_density, get_nstates, ndimensions_child, ndimensions_parent, p, parse_string, random, set_variable
 

Method Detail

ndimensions

public int ndimensions()
Return the number of dimensions in which this distribution lives.


cdf

public double cdf(double x)
           throws java.lang.Exception
Compute the cumulative distribution function.


p

public double p(double[] x)
         throws java.lang.Exception
Compute the density at the point x.


log_p

public double log_p(double[] x)
             throws java.lang.Exception
Compute the logarithm of the density at the point x.


log_prior

public double log_prior()
                 throws java.lang.Exception
Computes the log of the prior probability of the parameters of this distribution, assuming some prior distribution has been established. This may not be meaningful for all distributions.


random

public double[] random()
                throws java.lang.Exception
Return an instance of a random variable from this distribution.


update

public double update(double[][] x,
                     double[] responsibility,
                     int niter_max,
                     double stopping_criterion)
              throws java.lang.Exception
Use data to modify the parameters of the distribution. Classes which implement this method will typically use maximum likelihood or a similar approach to fit the parameters to the data.


expected_value

public double expected_value()
                      throws java.lang.Exception
Returns the expected value of this distribution.


sqrt_variance

public double sqrt_variance()
                     throws java.lang.Exception
Returns the square root of the variance of this distribution.


effective_support

public double[] effective_support(double epsilon)
                           throws java.lang.Exception
Returns the support of this distribution, if it is a finite interval; otherwise returns an interval which contains almost all of the mass.


initial_mix

public MixGaussians initial_mix(double[] support)
                         throws java.lang.Exception
Returns a Gaussian mixture which is a reasonable initial approximation to this distribution. The initial approximation should be further adjusted before using it to compute probabilities and what-not; the initial mixture can be a very rough approximation.