* Proportions : 1/3, 2/3
*/
ObservationReal[] observations = new ObservationReal[nbObservations];
for (int g = 0, i = 0; g < 2; g++) {
RandomDistribution d = new GaussianDistribution(g * 4.,
1 + g);
for (; i < ((g == 0) ? nbObservations / 3 : nbObservations); i++)
observations[i] = new ObservationReal(d.generate());
}
// Fit distribution to observations
OpdfGaussianMixture gm = new OpdfGaussianMixture(2);