

@classmethod
def setupClass(cls):
    cls.kvars = 4
    cls.m = 3
    data = sm.datasets.spector.load()
    data.exog = sm.add_constant(data.exog, prepend=True)
    alpha = np.array([0, 0, 0, 10])
    cls.res_reg = MNLogit(data.endog, data.exog).fit_regularized(method='l1', alpha=alpha, disp=0, acc=1e-15, maxiter=2000, trim_mode='auto')
    exog_no_PSI = data.exog[:, :cls.m]
    cls.res_unreg = MNLogit(data.endog, exog_no_PSI).fit(disp=0, tol=1e-15, method='bfgs', maxiter=1000)

dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/discrete/tests/test_discrete.py TestMNLogitL1Compatability.setupClass/original