// Estimate
int nObservableStates = ChiInit.rows();
double[] uniformPrior = new double[nObservableStates];
java.util.Arrays.fill(uniformPrior, 1.0 / (double) uniformPrior.length);
IExpectationMaximization EM = hmmNew.emDiscrete(observations, par0, uniformPrior);
EM.setMaximumNumberOfStep(nIterHMMMax);
EM.setLikelihoodDecreaseTolerance(maxHMMLInc);
System.out.println(" running hmm on " + observations.size() + " x " + observations.get(0).size() + " observations with maxIter " + nIterHMMMax);
EM.run();
hmmLikelihoodHistory = EM.getLogLikelihoodHistory();
System.out.println(" hmm iterations: " + hmmLikelihoodHistory.length);
System.out.println(" likelihood history: " + doubleArrays.toString(hmmLikelihoodHistory, "\n"));
// HMM
this.hmmEst = EM.getHMM();
IHMMParameters parEst = hmmEst.getParameters();
return parEst;
}