1
插入符glmnet与cv.glmnet
在glmnet内部caret使用搜索最佳lambda和cv.glmnet执行相同任务的比较中似乎有很多困惑。 提出了许多问题,例如: 分类模型train.glmnet与cv.glmnet? 在插入符号中使用glmnet的正确方法是什么? 使用`caret`交叉验证`glmnet` 但是没有给出答案,这可能是由于问题的可重复性。在第一个问题之后,我给出了一个非常相似的示例,但确实存在相同的问题:为什么估计的lambda如此不同? library(caret) library(glmnet) set.seed(849) training <- twoClassSim(50, linearVars = 2) set.seed(849) testing <- twoClassSim(500, linearVars = 2) trainX <- training[, -ncol(training)] testX <- testing[, -ncol(testing)] trainY <- training$Class # Using glmnet to directly perform CV set.seed(849) cvob1=cv.glmnet(x=as.matrix(trainX),y=trainY,family="binomial",alpha=1, type.measure="auc", nfolds = 3,lambda = seq(0.001,0.1,by = 0.001),standardize=FALSE) …
14
r
caret
glmnet
machine-learning
neural-networks
maximum
softmax
probability
distributions
mathematical-statistics
random-variable
cdf
statistical-significance
variance
expected-value
ratio
sample-size
reliability
tolerance-interval
wilcoxon-signed-rank
self-study
variance
sampling
mean
machine-learning
svm
libsvm
self-study
sampling
ranks
data-visualization
histogram
machine-learning
classification
normal-distribution
mathematical-statistics
maximum-likelihood
mixture
predictive-models
prediction
seasonality