R caret
包是否同时针对模型alpha
和模型lambda
进行交叉验证glmnet
?运行此代码,
eGrid <- expand.grid(.alpha = (1:10) * 0.1,
.lambda = (1:10) * 0.1)
Control <- trainControl(method = "repeatedcv",repeats = 3,verboseIter =TRUE)
netFit <- train(x =train_features, y = y_train,
method = "glmnet",
tuneGrid = eGrid,
trControl = Control)
培训日志如下所示。
Fold10.Rep3: alpha=1.0, lambda=NA
什么lambda=NA
意思
3
如何使用train将family =“ binomial”和type.measure =“ auc”传递给glmnet模型?
—
diugalde