Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
test_HMMGeneral.ScaledDPAlgorithmsTest Class Reference

List of all members.

Public Member Functions

def setUp
def test_calculate_s_value

Public Attributes

 dp

Detailed Description

Definition at line 353 of file test_HMMGeneral.py.


Member Function Documentation

Definition at line 354 of file test_HMMGeneral.py.

00354 
00355     def setUp(self):
00356         # set up our Markov Model
00357         mm_builder = MarkovModel.MarkovModelBuilder(NumberAlphabet(),
00358                                                     LetterAlphabet())
00359         mm_builder.allow_all_transitions()
00360         mm_builder.set_equal_probabilities()
00361 
00362         mm = mm_builder.get_markov_model()
00363 
00364         # now set up a test sequence
00365         emission_seq = Seq("ABB", LetterAlphabet())
00366         state_seq = Seq("", NumberAlphabet())
00367         training_seq = Trainer.TrainingSequence(emission_seq, state_seq)
00368 
00369         # finally set up the DP
00370         self.dp = DynamicProgramming.ScaledDPAlgorithms(mm, training_seq)
        
Testing the calculation of s values.

Definition at line 371 of file test_HMMGeneral.py.

00371 
00372     def test_calculate_s_value(self):
00373         """Testing the calculation of s values.
00374         """
00375         previous_vars = {('1', 0) : .5,
00376                          ('2', 0) : .7}
00377         s_value = self.dp._calculate_s_value(1, previous_vars)
00378 
00379         # print s_value


Member Data Documentation

Definition at line 369 of file test_HMMGeneral.py.


The documentation for this class was generated from the following file: