DeLuca Lab
DeLuca Lab

Reputation: 23

mlr3 glmnet Repeated CV and Alpha/Lambda Tuning

I am hoping to use mlr3 to build multiple glmnet models (classification, regression, and survival). I was originally going to use the mlr3 associated cv_glmnet learners. However, in reading further, I'd like to tune both alpha and lambda like the cva.glmnet function (https://cran.r-project.org/web/packages/glmnetUtils/vignettes/intro.html). I also want to perform repeated cross validation as the glmnet guidance seems to recommend doing so to generate more stable measures.

I anticipate that I would need to use the regular glmnet learner for this purpose but had a few questions. In order to approximate what cva.glmnet is doing but with repeated CV, should I use the autotuner with grid search and the default tuning spaces for classification and regression from the mlr3tuningspaces.

What tuning space should I use for the survival model?

Upvotes: 1

Views: 209

Answers (1)

John
John

Reputation: 609

I use this one:

paradox::ps(
  CoxNet.lambda = p_dbl(1e-03, 10, logscale = TRUE),
  CoxNet.alpha  = p_dbl(0, 1) # from Ridge to Lasso penalty
)

And here is some code I used to tune glmnet in the survival setting.

Upvotes: 2

Related Questions