models package

Submodules

models.decoders module

class models.decoders.ViterbiAlgorithm(hmm_object)[source]

Bases: object

ViterbiAlgorithm Class

This will calculate the best hidden state sequence for a HiddenMarkovModel and its observed states

best_hidden_state_sequence(decode_observation_states: ndarray) ndarray[source]

Returns the best hidden state sequence given a list of observations

Args:

decode_observation_states (np.ndarray): a list of observations in order to decode the hidden state for

Returns:

np.ndarray: an array with the hidden states most likely for generating the observations

models.hmm module

class models.hmm.HiddenMarkovModel(observation_states: ndarray, hidden_states: ndarray, prior_probabilities: ndarray, transition_probabilities: ndarray, emission_probabilities: ndarray)[source]

Bases: object

HiddenMarkovModel is a object that contains all the info necessary for an HMM

Module contents

UCSF BMI203: Biocomputing Algorithms Author: Date: Package: Description: