Class MCUtils


  • public class MCUtils
    extends Object
    These are the utility functions to examine a Markov chain.
    • Method Detail

      • getStateCounts

        public static Vector getStateCounts​(int[] states)
        Count the numbers of occurrences of states.
        Parameters:
        states - the Markov state labels, counting from 1
        Returns:
        the numbers of occurrences
      • getTransitionCounts

        public static DenseMatrix getTransitionCounts​(int[] states)
        Count the numbers of times the state goes from one state to another.
        Parameters:
        states - the Markov state labels, counting from 1
        Returns:
        the counts of transitions
      • getObservations

        public static double[] getObservations​(HmmInnovation[] innovations,
                                               int state)
        Get all observations that occur in a particular state.
        Parameters:
        innovations - the HMM innovations
        state - a state
        Returns:
        the observations in the state