Open GoogleCodeExporter opened 8 years ago
I'm not sure if i did understand you correctly, but maybe this can help you.
Here is
a snippet how to create an HMM using OpdfMultiGaussian:
OpdfMultiGaussianFactory factory = new OpdfMultiGaussianFactory(2);
//factory.factor();
Hmm<ObservationVector> hmm = new Hmm<ObservationVector>(2, factory);
hmm.setPi(0, 0.50);
hmm.setPi(1, 0.50);
double [] mean = {4, 4};
double [][] covariance = { {2, 2}, {1., 1} };
OpdfMultiGaussian omg = new OpdfMultiGaussian (mean , covariance);
// same as upper OpdfMultiGaussian, but in one line and with other values
OpdfMultiGaussian omg2 = new OpdfMultiGaussian (new double[] {6, 6} /*mean*/ , new
double[][] { {4, 4}, {3., 3} } /*covariance*/);
// set Observation Probability distribution function
hmm.setOpdf(0, omg);
hmm.setOpdf(1, omg2);
hmm.setAij(0, 1, 0.2);
hmm.setAij(0, 0, 0.8);
hmm.setAij(1, 0, 0.2);
hmm.setAij(1, 1, 0.8);
kind regards,
Ben
Original comment by vamos.be...@gmail.com
on 27 May 2010 at 10:00
Original issue reported on code.google.com by
denisealves88
on 25 May 2010 at 7:42