Testing accuracy.
n_samples, n_features, n_classes = 1000, 100, 2
beta0 = np.random.normal(0.0, 1.0, 1)
beta = np.random.normal(0.0, 1.0, (n_features, n_classes))
// sample train and test data
glm_sim = GLM(distr="binomial", score_metric="accuracy")
After Change
// sample train and test data
glm_sim = GLM(distr="binomial", score_metric="accuracy")
X = np.random.randn(n_samples, n_features)
y = np.zeros((n_samples, 2))
for idx, beta in enumerate(betas.T):
y[:, idx] = simulate_glm(glm_sim.distr, beta0, beta, X)
y = np.argmax(y, axis=1)
glm_sim.fit(X, y)