Logo Search packages:      
Sourcecode: python-biopython version File versions

def Bio::HMM::MarkovModel::MarkovModelBuilder::set_random_probabilities (   self  ) 

Set all probabilities to randomly generated numbers.

This will reset the value of all allowed transitions and emissions
to random values.

Warning 1 -- This will reset any currently set probabibilities.

Warning 2 -- This does not check to ensure that the sum of
all of the probabilities is less then 1. It just randomly assigns
a probability to each

Definition at line 121 of file MarkovModel.py.

00121                                       :
        """Set all probabilities to randomly generated numbers.

        This will reset the value of all allowed transitions and emissions
        to random values.

        Warning 1 -- This will reset any currently set probabibilities.

        Warning 2 -- This does not check to ensure that the sum of
        all of the probabilities is less then 1. It just randomly assigns
        a probability to each
        """
        for key in self.transition_prob.keys():
            self.transition_prob[key] = whrandom.random()

        for key in self.emission_prob.keys():
            self.emission_prob[key] = whrandom.random()

    # --- functions to deal with the transitions in the sequence

    def allow_all_transitions(self):


Generated by  Doxygen 1.6.0   Back to index