You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have noticed that sometimes, when glmnet has problems reaching convergence, lognet will crash with the error
File "/usr/lib/python3.6/site-packages/glmnet_py/lognet.py", line 257, in lognet t2 = scipy.log(alm[2]) IndexError: index 2 is out of bounds for axis 0 with size 2
This occurs only when there are less than three values of lambda (this does not require forcing glmnet to do so!). If we look at lognet.py, from line 255, we see that it is trying to retrieve a non-existing value of lambda, and therefore the crash. if ulam[0] == 0.0: t1 = scipy.log(alm[1]) t2 = scipy.log(alm[2]) alm[0] = scipy.exp(2*t1 - t2)
I have tested the behaviour of the R version of glmnet with the same data, and it simply leaves the first value of the lambda sequence (here alm[0]) as it is, so I suppose that would be acceptable behaviour here.
The text was updated successfully, but these errors were encountered:
I have noticed that sometimes, when glmnet has problems reaching convergence, lognet will crash with the error
File "/usr/lib/python3.6/site-packages/glmnet_py/lognet.py", line 257, in lognet t2 = scipy.log(alm[2]) IndexError: index 2 is out of bounds for axis 0 with size 2
This occurs only when there are less than three values of lambda (this does not require forcing glmnet to do so!). If we look at lognet.py, from line 255, we see that it is trying to retrieve a non-existing value of lambda, and therefore the crash.
if ulam[0] == 0.0: t1 = scipy.log(alm[1]) t2 = scipy.log(alm[2]) alm[0] = scipy.exp(2*t1 - t2)
I have tested the behaviour of the R version of glmnet with the same data, and it simply leaves the first value of the lambda sequence (here alm[0]) as it is, so I suppose that would be acceptable behaviour here.
The text was updated successfully, but these errors were encountered: