(self, k=2, lanczosVecs = 15, maxiter = 1000)
return _np.log(_np.abs(evals2n_sorted[1]))/_np.log(_np.abs(evals2_sorted[1]))
Returns a factor S that indicates how much slower (S>1) or faster (S<1)
        a diffusion process evolves in a k-order model of the path statistics
        compared to what is expected based on a first-order model. This value captures 
        the effect of order correlations of length k on a diffusion process which evolves 
        based on the observed paths.
Returns a factor S that indicates how much slower (S>1) or faster (S<1)
        a diffusion process evolves in a k-order model of the path statistics
        compared to what is expected based on a first-order model. This value captures 
        the effect of order correlations of length k on a diffusion process which evolves 
        based on the observed paths.
Returns a factor S that indicates how much slower ( S > 1 ) or faster ( S<1 ) a diffusion process evolves in a k - order model of the path statistics compared to what is expected based on a first - order model . This value captures the effect of order correlations of length k on a diffusion process which evolves based on the observed paths .
def getSlowDownFactor(self, k=2, lanczosVecs = 15, maxiter = 1000):    
        """
        Returns a factor S that indicates how much slower (S>1) or faster (S<1)
        a diffusion process evolves in a k-order model of the path statistics
        compared to what is expected based on a first-order model. This value captures 
        the effect of order correlations of length k on a diffusion process which evolves 
        based on the observed paths.
        """

        assert k>1, 'Slow-down factor can only be calculated for orders larger than one'
    
        #NOTE to myself: most of the time goes for construction of the 2nd order
        #NOTE            null graph, then for the 2nd order null transition matrix
    
        gk = HigherOrderNetwork(self, k=k)
        gkn = HigherOrderNetwork(self, k=k, nullModel = True)
    
        Log.add('Calculating slow down factor ... ', Severity.INFO)

        # Build transition matrices
        Tk = gk.getTransitionMatrix()
        Tkn = gkn.getTransitionMatrix()
    
        # Compute eigenvector sequences
        # NOTE: ncv=13 sets additional auxiliary eigenvectors that are computed
        # NOTE: in order to be more confident to find the one with the largest
        # NOTE: magnitude, see
        # NOTE: https://github.com/scipy/scipy/issues/4987
        w2 = _sla.eigs(Tk, which="LM", k=2, ncv=lanczosVecs, return_eigenvectors=False, maxiter=maxiter)
        evals2_sorted = _np.sort(-_np.absolute(w2))

        w2n = _sla.eigs(Tkn, which="LM", k=2, ncv=lanczosVecs, return_eigenvectors=False, maxiter=maxiter)
        evals2n_sorted = _np.sort(-_np.absolute(w2n))

        Log.add('finished.', Severity.INFO)
    
        return _np.log(_np.abs(evals2n_sorted[1]))/_np.log(_np.abs(evals2_sorted[1]))
def getSlowDownFactor ( self , k = 2 , lanczosVecs = 15 , maxiter = 1000 ) : assert k > 1 , 'Slow-down factor can only be calculated for orders larger than one' #NOTE to myself: most of the time goes for construction of the 2nd order #NOTE            null graph, then for the 2nd order null transition matrix gk = HigherOrderNetwork ( self , k = k ) gkn = HigherOrderNetwork ( self , k = k , nullModel = True ) Log . add ( 'Calculating slow down factor ... ' , Severity . INFO ) # Build transition matrices Tk = gk . getTransitionMatrix ( ) Tkn = gkn . getTransitionMatrix ( ) # Compute eigenvector sequences # NOTE: ncv=13 sets additional auxiliary eigenvectors that are computed # NOTE: in order to be more confident to find the one with the largest # NOTE: magnitude, see # NOTE: https://github.com/scipy/scipy/issues/4987 w2 = _sla . eigs ( Tk , which = "LM" , k = 2 , ncv = lanczosVecs , return_eigenvectors = False , maxiter = maxiter ) evals2_sorted = _np . sort ( - _np . absolute ( w2 ) ) w2n = _sla . eigs ( Tkn , which = "LM" , k = 2 , ncv = lanczosVecs , return_eigenvectors = False , maxiter = maxiter ) evals2n_sorted = _np . sort ( - _np . absolute ( w2n ) ) Log . add ( 'finished.' , Severity . INFO ) return _np . log ( _np . abs ( evals2n_sorted [ 1 ] ) ) / _np . log ( _np . abs ( evals2_sorted [ 1 ] ) )