glmnet lasso ROC charts
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I was using k-fold cross validation in glmnet (which implements lasso regression), but I can’t make the ROC charts from this. library(glmnet) glm_net <- cv.glmnet(dev_x_matrix,dev_y_vector,family="binomial",type.measure="class") phat <- predict(glm_net,newx=val_x_matrix,s="lambda.min") That gets me a vector with what looks like a log of the fitted values. I was trying to generate some ROC charts after this but it did not work. I think it is because of the nature of the x and y objects which goes into the glmnet . Do you have any ideas. 回答1: