(self, assumption="paths")
Calculates the degrees of freedom (i.e. number of parameters) of 
        this k-order model. Depending on the modeling assumptions, this either
        corresponds to the number of paths of length k in the first-order network 
        or to the number of all possible k-grams. The degrees of freedom of a model 
        can be used to assess the model complexity when calculating, e.g., the 
        Bayesian Information Criterion (BIC).

        @param assumption: if set to 'paths', for the degree of freedon calculation in the BIC, 
            only paths in the first-order network topology will be considered. This is 
            needed whenever we are interested in a modeling of paths in a given network topology.
            If set to 'ngrams' all possible n-grams will be considered, independent of whether they 
            are valid paths in the first-order network or not. The 'ngrams' and the 'paths' assumption 
            coincide if the first-order network is fully connected.
Calculates the degrees of freedom (i.e. number of parameters) of 
        this k-order model. Depending on the modeling assumptions, this either
        corresponds to the number of paths of length k in the first-order network 
        or to the number of all possible k-grams. The degrees of freedom of a model 
        can be used to assess the model complexity when calculating, e.g., the 
        Bayesian Information Criterion (BIC).
Calculates the degrees of freedom ( i . e . number of parameters ) of this k - order model . Depending on the modeling assumptions this either corresponds to the number of paths of length k in the first - order network or to the number of all possible k - grams . The degrees of freedom of a model can be used to assess the model complexity when calculating e . g . the Bayesian Information Criterion ( BIC ) .
def getDoF(self, assumption="paths"):
        """
        Calculates the degrees of freedom (i.e. number of parameters) of 
        this k-order model. Depending on the modeling assumptions, this either
        corresponds to the number of paths of length k in the first-order network 
        or to the number of all possible k-grams. The degrees of freedom of a model 
        can be used to assess the model complexity when calculating, e.g., the 
        Bayesian Information Criterion (BIC).

        @param assumption: if set to 'paths', for the degree of freedon calculation in the BIC, 
            only paths in the first-order network topology will be considered. This is 
            needed whenever we are interested in a modeling of paths in a given network topology.
            If set to 'ngrams' all possible n-grams will be considered, independent of whether they 
            are valid paths in the first-order network or not. The 'ngrams' and the 'paths' assumption 
            coincide if the first-order network is fully connected.
        """
        assert assumption == 'paths' or assumption == 'ngrams', 'Error: Invalid assumption'
        
        if assumption == 'paths':            
            return self.dof_paths
        else:            
            return self.dof_ngrams
def getDoF ( self , assumption = "paths" ) : assert assumption == 'paths' or assumption == 'ngrams' , 'Error: Invalid assumption' if assumption == 'paths' : return self . dof_paths else : return self . dof_ngrams