(self, paths, maxOrder=None, significanceThreshold=0.01)
return maxAcceptedOrder
Selects the optimal maximum order of a multi-order network model for the
        observed paths, based on a likelihood ratio test with p-value threshold of p
        By default, all orders up to the maximum order of the multi-order model will be tested.

        @param paths: The path statistics for which to perform the order selection

        @param maxOrder: The maximum order up to which the multi-order model shall be tested.
Selects the optimal maximum order of a multi-order network model for the
        observed paths, based on a likelihood ratio test with p-value threshold of p
        By default, all orders up to the maximum order of the multi-order model will be tested.
Selects the optimal maximum order of a multi - order network model for the observed paths based on a likelihood ratio test with p - value threshold of p By default all orders up to the maximum order of the multi - order model will be tested .
def estimateOrder(self, paths, maxOrder=None, significanceThreshold=0.01):
        """
        Selects the optimal maximum order of a multi-order network model for the
        observed paths, based on a likelihood ratio test with p-value threshold of p
        By default, all orders up to the maximum order of the multi-order model will be tested.

        @param paths: The path statistics for which to perform the order selection

        @param maxOrder: The maximum order up to which the multi-order model shall be tested.
        """
        if maxOrder == None:
            maxOrder = self.maxOrder
        assert maxOrder <= self.maxOrder, 'Error: maxOrder cannot be larger than maximum order of multi-order network'
        assert maxOrder > 1, 'Error: maxOrder must be larger than one'

        maxAcceptedOrder = 1

        # Test for highest order that passes
        # likelihood ratio test against null model
        for k in range(2, maxOrder+1):
            if self.likeliHoodRatioTest(paths, maxOrderNull=k-1, maxOrder=k, significanceThreshold=significanceThreshold)[0]:
                maxAcceptedOrder = k

        return maxAcceptedOrder
def estimateOrder ( self , paths , maxOrder = None , significanceThreshold = 0.01 ) : if maxOrder == None : maxOrder = self . maxOrder assert maxOrder <= self . maxOrder , 'Error: maxOrder cannot be larger than maximum order of multi-order network' assert maxOrder > 1 , 'Error: maxOrder must be larger than one' maxAcceptedOrder = 1 # Test for highest order that passes # likelihood ratio test against null model for k in range ( 2 , maxOrder + 1 ) : if self . likeliHoodRatioTest ( paths , maxOrderNull = k - 1 , maxOrder = k , significanceThreshold = significanceThreshold ) [ 0 ] : maxAcceptedOrder = k return maxAcceptedOrder