java.lang.Object
riso.distributions.AbstractDistribution
riso.distributions.Mixture
riso.distributions.MixGaussians
- All Implemented Interfaces:
- ConditionalDistribution, Distribution, java.io.Serializable
- public class MixGaussians
- extends Mixture
This class represents an additive mixture of Gaussian densities.
There is little added functionality; the main thing is the name
guarantees that all mixture components are Gaussian.
The descriptive data which can be changed without causing the interface
functions to break down is public. The other data is protected.
Included in the public data are the regularization parameters.
|
Constructor Summary |
MixGaussians()
Constructs an empty Gaussian mixture. |
MixGaussians(Gaussian p)
This constructs a 1-component mixture from a Gaussian. |
MixGaussians(int ndimensions,
int ncomponents)
Constructs a new Gaussian mixture with the specified number of
dimensions and components. |
| Methods inherited from class riso.distributions.Mixture |
cdf, clone, expected_value, flatten, format_string, ncomponents, ndimensions, p, random, remove_components, responsibility, sqrt_variance, update |
| Methods inherited from class riso.distributions.AbstractDistribution |
effective_support, get_density, get_nstates, log_p, log_prior, ndimensions_child, ndimensions_parent, p, parse_string, pretty_output, random, set_variable, toString |
MixGaussians
public MixGaussians()
- Constructs an empty Gaussian mixture.
MixGaussians
public MixGaussians(int ndimensions,
int ncomponents)
- Constructs a new Gaussian mixture with the specified number of
dimensions and components. Components can be set up one by one
since Mixture.components is public.
This constructor allocates the arrays to which member variables
refer, and fills them with neutral values; the components
array is filled with new Gaussian instances with zero mean
and unit variance (in the specified number of dimensions).
MixGaussians
public MixGaussians(Gaussian p)
- This constructs a 1-component mixture from a Gaussian.
The p reference is COPIED, not cloned.
pretty_input
public void pretty_input(riso.general.SmarterTokenizer st)
throws java.io.IOException
- Read a description of this density model from an input stream.
This is intended for input from a human-readable source; this is
different from object serialization.
- Overrides:
pretty_input in class Mixture
reduce_mixture
public void reduce_mixture(int max_ncomponents,
double KL_epsilon)
- Trims down the number of components in this mixture by removing
some and modifying the parameters of others.
mixture_product
public static MixGaussians mixture_product(MixGaussians[] mixtures)
- Computes a Gaussian mixture from the product of a set of
Gaussian mixtures. Note that this is NOT THE SAME as computing a
mixture for the product of variables with mixture densities.
product_inner_loop
static void product_inner_loop(MixGaussians[] mixtures,
MixGaussians product,
int[] k,
int[] l,
int m)
compute_one_product
static void compute_one_product(MixGaussians[] mixtures,
MixGaussians product,
int[] k,
int[] l)
initial_mix
public MixGaussians initial_mix(double[] support)
- Just returns a clone of this Gaussian mixture.
- Specified by:
initial_mix in interface Distribution- Overrides:
initial_mix in class Mixture
convert_mixture
public static MixGaussians convert_mixture(Mixture mix)
throws java.lang.IllegalArgumentException
- Converts a Mixture consisting entirely of Gaussian into a MixGaussian.