
Select and Finalize Best Penalized Cox Workflow
Source:R/workflow_tuning.R
tune_best_glmnet_workflow.RdRuns cross-validation tuning across a grid of elastic net mixture and penalty parameters and finalizes the workflow with the best-performing hyperparameters.
Arguments
- formula_or_recipe
A formula with `Surv()` outcome or a `recipes::recipe`.
- data
Data frame containing predictors and survival outcomes.
- resamples
An `rsample` resample object (e.g. `vfold_cv` or `group_vfold_cv`).
- mixture
Numeric vector of candidate alpha mixture values (default `c(0.2, 0.5, 0.8, 1.0)`).
- rule
Hyperparameter selection rule: `"min"` (default) or `"1se"`.
- checkpoint_dir
Optional directory path where per-task checkpoints are stored.
- shard
Optional shard specification (e.g. `c(1, 2)`) for distributed computation.
- checkpoint_mismatch
Action on mismatch: `"recompute"`, `"overwrite"`, or `"error"`.
- ...
Additional arguments passed to [cv_coxnet()].