under multinomial logistic regression, the line glmnetPlot(fit, xvar = 'lambda', label = True, ptype = '2norm'); will crash.
UnboundLocalError Traceback (most recent call last)
<ipython-input-40-4a1bdfbf6536> in <module>()
----> 1 glmnetPlot(fit, xvar = 'lambda', label = True, ptype = '2norm');
/home/yimengzh/miniconda2/envs/pytorch/lib/python3.6/site-packages/glmnet_python-0.2.0-py3.6.egg/glmnet_python/glmnetPlot.py in glmnetPlot(x, xvar, label, ptype, **options)
121 handle = plotCoef(coefnorm, norm, x['lambdau'], dfseq, x['dev'],
122 label, xvar, '',str, **options);
--> 123 if i < ncl - 1:
124 plt.figure()
125 else:
UnboundLocalError: local variable 'ncl' referenced before assignment
checking the source code, seems that ncl is undefined in this conditional branch. Looks that it's not some life-or-death error. Still, it's troublesome.
when running the notebook example in https://github.com/bbalasub1/glmnet_python/blob/master/test/glmnet_examples.ipynb,
under multinomial logistic regression, the line
glmnetPlot(fit, xvar = 'lambda', label = True, ptype = '2norm');
will crash.checking the source code, seems that
ncl
is undefined in this conditional branch. Looks that it's not some life-or-death error. Still, it's troublesome.I installed from source, from commit 18e6d6c