|
|||||||||
| Home >> All >> riso >> [ distributions overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
riso.distributions
Class OuterProduct

java.lang.Objectriso.distributions.AbstractDistribution
riso.distributions.OuterProduct
- All Implemented Interfaces:
- ConditionalDistribution, Distribution, java.io.Serializable
- public class OuterProduct
- extends AbstractDistribution
An instance of this class represents an outer product of distributions, that is, a distribution which has a density of the form
p(x) = \prod_i p_i(x[j_i])where j_i is a subset of the indices 0,1,2,...,x.length-1, with all subsets disjoint.
| Field Summary | |
(package private) Distribution[] |
distributions
|
(package private) int[][] |
subsets
|
| Fields inherited from class riso.distributions.AbstractDistribution |
associated_variable |
| Constructor Summary | |
OuterProduct()
Constructs an empty outer product of distributions. |
|
| Method Summary | |
double[] |
effective_support(double epsilon)
Returns an interval which contains almost all of the mass of this distribution. |
double |
expected_value()
Returns the expected value of this distribution. |
java.lang.String |
format_string(java.lang.String leading_ws)
Formats a string representation of this distribution. |
double |
log_prior()
Computes the log of the prior probability of the parameters of this distribution, assuming some prior distribution has been established. |
static void |
main(java.lang.String[] args)
|
int |
ndimensions()
Returns the number of dimensions in which this distribution lives. |
double |
p(double[] x)
Compute the density at the point x. |
void |
pretty_input_component(riso.general.SmarterTokenizer st,
java.util.Vector subsets,
java.util.Vector distributions)
|
void |
pretty_input(riso.general.SmarterTokenizer st)
Read an instance of this distribution from an input stream. |
double[] |
random()
Returns 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)
Uses data to modify the parameters of the distribution. |
double |
weighted_nll(double[][] x,
double[] responsibility)
Computes the negative log likelihood, weighting each case by the responsibility. |
| Methods inherited from class riso.distributions.AbstractDistribution |
cdf, clone, get_density, get_nstates, initial_mix, log_p, ndimensions_child, ndimensions_parent, p, parse_string, pretty_output, random, set_variable, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
subsets
int[][] subsets
distributions
Distribution[] distributions
| Constructor Detail |
OuterProduct
public OuterProduct()
- Constructs an empty outer product of distributions.
| Method Detail |
ndimensions
public int ndimensions()
- Returns the number of dimensions in which this distribution lives.
- Specified by:
ndimensionsin interfaceDistribution- Overrides:
ndimensionsin classAbstractDistribution
p
public double p(double[] x)
throws java.lang.Exception
- Compute 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.
- Specified by:
log_priorin interfaceDistribution- Overrides:
log_priorin classAbstractDistribution
random
public double[] random()
throws java.lang.Exception
- Returns an instance of a random variable from this distribution.
- Specified by:
randomin interfaceDistribution- Overrides:
randomin classAbstractDistribution
update
public double update(double[][] x,
double[] responsibility,
int niter_max,
double stopping_criterion)
throws java.lang.Exception
- Uses data to modify the parameters of the distribution.
Split up the data by column subsets, and hand off each subset to the
corresponding component to do its own update.
- Specified by:
updatein interfaceDistribution- Overrides:
updatein classAbstractDistribution
weighted_nll
public double weighted_nll(double[][] x,
double[] responsibility)
throws java.lang.Exception
- Computes the negative log likelihood, weighting each case by the responsibility.
expected_value
public double expected_value()
throws java.lang.Exception
- Returns the expected value of this distribution.
- Specified by:
expected_valuein interfaceDistribution- Overrides:
expected_valuein classAbstractDistribution
sqrt_variance
public double sqrt_variance()
throws java.lang.Exception
- Returns the square root of the variance of this distribution.
- Specified by:
sqrt_variancein interfaceDistribution- Overrides:
sqrt_variancein classAbstractDistribution
effective_support
public double[] effective_support(double epsilon)
throws java.lang.Exception
- Returns an interval which contains almost all of the mass of this
distribution. NOT IMPLEMENTED !!!
- Specified by:
effective_supportin interfaceDistribution- Overrides:
effective_supportin classAbstractDistribution
format_string
public java.lang.String format_string(java.lang.String leading_ws) throws java.io.IOException
- Formats a string representation of this distribution.
- Specified by:
format_stringin interfaceConditionalDistribution- Overrides:
format_stringin classAbstractDistribution
pretty_input
public void pretty_input(riso.general.SmarterTokenizer st) throws java.io.IOException
- Read an instance of this distribution from an input stream.
This is intended for input from a human-readable source; this is
different from object serialization.
- Overrides:
pretty_inputin classAbstractDistribution
pretty_input_component
public void pretty_input_component(riso.general.SmarterTokenizer st, java.util.Vector subsets, java.util.Vector distributions) throws java.io.IOException
main
public static void main(java.lang.String[] args)
|
|||||||||
| Home >> All >> riso >> [ distributions overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC