pyglmnet
pyglmnet copied to clipboard
test_group_lasso issues
A couple of issues:
-
The assertion introduced in this commit which tests that at least one group must be all zeros seems not guaranteed to pass. In practice I've seen this fail very rarely in unrelated scenarios. It may be likely to fail in large
n
, smallp
regimes. Can we understand the rationale behind this assertion? -
One reason it potentially fails stochastically is that we don't control the random state for sampling the parameters:
# sample random coefficients
beta0 = np.random.rand()
beta = np.random.normal(0.0, 1.0, n_features)
beta[groups == 2] = 0.