影像组学科研需要,真心求教!!!!
以下是代码:
library(glmnet)
data <- read.table("lassosample.csv",header = TRUE,sep = ",")
y <- data$label
x <- as.matrix(data[,2:107])
fit2 <- cv.glmnet(x,y,family = "binomial",type.measure = "auc")
**Error in glmnet**(x, y, weights = weights, offset = offset, lambda = lambda, :
number of observations in y (0) not equal to the number of rows of x (100)
请问这个问题解决了吗?我也出现了同样的问题。
LASSO回归这样的问题怎么解决?
Error: from glmnet C++ code (error code 30000); Inititialization numerical error; probably too many censored observations
y轴是矩阵形式的数据吗