HiddenMarkovModel#
- class pyopenms.HiddenMarkovModel#
Bases:
objectCython implementation of _HiddenMarkovModel
Documentation is available at http://www.openms.de/current_doxygen/html/classOpenMS_1_1HiddenMarkovModel.html
- __init__()#
Cython signature: void HiddenMarkovModel() Hidden Markov Model implementation of PILIS
Cython signature: void HiddenMarkovModel(HiddenMarkovModel &)
Methods
Cython signature: void HiddenMarkovModel()
Cython signature: void addNewState(HMMState * state)
Cython signature: void addSynonymTransition(const String & name1, const String & name2, const String & synonym1, const String & synonym2) Add a new synonym transition to the given state names
Cython signature: void clear() Clears all data
Cython signature: void clearInitialTransitionProbabilities() Clears the initial probabilities
Cython signature: void clearTrainingEmissionProbabilities() Clear the emission probabilities
Cython signature: void disableTransition(const String & s1, const String & s2) Disables the transition; deletes the nodes from the predecessor/successor list respectively
Cython signature: void disableTransitions() Disables all transitions
Cython signature: void dump() Writes some stats to cerr
Cython signature: void enableTransition(const String & s1, const String & s2) Enables a transition; adds s1 to the predecessor list of s2 and s2 to the successor list of s1
Cython signature: void estimateUntrainedTransitions() Estimates the transition probabilities of not trained transitions by averages similar trained ones
Cython signature: void evaluate() Evaluate the HMM, estimates the transition probabilities from the training
Cython signature: void forwardDump() Writes some info of the forward "matrix" to cerr
Cython signature: size_t getNumberOfStates() Returns the number of states
Cython signature: double getPseudoCounts() Returns the pseudo counts
Cython signature: HMMState * getState(const String & name) Returns the state with the given name
Cython signature: double getTransitionProbability(const String & s1, const String & s2) Returns the transition probability of the given state names
Cython signature: void setInitialTransitionProbability(const String & state, double prob) Sets the initial transition probability of the given state to prob
Cython signature: void setPseudoCounts(double pseudo_counts) Sets the pseudo count that are added instead of zero
Cython signature: void setTrainingEmissionProbability(const String & state, double prob) Sets the emission probability of the given state to prob
Cython signature: void setTransitionProbability(const String & s1, const String & s2, double prob) Sets the transition probability of the given state names to prob
Cython signature: void setVariableModifications(StringList & modifications)
Cython signature: void train() Trains the HMM.
Cython signature: void writeGraphMLFile(const String & filename) Writes the HMM into a file in GraphML format
- addNewState()#
Cython signature: void addNewState(HMMState * state) Registers a new state to the HMM
Cython signature: void addNewState(const String & name) Registers a new state to the HMM
- addSynonymTransition()#
Cython signature: void addSynonymTransition(const String & name1, const String & name2, const String & synonym1, const String & synonym2) Add a new synonym transition to the given state names
- clear()#
Cython signature: void clear() Clears all data
- clearInitialTransitionProbabilities()#
Cython signature: void clearInitialTransitionProbabilities() Clears the initial probabilities
- clearTrainingEmissionProbabilities()#
Cython signature: void clearTrainingEmissionProbabilities() Clear the emission probabilities
- disableTransition()#
Cython signature: void disableTransition(const String & s1, const String & s2) Disables the transition; deletes the nodes from the predecessor/successor list respectively
- disableTransitions()#
Cython signature: void disableTransitions() Disables all transitions
- dump()#
Cython signature: void dump() Writes some stats to cerr
- enableTransition()#
Cython signature: void enableTransition(const String & s1, const String & s2) Enables a transition; adds s1 to the predecessor list of s2 and s2 to the successor list of s1
- estimateUntrainedTransitions()#
Cython signature: void estimateUntrainedTransitions() Estimates the transition probabilities of not trained transitions by averages similar trained ones
- evaluate()#
Cython signature: void evaluate() Evaluate the HMM, estimates the transition probabilities from the training
- forwardDump()#
Cython signature: void forwardDump() Writes some info of the forward “matrix” to cerr
- getNumberOfStates()#
Cython signature: size_t getNumberOfStates() Returns the number of states
- getPseudoCounts()#
Cython signature: double getPseudoCounts() Returns the pseudo counts
- getState()#
Cython signature: HMMState * getState(const String & name) Returns the state with the given name
- getTransitionProbability()#
Cython signature: double getTransitionProbability(const String & s1, const String & s2) Returns the transition probability of the given state names
- setInitialTransitionProbability()#
Cython signature: void setInitialTransitionProbability(const String & state, double prob) Sets the initial transition probability of the given state to prob
- setPseudoCounts()#
Cython signature: void setPseudoCounts(double pseudo_counts) Sets the pseudo count that are added instead of zero
- setTrainingEmissionProbability()#
Cython signature: void setTrainingEmissionProbability(const String & state, double prob) Sets the emission probability of the given state to prob
- setTransitionProbability()#
Cython signature: void setTransitionProbability(const String & s1, const String & s2, double prob) Sets the transition probability of the given state names to prob
- setVariableModifications()#
Cython signature: void setVariableModifications(StringList & modifications)
- train()#
Cython signature: void train() Trains the HMM. Initial probabilities and emission probabilities of the emitting states should be set
- writeGraphMLFile()#
Cython signature: void writeGraphMLFile(const String & filename) Writes the HMM into a file in GraphML format