首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >lasso回归分析时遇到警告信息?

lasso回归分析时遇到警告信息?

提问于 2023-11-17 13:32:11
回答 0关注 0查看 246

rt <- read.csv("merged_matrix.csv",header = T,row.names = 1)

###构建模型

set.seed(10)

x=as.matrix(rt[,c(2:ncol(rt))])

y=data.matrix(rt$fustat)

x <- scale(x) # 标准化x

#y <- scale(y)

fit=glmnet(x, y, family = "binomial", maxit = 3000)

plot(fit, xvar = "lambda", label = TRUE)

cvfit = cv.glmnet(x, y, family="binomial", maxit = 30000)

Warning messages:

1: In lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, :

one multinomial or binomial class has fewer than 8 observations; dangerous ground

2: In lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, :

one multinomial or binomial class has fewer than 8 observations; dangerous ground

3: In lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, :

one multinomial or binomial class has fewer than 8 observations; dangerous ground

4: In lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, :

one multinomial or binomial class has fewer than 8 observations; dangerous ground

5: In lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, :

one multinomial or binomial class has fewer than 8 observations; dangerous ground

6: In lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, :

one multinomial or binomial class has fewer than 8 observations; dangerous ground

进行losso分析时一直跳出以上警告信息,最终制作出的图中AUC为1,请求各位大神的帮助。

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档