|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.ac.ulg.montefiore.run.jahmm.OpdfMultiGaussian
public class OpdfMultiGaussian
This class represents a multivariate gaussian distribution function.
Constructor Summary | |
---|---|
OpdfMultiGaussian(double[] mean,
double[][] covariance)
Builds a new gaussian probability distribution with a given mean and covariance matrix. |
|
OpdfMultiGaussian(int dimension)
Builds a new gaussian probability distribution with zero mean and identity covariance matrix. |
Method Summary | |
---|---|
OpdfMultiGaussian |
clone()
|
double[][] |
covariance()
Returns (a copy of) this distribution's covariance matrix. |
int |
dimension()
Returns the dimension of the vectors handled by this distribution. |
void |
fit(java.util.Collection<? extends ObservationVector> co)
Fits this observation probability (distribution) function to a (non empty) set of observations. |
void |
fit(java.util.Collection<? extends ObservationVector> co,
double[] weights)
Fits this observation probability (distribution) function to a weighted (non empty) set of observations. |
void |
fit(ObservationVector... oa)
Fits this observation probability (distribution) function to a (non empty) set of observations. |
void |
fit(ObservationVector[] o,
double[] weights)
Fits this observation probability (distribution) function to a weighted (non empty) set of observations. |
ObservationVector |
generate()
Generates a (pseudo) random observation according to this distribution. |
double[] |
mean()
Returns (a copy of) this distribution's mean vector. |
double |
probability(ObservationVector o)
Returns the probability (density) of an observation given a distribution. |
java.lang.String |
toString()
|
java.lang.String |
toString(java.text.NumberFormat numberFormat)
Returns a String describing this distribution. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OpdfMultiGaussian(int dimension)
dimension
- The dimension of the vectors.public OpdfMultiGaussian(double[] mean, double[][] covariance)
mean
- The distribution's mean.covariance
- The distribution's covariance matrix.Method Detail |
---|
public double[] mean()
public double[][] covariance()
public int dimension()
public double probability(ObservationVector o)
Opdf
probability
in interface Opdf<ObservationVector>
o
- An observation.
o
takes continuous
values) of o
for this function.public ObservationVector generate()
Opdf
generate
in interface Opdf<ObservationVector>
public void fit(ObservationVector... oa)
Opdf
fit
in interface Opdf<ObservationVector>
oa
- An array of observations compatible with this function.public void fit(java.util.Collection<? extends ObservationVector> co)
Opdf
fit
in interface Opdf<ObservationVector>
co
- A set of observations compatible with this function.public void fit(ObservationVector[] o, double[] weights)
Opdf
fit
in interface Opdf<ObservationVector>
o
- An array of observations compatible with this factory.weights
- The weight associated to each observation (such that
weight.length == o.length
and the sum of
all the elements equals 1).public void fit(java.util.Collection<? extends ObservationVector> co, double[] weights)
Opdf
fit
in interface Opdf<ObservationVector>
co
- A set of observations compatible with this factory.weights
- The weight associated to each observation (such that
weight.length == o.length
and the sum of
all the elements equals 1).public OpdfMultiGaussian clone()
clone
in interface Opdf<ObservationVector>
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.text.NumberFormat numberFormat)
Opdf
String
describing this distribution.
toString
in interface Opdf<ObservationVector>
numberFormat
- A formatter used to convert the numbers (e.g.
probabilities) to strings.
String
describing this distribution.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |