glmnet error for logistic regression/binomial

时光毁灭记忆、已成空白 提交于 2019-12-06 03:33:15
prahlad

I think it is because of the levels of your factor variable. Suppose there are 10 levels and your 1 level has only one record, try to remove this level. You can use drop levels from gdata package.

This is generally because of data structure and their response variable, sometimes the response has more than binary output. or the data response variable has binary out come, but they have much more one class from the other. Therefore the problem then occur during training and testing the data. So, you must convert the response variable into binary if there are more than two outcomes, 2nd you may apply multinomial as respect to binomial. Hope this can help you.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!