Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)

src/c/o/cogent-1.5.3/cogent/evolve/substitution_model.py   cogent(Download)
from cogent.core import moltype
from cogent.evolve import parameter_controller, predicate, motif_prob_model
from cogent.evolve.substitution_calculation import (
    SubstitutionParameterDefn as ParamDefn, 
    RateDefn, LengthDefn, ProductDefn, CallDefn, CalcDefn,
    def makeAlignmentDefn(self, model):
        align = NonParamDefn('alignment', ('locus',))
        # The name of this matters, it's used in likelihood_function.py
        # to retrieve the correct (adapted) alignment.
        return AlignmentAdaptDefn(model, align)
    def makeQdDefn(self, word_probs, mprobs_matrix, rate_params):
        """Diagonalized Q, ie: rate matrix prepared for exponentiation"""
        Q = CalcDefn(self.calcQ, name='Q')(word_probs, mprobs_matrix, *rate_params)
        expm = NonParamDefn('expm')
        exp = ExpDefn(expm)

src/p/y/pycogent-HEAD/cogent/evolve/substitution_model.py   pycogent(Download)
from cogent.core import moltype
from cogent.evolve import parameter_controller, predicate, motif_prob_model
from cogent.evolve.substitution_calculation import (
    SubstitutionParameterDefn as ParamDefn, 
    RateDefn, LengthDefn, ProductDefn, CallDefn, CalcDefn,
    def makeAlignmentDefn(self, model):
        align = NonParamDefn('alignment', ('locus',))
        # The name of this matters, it's used in likelihood_function.py
        # to retrieve the correct (adapted) alignment.
        return AlignmentAdaptDefn(model, align)
    def makeQdDefn(self, word_probs, mprobs_matrix, rate_params):
        """Diagonalized Q, ie: rate matrix prepared for exponentiation"""
        Q = CalcDefn(self.calcQ, name='Q')(word_probs, mprobs_matrix, *rate_params)
        expm = NonParamDefn('expm')
        exp = ExpDefn(expm)