Class DiscreteHMM

    • Constructor Detail

      • DiscreteHMM

        public DiscreteHMM​(Vector PI,
                           Matrix A,
                           Matrix B)
        Constructs a discrete hidden Markov model.
        Parameters:
        PI - the initial state probabilities
        A - the state transition probabilities
        B - the conditional probabilities of the observation symbols: rows correspond to state; columns corresponds symbols
      • DiscreteHMM

        public DiscreteHMM​(DiscreteHMM model)
        Copy constructor.
        Parameters:
        model - a HiddenMarkovModel
    • Method Detail

      • B

        public ImmutableMatrix B()
        Gets the conditional probabilities of the observation symbols: rows correspond to state; columns corresponds symbols.
        Returns:
        the observation symbol probabilities
      • nSymbols

        public int nSymbols()
        Gets the number of observation symbols per state.
        Returns:
        the number of observation symbols per state
      • density

        public double density​(int state,
                              double observation)
        Gets the (conditional) probability mass of making an observation in a particular state.
        Specified by:
        density in class HiddenMarkovModel
        Parameters:
        state - the hidden state label, counting from 1
        observation - the observation value
        Returns:
        the probability density/mass