How to fix this error, please help.
0
0
Entering edit mode
10 weeks ago
nuorain ▴ 30

Hi, I believe here is better than ChatGPT. Please help me out with this error. Thank you very much. Best,

> library(Matrix)
> library(glmnet)
> set.seed(50)
> M1_1<-cv.glmnet(as.matrix(data[,-1]),data[,1] ,family = 'binomial',alpha = 1,nfolds = 
+                   10,type.measure = 'class')

Error in glmnet(x, y, weights = weights, offset = offset, lambda = lambda,  : 
  x has missing values; consider using makeX() to impute them
> 
LASSO • 227 views
ADD COMMENT
0
Entering edit mode

The error tells you what's wrong and how to fix it. I'm tempted to mark this as spam.

ADD REPLY

Login before adding your answer.

Traffic: 1567 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6