Skip to content

glmnet error: no-comfortable arguments

2 messages · Hu Xinghai, David Winsemius

#
I come across the following error training Logistic Regression model using
cv.glmnet:
The error appears occasionally. However, since I need to run over a
parameter grid to optimize a parameter, the logistic regression needs to
run for multiple time; and therefore, almost certainly this error would be
hit.

Below is my code:
I read some posts online about the issue, suggesting that there might be
NA, and I should use data.matrix instead of as.matrix, and also I need to
fix foldid to make sure both positive and negative samples exists. I tried
all these tricks, but none helps.

Is there any thought about it?

Thanks
#
This duplicates a posting on StackOverflow. If you read the Posting Guide you will find advice cautioning you against cross-posting. If you do not get a satisfactory answer in a reasonable interval which I would say would be 24 hours at a minimum you can justify cross-posting but it should be accompanied by a reference to the original posting>

http://stackoverflow.com/questions/41070103/glmnet-error-non-conformable-arguments

The posting guide (as well as the StackOverflow help pages) ask the you post sufficient sample data to support demonstration and testing. You already have two close votes on the basis of failing to do that. On StackOverflow you can search on `[MCVE]` and "great reproducible example" or you can read the relevant sections of the Posting Guide. Using dput() to post data objects delivers the most specificity in data structure.