I am doing multinomial lasso. I am not sure what causes this issue:
Traceback (most recent call last):
File "1_lasso.py", line 32, in
cvfit = cvglmnet(x = x.copy(), y = y.copy(), family = 'multinomial', ptype = 'class')
File "/home/zz374/anaconda3/lib/python3.6/site-packages/glmnet_python-0.2.0-py3.6.egg/glmnet_python/cvglmnet.py", line 296, in cvglmnet
, foldid, ptype, grouped, keep)
File "/home/zz374/anaconda3/lib/python3.6/site-packages/glmnet_python-0.2.0-py3.6.egg/glmnet_python/cvmultnet.py", line 80, in cvmultnet
classid[:, i] = glmnet_softmax(predmat[:,:,i])
ValueError: could not broadcast input array from shape (7526,1) into shape (7526)
I am doing multinomial lasso. I am not sure what causes this issue:
Traceback (most recent call last): File "1_lasso.py", line 32, in
cvfit = cvglmnet(x = x.copy(), y = y.copy(), family = 'multinomial', ptype = 'class')
File "/home/zz374/anaconda3/lib/python3.6/site-packages/glmnet_python-0.2.0-py3.6.egg/glmnet_python/cvglmnet.py", line 296, in cvglmnet
, foldid, ptype, grouped, keep)
File "/home/zz374/anaconda3/lib/python3.6/site-packages/glmnet_python-0.2.0-py3.6.egg/glmnet_python/cvmultnet.py", line 80, in cvmultnet
classid[:, i] = glmnet_softmax(predmat[:,:,i])
ValueError: could not broadcast input array from shape (7526,1) into shape (7526)
Thanks for your help.