BUG: Divide by zero warning when running celer_path
Closed this issue · 3 comments
mathurinm commented
sol = celer(```
It's been here for a long time, not a zero column error, happens on every dataset, does not seem to affect convergence
Could be a division by `norm(X.T @ theta)` with `theta = np.zeros(n_samples)`
josephsalmon commented
When would theta= np.zeros(n_samples) could arrive? seems unlikely no?
ksehic commented
Hi, when running celer Lasso for 20newsgroup I got this warning
git/celer/celer/homotopy.py:280: RuntimeWarning: divide by zero encountered in true_divide sol = celer(
mathurinm commented
Should be fixed by #160
When performing cross validation on a (very) sparse X
, it happens that some columns of X[train_idx]
only contain zeros. We skip these in the CD updates, but at the beginning on the solver there was a 1 / norms_X_col
which raised the warning.
@ksehic I'll merge the PR when it's green, then please let me know if it fixes your issue