R error in glmnet: NA/NaN/Inf in foreign function call

后端 未结 3 1320
遥遥无期
遥遥无期 2021-01-08 01:23

I am trying to create a model using glmnet, (currently using cv to find the lambda value) and I am getting an error NA/NaN/Inf in foreign function call (arg 5).

3条回答
  •  庸人自扰
    2021-01-08 01:45

    Chars datatypes that are converted to factors cannot be supported for cv.glmnet, as stated above, can't handle NA's. Either use as.numeric or as.double.

提交回复
热议问题