I am trying to create a model using glmnet (currently using CV to find the lambda value Do) and I am getting an error NA / NN / INF
in Foreign Function Call (AG5). I believe this is something to do with NA values in my data set, because when I remove all data points with NAS, the command runs successfully.
I had the impression that handling the values of glmnet I'm not sure where the error is coming from:
& gt; Ridge & Lieutenant; Error in lognet (x, is.sparse, ix, jx, y, weight, offset, alpha, cv.glmnet (features.mat, as.factor (tmp [, "result"]), family = "binomial" Knowles: NA / NAN / IF
Dataset looks like something in the Foreign Function Call (AG5):
& gt; head (FEATURES). Mate) 6x 8 sparse matrix of class "DGC metrics" absefghi 1 1 1 138 NA 15 NA. 4 1 3 171 NA 17 NA 7 7 1 1 156 NA 5 NA 8 1 4 97 NA 7 NA 9 1 1 21 9 NA 11 NA 10 1 263 NA NA 20 NA. Head (eg. Factor (TMP [, "Result"])) [1] 0 0 0 0 After: 0 1
It appears that glmnet NA values can not be handled !
Comments
Post a Comment