Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.encog.ml.hmm.distributions
Class DiscreteDistribution

    java.lang.Object
      org.encog.ml.hmm.distributions.DiscreteDistribution

All Implemented Interfaces:
  Serializable, Cloneable, StateDistribution

    public class DiscreteDistribution

extends Object
implements StateDistribution

A discrete distribution is a distribution with a finite set of states that it can be in.

See Also:
  Serialized Form

Constructor Summary
`DiscreteDistribution(double[][] theProbabilities)` Construct a discrete distribution with the specified probabilities.
`DiscreteDistribution(int[] cx)` Construct a discrete distribution.

Method Summary
`DiscreteDistribution` | `clone()`
`void` | `fit(MLDataSet co)` Fit this distribution to the specified data.
`void` | `fit(MLDataSet co, double[] weights)` Fit this distribution to the specified data, with weights.
`MLDataPair` | `generate()` Generate a random sequence.
`double[][]` | `getProbabilities()`
`double` | `probability(MLDataPair o)` Determine the probability of the specified data pair.

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DiscreteDistribution

    public DiscreteDistribution(double[][] theProbabilities)

  Construct a discrete distribution with the specified probabilities.

  Parameters:
    `theProbabilities` - The probabilities.

### DiscreteDistribution

    public DiscreteDistribution(int[] cx)

  Construct a discrete distribution.

  Parameters:
    `cx` - The count of each.

Method Detail

### clone

    public DiscreteDistribution clone()

  Specified by:
    `clone` in interface `StateDistribution`
  Overrides:
    `clone` in class `Object`
  Returns:
    A clone of the distribution.

### fit

    public void fit(MLDataSet co)

  Fit this distribution to the specified data.

  Specified by:
    `fit` in interface `StateDistribution`
  Parameters:
    `co` - THe data to fit to.

### fit

    public void fit(MLDataSet co,
                    double[] weights)

  Fit this distribution to the specified data, with weights.

  Specified by:
    `fit` in interface `StateDistribution`
  Parameters:
    `co` - The data to fit to.
    `weights` - The weights.

### generate

    public MLDataPair generate()

  Generate a random sequence.

  Specified by:
    `generate` in interface `StateDistribution`
  Returns:
    The next element.

### probability

    public double probability(MLDataPair o)

  Determine the probability of the specified data pair.

  Specified by:
    `probability` in interface `StateDistribution`
  Parameters:
    `o` - THe data pair.
  Returns:
    The probability.

### getProbabilities

    public double[][] getProbabilities()

  Returns:
    The state probabilities.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012. All Rights Reserved.