(self)
Helper function, get the penalty coefficient for AIC/BIC calculation.
Helper function, get the penalty coefficient for AIC/BIC calculation.
Helper function get the penalty coefficient for AIC / BIC calculation .
def _set_k(self):
        """
        Helper function, get the penalty coefficient for AIC/BIC calculation.
        """
        if self.score_name == "aic":
            self.k = 2
        elif self.score_name == "bic":
            self.k = np.log(self.n_count)
        else:
            raise ValueError("Wrong score name given: {}. Only 'aic' or 'bic' acceptable.".format(self.score_name))
def _set_k ( self ) : if self . score_name == "aic" : self . k = 2 elif self . score_name == "bic" : self . k = np . log ( self . n_count ) else : raise ValueError ( "Wrong score name given: {}. Only 'aic' or 'bic' acceptable." . format ( self . score_name ) )