|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.ac.ulg.montefiore.run.jahmm.OpdfGaussianMixture
public class OpdfGaussianMixture
This class implements a mixture of monovariate gaussian distributions.
Constructor Summary | |
---|---|
OpdfGaussianMixture(double[] means,
double[] variances,
double[] proportions)
Creates a Gaussian mixture distribution. |
|
OpdfGaussianMixture(int nbGaussians)
Creates a Gaussian mixture distribution. |
Method Summary | |
---|---|
OpdfGaussianMixture |
clone()
|
void |
fit(java.util.Collection<? extends ObservationReal> co)
Fits this observation distribution function to a (non empty) set of observations. |
void |
fit(java.util.Collection<? extends ObservationReal> co,
double[] weights)
Fits this observation distribution function to a (non empty) weighted set of observations. |
void |
fit(ObservationReal... oa)
Fits this observation distribution function to a (non empty) set of observations. |
void |
fit(ObservationReal[] o,
double[] weights)
Fits this observation distribution function to a (non empty) weighted set of observations. |
ObservationReal |
generate()
Generates a (pseudo) random observation according to this distribution. |
double[] |
means()
Returns the mean value of each distribution composing this mixture. |
int |
nbGaussians()
Returns the number of distributions composing this mixture. |
double |
probability(ObservationReal o)
Returns the probability (density) of an observation given a distribution. |
double[] |
proportions()
Returns the mixing proportions of each gaussian distribution. |
java.lang.String |
toString()
|
java.lang.String |
toString(java.text.NumberFormat numberFormat)
Returns a String describing this distribution. |
double[] |
variances()
Returns the mean value of each distribution composing this mixture. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OpdfGaussianMixture(int nbGaussians)
nbGaussians
- The number of gaussians that compose this mixture.public OpdfGaussianMixture(double[] means, double[] variances, double[] proportions)
means
- The mean values of the Gaussian distributions.variances
- The variances of the Gaussian distributions.proportions
- The mixing proportions. This array does not have to
be normalized, but each element must be positive and the sum
of its elements must be strictly positive.Method Detail |
---|
public double probability(ObservationReal o)
Opdf
probability
in interface Opdf<ObservationReal>
o
- An observation.
o
takes continuous
values) of o
for this function.public ObservationReal generate()
Opdf
generate
in interface Opdf<ObservationReal>
public int nbGaussians()
public double[] proportions()
public double[] means()
public double[] variances()
public void fit(ObservationReal... oa)
fit
in interface Opdf<ObservationReal>
oa
- A set of observations compatible with this function.public void fit(java.util.Collection<? extends ObservationReal> co)
fit
in interface Opdf<ObservationReal>
co
- A set of observations compatible with this function.public void fit(ObservationReal[] o, double[] weights)
fit
in interface Opdf<ObservationReal>
o
- A set of observations compatible with this function.weights
- The weights associated to the observations.public void fit(java.util.Collection<? extends ObservationReal> co, double[] weights)
fit
in interface Opdf<ObservationReal>
co
- A set of observations compatible with this function.weights
- The weights associated to the observations.public OpdfGaussianMixture clone()
clone
in interface Opdf<ObservationReal>
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<ObservationReal>
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 |