(self, k=1, m=1)
return aic
Returns the Aikake Information Criterion
            assuming a k-th order Markov model
Returns the Aikake Information Criterion
            assuming a k-th order Markov model
Returns the Aikake Information Criterion assuming a k - th order Markov model
def getAIC(self, k=1, m=1):
        """ Returns the Aikake Information Criterion
            assuming a k-th order Markov model """

        if k not in self.P:
            self.fitMarkovModel(k)

        if m not in self.P:
            self.fitMarkovModel(m)

        L_k = self.getLikelihood(k, log=True)
        L_m = self.getLikelihood(m, log=True)

        s = len(self.states[1])
        n = len(self.sequence)

        aic = 2 * (s**k - s**m) * (s-1) - 2.0 * (L_k - L_m)

        return aic
def getAIC ( self , k = 1 , m = 1 ) : if k not in self . P : self . fitMarkovModel ( k ) if m not in self . P : self . fitMarkovModel ( m ) L_k = self . getLikelihood ( k , log = True ) L_m = self . getLikelihood ( m , log = True ) s = len ( self . states [ 1 ] ) n = len ( self . sequence ) aic = 2 * ( s ** k - s ** m ) * ( s - 1 ) - 2.0 * ( L_k - L_m ) return aic