Skip to contents

Penalized Cox regression ORSF control


orsf_control_net(alpha = 1/2, df_target = NULL, ...)



(double) The elastic net mixing parameter. A value of 1 gives the lasso penalty, and a value of 0 gives the ridge penalty. If multiple values of alpha are given, then a penalized model is fit using each alpha value prior to splitting a node.


(integer) Preferred number of variables used in a linear combination.


Further arguments passed to or from other methods (not currently used).


an object of class 'orsf_control', which should be used as an input for the control argument of orsf.


df_target has to be less than mtry, which is a separate argument in orsf that indicates the number of variables chosen at random prior to finding a linear combination of those variables.


Simon N, Friedman J, Hastie T, Tibshirani R. Regularization paths for Cox's proportional hazards model via coordinate descent. Journal of statistical software 2011 Mar; 39(5):1. DOI: 10.18637/jss.v039.i05

See also

linear combination control functions orsf_control_cph(), orsf_control_custom(), orsf_control_fast()


# orsf_control_net() is considerably slower than orsf_control_cph(),
# The example uses n_tree = 25 so that my examples run faster,
# but you should use at least 500 trees in applied settings.

orsf(data = pbc_orsf,
     formula = Surv(time, status) ~ . - id,
     n_tree = 25,
     control = orsf_control_net())
#> ---------- Oblique random survival forest
#>      Linear combinations: Penalized Cox regression
#>           N observations: 276
#>                 N events: 111
#>                  N trees: 25
#>       N predictors total: 17
#>    N predictors per node: 5
#>  Average leaves per tree: 22
#> Min observations in leaf: 5
#>       Min events in leaf: 1
#>           OOB stat value: 0.55
#>            OOB stat type: Harrell's C-statistic
#>      Variable importance: anova
#> -----------------------------------------