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) Qd = CallDefn(exp, Q, name='Qd') return Qd
def makeContinuousPsubDefn(self, word_probs, mprobs_matrix, distance, rate_params): Qd = self.makeQdDefn(word_probs, mprobs_matrix, rate_params) P = CallDefn(Qd, distance, name='psubs') return P