@Test public void testGetInitialStateProbabilities() { System.out.println("getInitialStateProbabilities"); HMM hmm = new HMM(pi, new Matrix(a), new Matrix(b)); double[] result = hmm.getInitialStateProbabilities(); for (int i = 0; i < pi.length; i++) { assertEquals(pi[i], result[i], 1E-7); } }
public double[] getInitialStateProbabilities() { return pi; }
HMM implements Serializable { public double[] getInitialStateProbabilities() { return pi; } }
HMM implements Serializable { public double[] getInitialStateProbabilities() { return pi; } HMM(double[] pi, Matrix a, Matrix b); }
HMM implements Serializable { public double[] getInitialStateProbabilities() { return pi; } HMM(double[] pi, Matrix a, Matrix b); double[] getInitialStateProbabilities(); Matrix getStateTransitionProbabilities(); Matrix getSymbolEmissionProbabilities(); double p(int[] o, int[] s); double logp(int[] o, int[] s); double p(int[] o); double logp(int[] o); int[] predict(int[] o); static HMM fit(int[][] observations, int[][] labels); static HMM fit(T[][] observations, int[][] labels, ToIntFunction<T> ordinal); void update(T[][] observations, int iterations, ToIntFunction<T> ordinal); void update(int[][] observations, int iterations); @Override String toString(); }
HMM implements Serializable { public double[] getInitialStateProbabilities() { return pi; } HMM(double[] pi, Matrix a, Matrix b); double[] getInitialStateProbabilities(); Matrix getStateTransitionProbabilities(); Matrix getSymbolEmissionProbabilities(); double p(int[] o, int[] s); double logp(int[] o, int[] s); double p(int[] o); double logp(int[] o); int[] predict(int[] o); static HMM fit(int[][] observations, int[][] labels); static HMM fit(T[][] observations, int[][] labels, ToIntFunction<T> ordinal); void update(T[][] observations, int iterations, ToIntFunction<T> ordinal); void update(int[][] observations, int iterations); @Override String toString();  }