Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
17 | 2 | 4 | 0.967 | compound_stmt |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 11 | 245 | Bio/HMM/MarkovModel.py |
2 | 17 | 257 | Bio/HMM/MarkovModel.py |
| ||||
def set_emission_score(self,seq_state,emission_state,probability): """Set the probability of a emission from a particular state. Raises: KeyError if the emission from the given state is not allowed. """ if self.emission_prob.has_key((seq_state,emission_state)): self.emission_prob[(seq_state,emission_state)] = probability else: raise KeyError("Emission of %s from %s is not allowed."%(emission_state,seq_state)) |
| ||||
def set_emission_pseudocount(self,seq_state,emission_state,count): """Set the default pseudocount for an emission. 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 emissions have a pseudocount of 1. Raises: KeyError if the emission from the given state is not allowed. """ if self.emission_pseudo.has_key((seq_state,emission_state)): self.emission_pseudo[(seq_state,emission_state)] = count else: raise KeyError("Emission of %s from %s is not allowed."%(emission_state,seq_state)) |
| |||
def [[#variable76bb04c0]](self,seq_state,emission_state, [[#variable76bb0080]]): [[#variable76bb0420]] if self. [[#variable76bb0480]].has_key((seq_state,emission_state)): self. [[#variable76bb0480]][(seq_state,emission_state)] = [[#variable76bb0080]] else: raise KeyError("Emission of %s from %s is not allowed."%(emission_state,seq_state)) |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#76bb04c0]] | set_emission_pseudocount |
1 | 2 | [[#76bb04c0]] | set_emission_score |
2 | 1 | [[#76bb0080]] | count |
2 | 2 | [[#76bb0080]] | probability |
3 | 1 | [[#76bb0420]] | """Set the default pseudocount for an emission. 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 emissions have a pseudocount of 1. Raises: KeyError if the emission from the given state is not allowed. """ |
3 | 2 | [[#76bb0420]] | """Set the probability of a emission from a particular state. Raises: KeyError if the emission from the given state is not allowed. """ |
4 | 1 | [[#76bb0480]] | emission_pseudo |
4 | 2 | [[#76bb0480]] | emission_prob |