CloneSet274


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
17240.967compound_stmt
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
111213
Bio/HMM/MarkovModel.py
217225
Bio/HMM/MarkovModel.py
Clone Instance
1
Line Count
11
Source Line
213
Source File
Bio/HMM/MarkovModel.py

    def set_transition_score(self,from_state,to_state,probability):   
        """Set the probability of a transition between two states.

        Raises:
        KeyError if the transition is not allowed.
        """ 
        if self.transition_prob.has_key((from_state,to_state)): 
            self.transition_prob[(from_state,to_state)] =  probability 
        else: 
             raise KeyError("Transition from %s to %s is not allowed."%(from_state,to_state)) 
        


Clone Instance
2
Line Count
17
Source Line
225
Source File
Bio/HMM/MarkovModel.py

    def set_transition_pseudocount(self,from_state,to_state,count):   
        """Set the default pseudocount for a transition.

        To avoid computational problems, it is helpful to be able to
        set a 'default' pseudocount to start with for estimating
        transition and emission probabilities (see p62 in Durbin et al
        for more discussion on this. By default, all transitions have
        a pseudocount of 1.

        Raises:
        KeyError if the transition is not allowed.
        """ 
        if self.transition_pseudo.has_key((from_state,to_state)): 
            self.transition_pseudo[(from_state,to_state)] =  count 
        else: 
             raise KeyError("Transition from %s to %s is not allowed."%(from_state,to_state)) 


     # --- functions to deal with emissions from the sequence
        


Clone AbstractionParameter Count: 4Parameter Bindings

def [[#variable2e0968c0]](self,from_state,to_state, [[#variable2e096840]]):
   [[#variable2e0967a0]]
  if self. [[#variable2e096740]].has_key((from_state,to_state)):
  
    self. [[#variable2e096740]][(from_state,to_state)] = [[#variable2e096840]]
  else:
  
    raise KeyError("Transition from %s to %s is not allowed."%(from_state,to_state)) 
    # --- functions to deal with emissions from the sequence
  
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#2e0968c0]]
set_transition_pseudocount 
12[[#2e0968c0]]
set_transition_score 
21[[#2e096840]]
count 
22[[#2e096840]]
probability 
31[[#2e0967a0]]
"""Set the default pseudocount for a transition.

        To avoid computational problems, it is helpful to be able to
        set a 'default' pseudocount to start with for estimating
        transition and emission probabilities (see p62 in Durbin et al
        for more discussion on this. By default, all transitions have
        a pseudocount of 1.

        Raises:
        KeyError if the transition is not allowed.
        """ 
32[[#2e0967a0]]
"""Set the probability of a transition between two states.

        Raises:
        KeyError if the transition is not allowed.
        """ 
41[[#2e096740]]
transition_pseudo 
42[[#2e096740]]
transition_prob