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

# cogent.maths.markov.SiteClassTransitionMatrix

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)

```from cogent.evolve.likelihood_tree import LikelihoodTreeEdge
from cogent.evolve.simulate import argpick
from cogent.maths.markov import SiteClassTransitionMatrix

__author__ = "Peter Maxwell"
```
```
self.bprobs = [p/pprobs[self.alloc[i]] for (i,p) in enumerate(bprobs)]
self.transition_matrix = SiteClassTransitionMatrix(switch, pprobs)

def getWeightedSumLhs(self, lhs):
```

```#!/usr/bin/env/python

from cogent.maths.markov import SiteClassTransitionMatrix
from cogent.recalculation.definition import PositiveParamDefn, \
ProbabilityParamDefn, CalculationDefn, CalcDefn, NonParamDefn, \
```
```    else:
assert bprobs
R = SiteClassTransitionMatrix(switch, bprobs)
TM = R.nestTransitionMatricies(tms)
assert min(TM.Matrix.flat) >=0, bin_data
```

```from cogent.evolve.likelihood_tree import LikelihoodTreeEdge
from cogent.evolve.simulate import argpick
from cogent.maths.markov import SiteClassTransitionMatrix

__author__ = "Peter Maxwell"
```
```
self.bprobs = [p/pprobs[self.alloc[i]] for (i,p) in enumerate(bprobs)]
self.transition_matrix = SiteClassTransitionMatrix(switch, pprobs)

def getWeightedSumLhs(self, lhs):
```

```#!/usr/bin/env/python

from cogent.maths.markov import SiteClassTransitionMatrix
from cogent.recalculation.definition import PositiveParamDefn, \
ProbabilityParamDefn, CalculationDefn, CalcDefn, NonParamDefn, \
```
```    else:
assert bprobs
R = SiteClassTransitionMatrix(switch, bprobs)
TM = R.nestTransitionMatricies(tms)
assert min(TM.Matrix.flat) >=0, bin_data
```