org.encog.ml.hmm.distributions
Class ContinousDistribution
- java.lang.Object
-
- org.encog.ml.hmm.distributions.ContinousDistribution
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, StateDistribution
public class ContinousDistribution extends java.lang.Object implements StateDistribution
A continuous distribution represents an infinite range of choices between two real numbers. A gaussian distribution is used to distribute the probability.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ContinousDistribution(double[] mean, double[][] covariance)Construct a continuous distribution.ContinousDistribution(int dimension)Construct a continuous distribution with the specified number of dimensions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ContinousDistributionclone()voidfit(MLDataSet co)Fit this distribution to the specified data set.voidfit(MLDataSet co, double[] weights)Fit this distribution to the specified data set, given the specified weights, per element.MLDataPairgenerate()Generate a random data pair, based on the probabilities.MatrixgetCovariance()double[]getMean()doubleprobability(MLDataPair o)Determine the probability of the specified data pair.voidupdate(double[][] covariance)Update the covariance.
-
-
-
Constructor Detail
-
ContinousDistribution
public ContinousDistribution(double[] mean, double[][] covariance)Construct a continuous distribution.- Parameters:
mean- The mean.covariance- The covariance.
-
ContinousDistribution
public ContinousDistribution(int dimension)
Construct a continuous distribution with the specified number of dimensions.- Parameters:
dimension- The dimensions.
-
-
Method Detail
-
clone
public ContinousDistribution clone()
- Specified by:
clonein interfaceStateDistribution- Overrides:
clonein classjava.lang.Object- Returns:
- A clone of this distribution.
-
fit
public void fit(MLDataSet co)
Fit this distribution to the specified data set.- Specified by:
fitin interfaceStateDistribution- Parameters:
co- The data set to fit to.
-
fit
public void fit(MLDataSet co, double[] weights)
Fit this distribution to the specified data set, given the specified weights, per element.- Specified by:
fitin interfaceStateDistribution- Parameters:
co- The data set to fit to.weights- The weights.
-
generate
public MLDataPair generate()
Generate a random data pair, based on the probabilities.- Specified by:
generatein interfaceStateDistribution- Returns:
- A random data pair.
-
probability
public double probability(MLDataPair o)
Determine the probability of the specified data pair.- Specified by:
probabilityin interfaceStateDistribution- Parameters:
o- The pair to consider.- Returns:
- The probability.
-
update
public void update(double[][] covariance)
Update the covariance.- Parameters:
covariance- The new covariance.
-
getMean
public double[] getMean()
- Returns:
- The mean for the dimensions of the gaussian curve.
-
getCovariance
public Matrix getCovariance()
- Returns:
- The covariance matrix.
-
-
DMelt 3.0 © DataMelt by jWork.ORG