(self, paths, maxOrder=None, log=True)
Calculates the likelihood of a multi-order
        network model up to a maximum order maxOrder based on all
        path statistics.

        @param paths: the path statistics to be used in the likelihood
            calculation

        @param maxOrder: the maximum layer order to take into
            account for the likelihood calculation. For the default
            value None, all orders will be used for the
            likelihood calculation.

        @log: Whether or not to return the log likelihood (default: True)
Calculates the likelihood of a multi-order
        network model up to a maximum order maxOrder based on all
        path statistics.
Calculates the likelihood of a multi - order network model up to a maximum order maxOrder based on all path statistics .
def getLikelihood(self, paths, maxOrder=None, log=True):
        """Calculates the likelihood of a multi-order
        network model up to a maximum order maxOrder based on all
        path statistics.

        @param paths: the path statistics to be used in the likelihood
            calculation

        @param maxOrder: the maximum layer order to take into
            account for the likelihood calculation. For the default
            value None, all orders will be used for the
            likelihood calculation.

        @log: Whether or not to return the log likelihood (default: True)
        """
        if maxOrder == None:
            maxOrder = self.maxOrder
        assert maxOrder <= self.maxOrder, 'Error: maxOrder cannot be larger than maximum order of multi-order network'

        # add log-likelihoods of multiple model layers,
        # assuming that paths are independent
        L = _np.float64(0)

        for k in range(0, maxOrder+1):
            if k < maxOrder:
                p = self.getLayerLikelihood(paths, k, considerLongerPaths=False, log=True)[0]
            else:
                p = self.getLayerLikelihood(paths, k, considerLongerPaths=True, log=True)[0]
            # print('Log L(k=' + str(k) + ') = ' + str(p))
            assert p <= 0, 'Layer Log-Likelihood out of bounds'
            L += p
        assert L <= 0, 'Log-Likelihood out of bounds'

        if log:
            return L
        else:
            return _np.exp(L)
def getLikelihood ( self , paths , maxOrder = None , log = True ) : if maxOrder == None : maxOrder = self . maxOrder assert maxOrder <= self . maxOrder , 'Error: maxOrder cannot be larger than maximum order of multi-order network' # add log-likelihoods of multiple model layers, # assuming that paths are independent L = _np . float64 ( 0 ) for k in range ( 0 , maxOrder + 1 ) : if k < maxOrder : p = self . getLayerLikelihood ( paths , k , considerLongerPaths = False , log = True ) [ 0 ] else : p = self . getLayerLikelihood ( paths , k , considerLongerPaths = True , log = True ) [ 0 ] # print('Log L(k=' + str(k) + ') = ' + str(p)) assert p <= 0 , 'Layer Log-Likelihood out of bounds' L += p assert L <= 0 , 'Log-Likelihood out of bounds' if log : return L else : return _np . exp ( L )