List of usage examples for org.apache.mahout.classifier.sequencelearning.hmm HmmTrainer trainBaumWelch
public static HmmModel trainBaumWelch(HmmModel initialModel, int[] observedSequence, double epsilon, int maxIterations, boolean scaled)
From source file:org.eclipse.tracecompass.internal.totalads.algorithms.hiddenmarkovmodel.HmmMahout.java
License:Open Source License
/** * Trains an HMM on a sequence using the BaumWelch algorithm * * @param numIterations/*from www .j a v a 2 s . c om*/ * Number of Iterations * @param observedSequence * The sequence */ public void learnUsingBaumWelch(Integer numIterations, Integer[] observedSequence) { int[] seq = new int[observedSequence.length]; for (int i = 0; i < seq.length; i++) { seq[i] = observedSequence[i]; } HmmTrainer.trainBaumWelch(fHmm, seq, 0.0001, numIterations, true); }
From source file:org.eclipse.tracecompass.internal.totalads.algorithms.hiddenmarkovmodel.HmmMahout.java
License:Open Source License
/** * Trains an HMM on a sequence using the BaumWelch algorithm * * @param numIterations/*from www . j a v a2 s .c om*/ * Number of iterations * @param observedSequence * The sequence */ public void learnUsingBaumWelch(Integer numIterations, int[] observedSequence) { HmmTrainer.trainBaumWelch(fHmm, observedSequence, 0.0001, numIterations, true); }