Skip to contents

Generalized linear models with elastic net regularization. Calls glmnet::glmnet() from package glmnet.

Initial parameter values

  • family is set to "cox" and cannot be changed.

Prediction types

This learner returns three prediction types:

  1. lp: a vector containing the linear predictors (relative risk scores), where each score corresponds to a specific test observation. Calculated using glmnet::predict.coxnet().

  2. crank: same as lp.

  3. distr: a survival matrix in two dimensions, where observations are represented in rows and time points in columns. Calculated using glmnet::survfit.coxnet(). Parameters stype and ctype relate to how lp predictions are transformed into survival predictions and are described in survival::survfit.coxph(). By default the Breslow estimator is used for computing the baseline hazard.

Caution: This learner is different to learners calling glmnet::cv.glmnet() in that it does not use the internal optimization of parameter lambda. Instead, lambda needs to be tuned by the user (e.g., via mlr3tuning). When lambda is tuned, the glmnet will be trained for each tuning iteration. While fitting the whole path of lambdas would be more efficient, as is done by default in glmnet::glmnet(), tuning/selecting the parameter at prediction time (using parameter s) is currently not supported in mlr3 (at least not in efficient manner). Tuning the s parameter is, therefore, currently discouraged.

When the data are i.i.d. and efficiency is key, we recommend using the respective auto-tuning counterpart in mlr_learners_surv.cv_glmnet(). However, in some situations this is not applicable, usually when data are imbalanced or not i.i.d. (longitudinal, time-series) and tuning requires custom resampling strategies (blocked design, stratification).

Dictionary

This Learner can be instantiated via lrn():

lrn("surv.glmnet")

Meta Information

  • Task type: “surv”

  • Predict Types: “crank”, “distr”, “lp”

  • Feature Types: “logical”, “integer”, “numeric”

  • Required Packages: mlr3, mlr3proba, mlr3extralearners, glmnet

Parameters

IdTypeDefaultLevelsRange
alignmentcharacterlambdalambda, fraction-
alphanumeric1\([0, 1]\)
bignumeric9.9e+35\((-\infty, \infty)\)
devmaxnumeric0.999\([0, 1]\)
dfmaxinteger-\([0, \infty)\)
epsnumeric1e-06\([0, 1]\)
epsnrnumeric1e-08\([0, 1]\)
exactlogicalFALSETRUE, FALSE-
excludeuntyped--
exmxnumeric250\((-\infty, \infty)\)
fdevnumeric1e-05\([0, 1]\)
gammauntyped--
groupedlogicalTRUETRUE, FALSE-
interceptlogicalTRUETRUE, FALSE-
keeplogicalFALSETRUE, FALSE-
lambdauntyped--
lambda.min.rationumeric-\([0, 1]\)
lower.limitsuntyped-Inf-
maxitinteger100000\([1, \infty)\)
mnlaminteger5\([1, \infty)\)
mxitinteger100\([1, \infty)\)
mxitnrinteger25\([1, \infty)\)
newoffsetuntyped--
nlambdainteger100\([1, \infty)\)
offsetuntypedNULL-
parallellogicalFALSETRUE, FALSE-
penalty.factoruntyped--
pmaxinteger-\([0, \infty)\)
pminnumeric1e-09\([0, 1]\)
precnumeric1e-10\((-\infty, \infty)\)
predict.gammanumericgamma.1se\((-\infty, \infty)\)
relaxlogicalFALSETRUE, FALSE-
snumeric0.01\([0, \infty)\)
standardizelogicalTRUETRUE, FALSE-
threshnumeric1e-07\([0, \infty)\)
trace.itinteger0\([0, 1]\)
type.logisticcharacterNewtonNewton, modified.Newton-
type.multinomialcharacterungroupedungrouped, grouped-
upper.limitsuntypedInf-
stypeinteger2\([1, 2]\)
ctypeinteger-\([1, 2]\)

References

Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths for Generalized Linear Models via Coordinate Descent.” Journal of Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .

See also

Author

be-marc

Super classes

mlr3::Learner -> mlr3proba::LearnerSurv -> LearnerSurvGlmnet

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.

Usage


Method selected_features()

Returns the set of selected features as reported by glmnet::predict.glmnet() with type set to "nonzero".

Usage

LearnerSurvGlmnet$selected_features(lambda = NULL)

Arguments

lambda

(numeric(1))
Custom lambda, defaults to the active lambda depending on parameter set.

Returns

(character()) of feature names.


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerSurvGlmnet$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# Define the Learner
learner = mlr3::lrn("surv.glmnet")
print(learner)
#> <LearnerSurvGlmnet:surv.glmnet>: Regularized Generalized Linear Model
#> * Model: -
#> * Parameters: list()
#> * Packages: mlr3, mlr3proba, mlr3extralearners, glmnet
#> * Predict Types:  [crank], distr, lp
#> * Feature Types: logical, integer, numeric
#> * Properties: selected_features, weights

# Define a Task
task = mlr3::tsk("grace")

# Create train and test set
ids = mlr3::partition(task)

# Train the learner on the training ids
learner$train(task, row_ids = ids$train)

print(learner$model)
#> $model
#> 
#> Call:  (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target,      family = "cox") 
#> 
#>    Df  %Dev   Lambda
#> 1   0  0.00 0.184100
#> 2   1  0.61 0.167800
#> 3   2  1.39 0.152900
#> 4   2  2.23 0.139300
#> 5   2  2.96 0.126900
#> 6   3  5.86 0.115600
#> 7   3  8.06 0.105400
#> 8   3  9.73 0.096000
#> 9   3 11.04 0.087470
#> 10  3 12.09 0.079700
#> 11  3 12.94 0.072620
#> 12  3 13.64 0.066170
#> 13  3 14.23 0.060290
#> 14  3 14.72 0.054930
#> 15  3 15.13 0.050050
#> 16  4 15.48 0.045610
#> 17  5 15.80 0.041560
#> 18  5 16.09 0.037860
#> 19  5 16.33 0.034500
#> 20  6 16.53 0.031440
#> 21  6 16.71 0.028640
#> 22  6 16.86 0.026100
#> 23  6 16.99 0.023780
#> 24  6 17.09 0.021670
#> 25  6 17.18 0.019740
#> 26  6 17.26 0.017990
#> 27  6 17.32 0.016390
#> 28  6 17.37 0.014930
#> 29  6 17.42 0.013610
#> 30  6 17.46 0.012400
#> 31  6 17.49 0.011300
#> 32  6 17.51 0.010290
#> 33  6 17.54 0.009379
#> 34  6 17.55 0.008546
#> 35  6 17.57 0.007787
#> 36  6 17.58 0.007095
#> 37  6 17.59 0.006465
#> 38  6 17.60 0.005890
#> 39  6 17.61 0.005367
#> 40  6 17.62 0.004890
#> 41  6 17.62 0.004456
#> 42  6 17.62 0.004060
#> 43  6 17.63 0.003699
#> 44  6 17.63 0.003371
#> 
#> $x
#>        age los revasc revascdays stchange sysbp
#>   [1,]  32   5      1          0        1   121
#>   [2,]  33   2      0          2        0   150
#>   [3,]  35   5      1          2        0   172
#>   [4,]  35  10      1          9        0   106
#>   [5,]  34   5      0          5        0   120
#>   [6,]  35   2      0        180        0   121
#>   [7,]  35   2      1          1        1   112
#>   [8,]  38  13      1          0        1   161
#>   [9,]  38   2      0        115        0   150
#>  [10,]  36   1      0        180        1   155
#>  [11,]  35   0      0        180        1   119
#>  [12,]  38  12      1          8        1   120
#>  [13,]  36   5      1          0        1   115
#>  [14,]  38  12      1         11        1    92
#>  [15,]  40  12      1          9        0   153
#>  [16,]  37   1      1          0        1   146
#>  [17,]  40   2      1          1        1   148
#>  [18,]  38   5      1          3        0   125
#>  [19,]  42   2      0          2        0   140
#>  [20,]  40   6      0        180        1   138
#>  [21,]  42   2      0        180        0   100
#>  [22,]  43   3      1          0        1   100
#>  [23,]  41   2      1          1        0   166
#>  [24,]  40   1      1          0        1   145
#>  [25,]  43   4      1          0        1   130
#>  [26,]  42   4      0        180        0   162
#>  [27,]  42  15      1         13        1   125
#>  [28,]  45   3      0        180        1   154
#>  [29,]  44   3      0        180        0   141
#>  [30,]  41  13      1          1        0   140
#>  [31,]  45   9      1          7        0   110
#>  [32,]  45   6      0        180        1   170
#>  [33,]  41   5      1          4        1   141
#>  [34,]  44   2      1          1        1   150
#>  [35,]  43   2      0        180        1   140
#>  [36,]  45   2      0        180        1   140
#>  [37,]  46  15      0        180        0   120
#>  [38,]  46   2      1          1        0   126
#>  [39,]  47   4      1          3        0   118
#>  [40,]  48  15      0        180        1   160
#>  [41,]  45   3      0        150        0   130
#>  [42,]  44   3      1          0        1   180
#>  [43,]  46   7      1          2        0   166
#>  [44,]  43  29      0        180        1   180
#>  [45,]  43  10      0        180        0   185
#>  [46,]  47   6      1          0        1   116
#>  [47,]  46  13      1         10        0   100
#>  [48,]  47   4      1          3        1   160
#>  [49,]  43   3      1          0        1   124
#>  [50,]  45   8      1          0        1   117
#>  [51,]  49   5      0         73        1   136
#>  [52,]  45   5      0          5        0   141
#>  [53,]  44   4      1          0        1   114
#>  [54,]  47   2      0        180        0   108
#>  [55,]  45   5      0        180        1   190
#>  [56,]  46   5      1          3        0   130
#>  [57,]  46  15      0        180        1   120
#>  [58,]  45   9      1          0        1   145
#>  [59,]  47   3      1          1        1   120
#>  [60,]  48   3      0        180        0   154
#>  [61,]  48  12      1         11        0   200
#>  [62,]  47   5      1          3        1   130
#>  [63,]  47   9      1          6        0   170
#>  [64,]  46   3      1          0        1   119
#>  [65,]  49   4      0        180        0   117
#>  [66,]  47  10      0         10        1   140
#>  [67,]  50   1      1          0        1   129
#>  [68,]  47   7      0        180        0   145
#>  [69,]  50   4      1          1        0   125
#>  [70,]  46   9      1          9        1   122
#>  [71,]  50   7      0        180        1   110
#>  [72,]  47   2      0        180        0   150
#>  [73,]  46   6      1          0        1   156
#>  [74,]  51   3      1          2        0   113
#>  [75,]  50   1      1          0        0   150
#>  [76,]  50   9      0        180        0   130
#>  [77,]  49   7      1          4        1    90
#>  [78,]  47   6      0        180        1   162
#>  [79,]  51   8      0        180        1   140
#>  [80,]  52   2      0        180        0   155
#>  [81,]  46   3      0        180        1   120
#>  [82,]  46   1      1          1        0   145
#>  [83,]  48   7      1          0        1   110
#>  [84,]  48  17      1         10        0   111
#>  [85,]  47   2      1          1        0   110
#>  [86,]  49   9      1          3        0   102
#>  [87,]  49  15      0        180        1   160
#>  [88,]  53   5      0        180        1   140
#>  [89,]  54  17      1         12        1   102
#>  [90,]  53   5      0         77        0   159
#>  [91,]  53   7      1          0        0   199
#>  [92,]  50   2      0          5        1   106
#>  [93,]  50  10      1          6        0   122
#>  [94,]  50  14      1         13        0   170
#>  [95,]  48   3      1          2        0   150
#>  [96,]  51  25      1          1        0   202
#>  [97,]  53   4      0          4        0   140
#>  [98,]  52  14      1          7        1   200
#>  [99,]  48  11      1         10        0   120
#> [100,]  51  13      0         99        1   160
#> [101,]  49  16      0         16        0   125
#> [102,]  55   3      1          1        0   150
#> [103,]  54  23      1         10        0   131
#> [104,]  52   7      1          2        0   154
#> [105,]  55   6      1          2        1   114
#> [106,]  55   4      1          2        0   150
#> [107,]  52   4      0        180        1   180
#> [108,]  50   5      1          4        1   150
#> [109,]  54   4      1          0        1   121
#> [110,]  52   4      0        180        0   183
#> [111,]  55  28      1         13        1   160
#> [112,]  49   6      1          0        1   130
#> [113,]  49   1      0          1        1   110
#> [114,]  53   9      0          9        1    95
#> [115,]  53   8      1          0        1   130
#> [116,]  50   7      1          0        1   127
#> [117,]  56   4      1          1        1   130
#> [118,]  55   1      0        180        0   127
#> [119,]  54   7      1          0        1   100
#> [120,]  56   2      0        180        0   132
#> [121,]  54   3      0        180        1   180
#> [122,]  55   6      0        180        0   170
#> [123,]  53  10      1          9        0   172
#> [124,]  52  16      1         14        0   170
#> [125,]  55   6      0        180        1   100
#> [126,]  55   6      1          5        1   138
#> [127,]  54  12      1          0        1   190
#> [128,]  55   2      0        134        1   140
#> [129,]  55   1      0          2        0   130
#> [130,]  54   7      1          2        0   129
#> [131,]  54   2      1          1        0   135
#> [132,]  52   9      1          3        0   170
#> [133,]  54   2      1          1        1   176
#> [134,]  57   1      0        180        1   156
#> [135,]  56   4      1          0        1   140
#> [136,]  52  15      1         14        0   130
#> [137,]  53   3      1          0        1   200
#> [138,]  57  10      0        180        1   170
#> [139,]  58   8      0          8        1   130
#> [140,]  54   5      0        180        1   108
#> [141,]  55   3      1          1        1   156
#> [142,]  57   0      0          0        1   150
#> [143,]  53  21      1         13        1   130
#> [144,]  59   3      1          1        0   172
#> [145,]  57   4      0        180        1   119
#> [146,]  58   6      1          0        1    90
#> [147,]  54  17      1          8        1   227
#> [148,]  55   9      1          2        1   147
#> [149,]  55  13      0        166        1   140
#> [150,]  56   5      0          5        1   150
#> [151,]  57   4      1          2        1   185
#> [152,]  53   7      1          0        1   120
#> [153,]  57  11      1         10        1   129
#> [154,]  55   3      1          2        0   140
#> [155,]  54   7      1          0        1   141
#> [156,]  56   4      0          4        0   164
#> [157,]  58   9      1          0        1   180
#> [158,]  58   1      1          1        1   200
#> [159,]  55   5      1          0        0   140
#> [160,]  56   7      1          5        1   120
#> [161,]  55   2      0          2        0   106
#> [162,]  59   9      1          1        1   125
#> [163,]  57   1      0        180        0   148
#> [164,]  60  11      1          9        0   106
#> [165,]  59   3      0        180        0   120
#> [166,]  58  11      1          9        1   124
#> [167,]  55   5      1          0        1   160
#> [168,]  59   5      0        180        1   155
#> [169,]  59   4      1          0        1   152
#> [170,]  58   4      1          3        0   120
#> [171,]  59   2      1          1        0   140
#> [172,]  58   8      0        161        1   140
#> [173,]  61   9      1          8        0   150
#> [174,]  61   3      1          2        1   102
#> [175,]  58   1      0          1        1   100
#> [176,]  57   2      1          0        1   116
#> [177,]  58  10      0         10        1   150
#> [178,]  56  14      0         45        0   130
#> [179,]  57   3      1          2        0   120
#> [180,]  58  19      1         13        1   140
#> [181,]  56  18      1         11        1   165
#> [182,]  59   9      1          0        1    80
#> [183,]  58  11      0        172        1   135
#> [184,]  60  12      1          0        1   114
#> [185,]  55   9      1          7        1   135
#> [186,]  61   4      1          0        1   115
#> [187,]  56   8      1          8        0   120
#> [188,]  61  13      1         12        1   130
#> [189,]  59  11      1          8        1   190
#> [190,]  57   1      0          1        0   126
#> [191,]  57  15      1         13        1   110
#> [192,]  58   5      1          1        1   135
#> [193,]  59  10      0        180        0   160
#> [194,]  61  13      0         13        0   210
#> [195,]  57   3      1          0        0   100
#> [196,]  61  28      1          7        0   133
#> [197,]  61   7      0          7        1   150
#> [198,]  59  13      1          2        0   198
#> [199,]  62   4      1          0        0   160
#> [200,]  60  17      1          8        1   140
#> [201,]  58   3      1          0        1   146
#> [202,]  62   4      1          3        0   173
#> [203,]  58   2      0         30        0   202
#> [204,]  59   1      0        180        0   155
#> [205,]  59  16      1          9        1   133
#> [206,]  63   6      0         28        1   120
#> [207,]  61  13      0         13        0   120
#> [208,]  61   5      0          5        1   110
#> [209,]  61   5      0          5        1   160
#> [210,]  62   1      1          0        1   172
#> [211,]  63   3      1          1        0   180
#> [212,]  61   7      0        180        0   135
#> [213,]  63   4      0        180        1   190
#> [214,]  63  15      1         10        1   126
#> [215,]  64   4      0        180        0   130
#> [216,]  63   4      1          1        0   155
#> [217,]  60  18      1         13        0   132
#> [218,]  61   9      1          9        1   150
#> [219,]  58   9      1          9        0   110
#> [220,]  62   7      0          7        0   150
#> [221,]  59   1      0         22        1   162
#> [222,]  58   2      0        180        0   127
#> [223,]  59   5      1          1        0   148
#> [224,]  60   7      1          1        1    90
#> [225,]  65  13      0        180        1   100
#> [226,]  63   1      0          1        0   162
#> [227,]  63   1      0          1        0   130
#> [228,]  62   6      0        180        0   170
#> [229,]  61  15      1         13        0   170
#> [230,]  59   4      0          4        0   149
#> [231,]  60   3      0          3        0   168
#> [232,]  64  10      1          9        0   160
#> [233,]  62   6      0          6        0   120
#> [234,]  63  12      1         10        0   200
#> [235,]  59  10      0        180        1   130
#> [236,]  61   6      1          1        1   117
#> [237,]  64  12      1         11        0   160
#> [238,]  66   1      1          0        1   120
#> [239,]  64   6      1          0        1   140
#> [240,]  63   4      1          3        0   162
#> [241,]  66   3      1          1        0   127
#> [242,]  61  10      1          2        1   194
#> [243,]  63  12      1          9        0   114
#> [244,]  65   8      1          0        0   168
#> [245,]  65  10      1          8        1   120
#> [246,]  64  21      1         10        0   190
#> [247,]  64   9      0        180        0   150
#> [248,]  61   4      0        180        1   113
#> [249,]  63  16      1          7        1   110
#> [250,]  64   7      0        180        1   120
#> [251,]  66   6      1          1        1   130
#> [252,]  63  12      0         12        1   150
#> [253,]  62   3      1          1        1   199
#> [254,]  65   3      1          0        1    80
#> [255,]  63   2      1          1        0   180
#> [256,]  67  11      0         11        1   100
#> [257,]  64   2      0          2        0   201
#> [258,]  66  18      1          5        0   142
#> [259,]  66  16      1         11        1   169
#> [260,]  62   9      0        180        0   145
#> [261,]  61  14      1          5        0   140
#> [262,]  63   9      1          8        1   160
#> [263,]  63   3      1          2        0   120
#> [264,]  65   8      1          0        1   140
#> [265,]  67   6      0        180        1   170
#> [266,]  65  15      1         11        1   160
#> [267,]  68   5      1          4        1   150
#> [268,]  64  13      1         12        1   150
#> [269,]  64   6      1          0        1   125
#> [270,]  66   7      1          0        1   115
#> [271,]  64  14      1         13        1   150
#> [272,]  65   3      0          3        0   105
#> [273,]  66   3      1          0        1   135
#> [274,]  66   6      1          0        1   140
#> [275,]  65   2      1          1        1   170
#> [276,]  64  10      1          9        1   110
#> [277,]  67   8      1          1        1   130
#> [278,]  68   5      0          5        1    90
#> [279,]  63  10      0         16        1   160
#> [280,]  64   1      0          1        1   120
#> [281,]  68  18      0        180        1   260
#> [282,]  65  18      1          3        0   120
#> [283,]  67  11      0         11        0   150
#> [284,]  68  14      0         79        0   172
#> [285,]  66  12      1         10        1   150
#> [286,]  65   4      1          2        1   145
#> [287,]  63   2      0        180        0   150
#> [288,]  65  11      1          6        0   130
#> [289,]  69  21      1         10        0   180
#> [290,]  69   6      0        180        1   100
#> [291,]  66   9      1          8        0   130
#> [292,]  63   8      0        180        1   120
#> [293,]  65   8      1          0        1    90
#> [294,]  66   3      0          3        1   138
#> [295,]  69   1      1          0        0   170
#> [296,]  67   1      0        180        1   160
#> [297,]  68  10      1         10        1   150
#> [298,]  63   2      1          0        0    99
#> [299,]  67   2      0        180        0   184
#> [300,]  65   6      0          6        0    80
#> [301,]  66  19      1         12        1   150
#> [302,]  67  12      1         12        0   160
#> [303,]  65   4      1          1        0   130
#> [304,]  64   4      0        179        0   160
#> [305,]  66   4      0        180        1   130
#> [306,]  64  11      0         11        0   125
#> [307,]  64   4      0        180        1   140
#> [308,]  67   2      0         18        0   131
#> [309,]  66   7      1          5        1   131
#> [310,]  66   4      0        180        0   177
#> [311,]  68   4      1          0        1   160
#> [312,]  69   4      1          3        1   150
#> [313,]  65  13      1         12        1   130
#> [314,]  69  17      1         10        0   140
#> [315,]  69   8      0         93        0   140
#> [316,]  64  21      0         21        1   155
#> [317,]  65   1      0          1        1   120
#> [318,]  68  18      1          0        1   160
#> [319,]  68   4      0          4        1   190
#> [320,]  71   3      0          5        0   112
#> [321,]  70   7      1          0        1   190
#> [322,]  68   7      0        150        0   210
#> [323,]  70  14      0        171        0   166
#> [324,]  67  10      1          9        0   200
#> [325,]  68  18      1         14        1   170
#> [326,]  69   0      0          0        1   148
#> [327,]  65   2      0        180        0   130
#> [328,]  69   3      1          2        0   151
#> [329,]  67  14      1         13        0   130
#> [330,]  65  14      1         13        1   150
#> [331,]  69   8      0        180        1   180
#> [332,]  71   7      0          7        0   230
#> [333,]  66   2      0          2        1   228
#> [334,]  69   5      0          5        1   142
#> [335,]  71   3      0        103        0   133
#> [336,]  67   1      0         36        1   104
#> [337,]  67   5      0          5        0   130
#> [338,]  68   6      0        180        0   145
#> [339,]  69   8      1          5        1   195
#> [340,]  69   6      1          4        1   174
#> [341,]  72   3      1          0        1   132
#> [342,]  72   7      0          7        1   110
#> [343,]  69   8      1          7        1   108
#> [344,]  66   2      1          1        0   123
#> [345,]  68  18      0         18        1   100
#> [346,]  69  11      1          0        1   120
#> [347,]  69   4      1          3        0   132
#> [348,]  68   2      0          7        1   130
#> [349,]  69   8      1          2        0   121
#> [350,]  67  13      1          9        0   130
#> [351,]  70   3      0        123        0   130
#> [352,]  70   9      0        180        1   142
#> [353,]  72   5      1          4        0   170
#> [354,]  67  22      1          1        1   140
#> [355,]  68   3      0         19        0   135
#> [356,]  67  12      1          8        0   120
#> [357,]  69   1      0          1        1   110
#> [358,]  69   5      0         76        0   120
#> [359,]  72  13      1         11        1   195
#> [360,]  68  10      1          8        1   160
#> [361,]  70  35      1          0        1   105
#> [362,]  72  30      1          0        1   145
#> [363,]  70   7      0          7        0   102
#> [364,]  68   7      1          2        0   135
#> [365,]  73  20      1          0        1   170
#> [366,]  71   6      0          9        0   120
#> [367,]  69  10      1          6        1   120
#> [368,]  70  11      0        180        1   210
#> [369,]  72  19      1          8        0   120
#> [370,]  72  12      1         10        0   170
#> [371,]  67   5      1          0        1   147
#> [372,]  73  13      0        152        1   130
#> [373,]  70   5      0        180        0   150
#> [374,]  72   2      0          2        1   100
#> [375,]  72   6      1          5        0   115
#> [376,]  71   1      0        173        1   188
#> [377,]  68  23      0        180        1   220
#> [378,]  70   3      0        180        0   121
#> [379,]  71   3      1          2        0   150
#> [380,]  68   4      1          3        0   210
#> [381,]  72   5      0         28        0   120
#> [382,]  71   5      0        180        0   191
#> [383,]  73   6      0        180        1   117
#> [384,]  69  16      1         10        1   140
#> [385,]  68   7      0        180        1   130
#> [386,]  72  16      1          1        1   130
#> [387,]  69   1      1          0        0   155
#> [388,]  72   8      1          1        1   150
#> [389,]  73   7      0          7        1   140
#> [390,]  70   3      0          3        1   159
#> [391,]  70  13      1          9        0   100
#> [392,]  72   6      0        180        1   130
#> [393,]  73   0      0        180        1   161
#> [394,]  74   8      1          0        1    85
#> [395,]  71   3      1          1        0   150
#> [396,]  71  15      1         11        0   165
#> [397,]  74   0      1          0        1    90
#> [398,]  70   5      1          0        1   190
#> [399,]  71   3      1          2        1   190
#> [400,]  69  12      1          1        1   149
#> [401,]  74   4      0          4        0   120
#> [402,]  72   5      1          3        1   160
#> [403,]  70   3      0        180        1   154
#> [404,]  73   6      0        180        0   110
#> [405,]  72  15      1          0        1   150
#> [406,]  71   7      1          2        0   143
#> [407,]  74   3      0          3        1   150
#> [408,]  73  17      1         11        0   140
#> [409,]  71  13      1          8        0   121
#> [410,]  69   2      1          1        1    80
#> [411,]  70   4      1          0        1   140
#> [412,]  71  14      1         13        1   170
#> [413,]  72  10      1          8        1   153
#> [414,]  69   7      0        180        1   144
#> [415,]  71  10      1          9        1   120
#> [416,]  75   1      0          1        0   133
#> [417,]  75   2      1          1        0   145
#> [418,]  73  10      1          9        1   146
#> [419,]  73  10      1         10        1   120
#> [420,]  71   2      0         10        1   112
#> [421,]  75   9      1          7        0   140
#> [422,]  75  13      1          1        1   130
#> [423,]  71  11      1          8        0   110
#> [424,]  72  15      1         12        1   120
#> [425,]  73  10      1          8        0   120
#> [426,]  70   7      1          4        0   184
#> [427,]  72   1      1          1        0   168
#> [428,]  70   3      0          3        0   150
#> [429,]  73  12      1         12        1   140
#> [430,]  72   2      0        180        0   120
#> [431,]  75   1      0        180        1   140
#> [432,]  73   4      0        180        0   124
#> [433,]  76   3      1          0        1   120
#> [434,]  71  32      1         12        1   107
#> [435,]  76   5      0          5        1   130
#> [436,]  77  11      0         11        1   150
#> [437,]  75   3      1          1        0   180
#> [438,]  72   7      1          2        0   142
#> [439,]  73  15      0         15        1   160
#> [440,]  73  10      1         10        0   124
#> [441,]  74   3      0          3        1   128
#> [442,]  76   1      0        180        0   114
#> [443,]  74   2      1          1        0   140
#> [444,]  76   8      1          0        1   141
#> [445,]  72   4      0         85        1   120
#> [446,]  72   4      1          3        0   160
#> [447,]  76  17      1          0        1   200
#> [448,]  73   4      1          3        1   125
#> [449,]  76  13      1         10        0   110
#> [450,]  75   4      1          0        1   122
#> [451,]  75   7      0          7        0   190
#> [452,]  75   0      0          0        1   130
#> [453,]  73  13      1         11        0   195
#> [454,]  75  12      0         12        1   160
#> [455,]  74   8      1          0        1   105
#> [456,]  76  13      1          8        1   148
#> [457,]  75   4      1          2        1   188
#> [458,]  76   4      0          4        1   155
#> [459,]  75   1      0          1        1   125
#> [460,]  72   5      0        180        0   120
#> [461,]  76  44      1         10        0   105
#> [462,]  76   5      0        180        0   185
#> [463,]  74  10      1          0        1   135
#> [464,]  76   5      1          0        1   167
#> [465,]  74   8      1          8        1   170
#> [466,]  75   9      0        180        1   140
#> [467,]  77   5      1          0        0   123
#> [468,]  77  12      1          9        1   100
#> [469,]  73  10      1          9        0   146
#> [470,]  77  12      0        180        0   130
#> [471,]  77   1      1          0        1    90
#> [472,]  73   7      1          0        0   174
#> [473,]  75   3      1          1        1   171
#> [474,]  74   9      1          8        0   200
#> [475,]  79  10      1          8        0   190
#> [476,]  78  18      0         18        1   144
#> [477,]  74   2      0        180        0   100
#> [478,]  74  15      0        180        1   172
#> [479,]  74   7      0          7        0   161
#> [480,]  76  13      1          1        1   170
#> [481,]  78  32      1          9        1   198
#> [482,]  79   6      0        180        0   170
#> [483,]  78   0      0        180        1   212
#> [484,]  78  13      1          5        0   130
#> [485,]  75   5      0        119        1   150
#> [486,]  78  15      0        180        1   270
#> [487,]  80   8      0          8        1   120
#> [488,]  75  13      1          6        0   150
#> [489,]  74  10      1          8        0   135
#> [490,]  76   1      0          1        1    83
#> [491,]  79   4      0         80        0   145
#> [492,]  78  12      1          9        0   150
#> [493,]  78   2      1          1        0   130
#> [494,]  75   4      1          0        0   212
#> [495,]  77   2      1          0        1   143
#> [496,]  76  11      1          0        0   120
#> [497,]  77  24      0         24        1   160
#> [498,]  79   8      0         32        1   120
#> [499,]  80   9      0         23        1   128
#> [500,]  78   6      1          0        1   240
#> [501,]  78  11      1          1        1   140
#> [502,]  79   2      1          0        1   121
#> [503,]  78  14      1          0        1   140
#> [504,]  78  11      1          8        1   118
#> [505,]  76   4      0          4        1   160
#> [506,]  79   4      0          4        1   125
#> [507,]  76  10      1          8        0   180
#> [508,]  76  12      1         10        1   127
#> [509,]  78  11      0        180        1   135
#> [510,]  76   1      0          1        1   140
#> [511,]  77  31      1          3        1   161
#> [512,]  76   1      0          1        1    90
#> [513,]  77   7      0        180        1   170
#> [514,]  79   4      1          0        1   120
#> [515,]  81   1      0        180        0   120
#> [516,]  77   9      1          4        0   141
#> [517,]  82   5      0          8        1   120
#> [518,]  80  40      1          0        1   138
#> [519,]  78   4      0         59        1   112
#> [520,]  80  17      1         12        0   100
#> [521,]  76   7      0        161        0   151
#> [522,]  80  15      1          0        1    90
#> [523,]  81   4      1          2        1   126
#> [524,]  80   9      0        118        1   186
#> [525,]  80   6      0        173        1   160
#> [526,]  78  32      0        180        1   130
#> [527,]  79   1      0         37        1   140
#> [528,]  81   3      0        180        0   184
#> [529,]  78   7      0          7        1   147
#> [530,]  77  13      1          0        1   190
#> [531,]  78   4      0        180        0   175
#> [532,]  79   3      0          3        1   101
#> [533,]  76   1      0        166        0   131
#> [534,]  81   4      1          1        1   104
#> [535,]  78  20      1          0        1   109
#> [536,]  78   3      1          1        1   152
#> [537,]  80   2      1          1        0   168
#> [538,]  80   6      1          0        1   119
#> [539,]  78   2      0        180        0   148
#> [540,]  79  10      0        180        1   150
#> [541,]  78  12      0        180        0   134
#> [542,]  79   1      0        125        0   193
#> [543,]  82  21      1          2        0   155
#> [544,]  84  22      1         10        0   180
#> [545,]  79   4      0          4        1   121
#> [546,]  80   6      0          6        1   110
#> [547,]  83   9      1          5        1   170
#> [548,]  82   5      0        180        0   110
#> [549,]  79   7      1          6        0   130
#> [550,]  83   4      0        103        0    97
#> [551,]  81   5      0        177        0    41
#> [552,]  80  11      1          8        0   170
#> [553,]  78  23      1         10        1   145
#> [554,]  78   9      1          4        1   120
#> [555,]  79   1      0        180        1   170
#> [556,]  81  15      0        180        1   140
#> [557,]  80   7      1          0        1   146
#> [558,]  84   5      1          1        1    85
#> [559,]  81  20      1          9        0   170
#> [560,]  81  16      0         16        1   110
#> [561,]  80  11      1          8        0   110
#> [562,]  81   8      0        180        0   146
#> [563,]  80   8      1          7        0   160
#> [564,]  79   7      0        177        0   197
#> [565,]  79   0      1          0        1    96
#> [566,]  85   4      0        180        0    90
#> [567,]  81   2      1          1        0   198
#> [568,]  83   2      0          2        1   155
#> [569,]  80   3      1          1        1   230
#> [570,]  82  23      1          0        0   110
#> [571,]  84   4      0          4        1    85
#> [572,]  84   1      0         38        1   205
#> [573,]  84   4      0         89        1   129
#> [574,]  80   2      1          0        1   130
#> [575,]  80   6      0         71        1   189
#> [576,]  83   1      0          1        1   100
#> [577,]  80  30      1         13        0   220
#> [578,]  83   9      0        180        0   198
#> [579,]  79  14      1          0        0   110
#> [580,]  83   3      0        114        0    98
#> [581,]  83   2      0        154        0   130
#> [582,]  82   0      0          2        1   100
#> [583,]  85   9      1          6        1   160
#> [584,]  83   1      0        180        0   160
#> [585,]  81   4      0          4        0   175
#> [586,]  84  15      1         13        1   110
#> [587,]  81   1      0          1        1   145
#> [588,]  81  12      0         12        1   163
#> [589,]  82  16      1          8        0   103
#> [590,]  86  12      0        180        1   120
#> [591,]  81  19      1         14        0   120
#> [592,]  82   3      1          2        0   130
#> [593,]  82  15      1          0        0   183
#> [594,]  80   2      0         88        0   135
#> [595,]  83   7      0        126        0   135
#> [596,]  86   8      0          8        1   132
#> [597,]  81  16      1          9        0   180
#> [598,]  84   6      0        165        0   145
#> [599,]  86   3      0          3        1   140
#> [600,]  84   3      0        180        1   120
#> [601,]  81  13      0        180        0   152
#> [602,]  85   3      0          3        1   118
#> [603,]  81   2      1          0        1   118
#> [604,]  81   4      0        180        0   160
#> [605,]  83   9      0        180        1   149
#> [606,]  82   1      0        180        1   193
#> [607,]  83   4      0          4        0   130
#> [608,]  87   2      0          5        1   137
#> [609,]  86  12      1          0        1   132
#> [610,]  86   6      1          0        1   140
#> [611,]  84   3      1          2        0   125
#> [612,]  83  10      1          0        1   190
#> [613,]  88  14      1          3        1   130
#> [614,]  84   3      0          3        1   121
#> [615,]  83  13      1         12        0   170
#> [616,]  84   7      1          2        0   148
#> [617,]  84   9      0         92        1   110
#> [618,]  86   4      0         38        1   122
#> [619,]  82   4      0          4        0   130
#> [620,]  86  13      0        177        0   163
#> [621,]  85   3      0          3        1   113
#> [622,]  86   6      1          1        0   112
#> [623,]  88   4      0          4        0   100
#> [624,]  83  20      1          3        1   150
#> [625,]  88   4      0          4        1   115
#> [626,]  85  22      0         22        1   184
#> [627,]  86   9      1          7        1   142
#> [628,]  87   2      0        180        1   130
#> [629,]  88   2      0        180        1    68
#> [630,]  83   3      0          3        1   130
#> [631,]  87   1      0          1        0   170
#> [632,]  85   8      0          8        1   136
#> [633,]  87  29      0         29        1    97
#> [634,]  87  15      1          9        1   138
#> [635,]  89  10      0         46        1   170
#> [636,]  90  14      0         14        1   100
#> [637,]  88   1      0          1        0   135
#> [638,]  86   4      0        180        1   145
#> [639,]  91   8      0          8        0   100
#> [640,]  91  10      0        145        0   135
#> [641,]  86   3      1          0        1    80
#> [642,]  88   8      0         50        1   154
#> [643,]  87   6      0        126        1   168
#> [644,]  86  10      0        180        1   137
#> [645,]  86   9      1          7        0   130
#> [646,]  90   4      1          0        0   121
#> [647,]  91   1      0          1        1    74
#> [648,]  87  43      0        178        1   130
#> [649,]  88   3      1          2        0   159
#> [650,]  89   3      1          1        1   160
#> [651,]  87   7      0         74        1   105
#> [652,]  91   5      0        169        1   176
#> [653,]  89  52      0         52        1   130
#> [654,]  89   4      0          4        1   159
#> [655,]  91   0      0          0        0     0
#> [656,]  89  14      0        180        1    84
#> [657,]  90  18      0        180        0   188
#> [658,]  91   4      1          0        1   120
#> [659,]  94   6      0         50        0    78
#> [660,]  90   1      0          1        1   118
#> [661,]  94   8      0          8        1   142
#> [662,]  92   4      0         76        1   149
#> [663,]  91   1      0        180        0   158
#> [664,]  90  16      0         16        1   106
#> [665,]  96   3      0         12        1    97
#> [666,]  95   8      1          5        1   150
#> [667,]  91   7      0          7        0   135
#> [668,]  92   2      0          2        0   112
#> [669,]  96   3      1          0        1   104
#> [670,]  96  15      1          0        1   140
#> 
#> $y
#>   [1]   5.0+   2.0+   5.0+ 180.0+   5.0+ 180.0+   2.0+ 180.0+ 115.0  180.0+
#>  [11] 180.0+  12.0    5.0+ 180.0+ 180.0+ 180.0+   2.0+   5.0+   2.0+ 180.0+
#>  [21] 180.0+   3.0  180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+
#>  [31] 180.0+ 180.0+   5.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+
#>  [41] 150.0  180.0+ 180.0+ 180.0+ 180.0+   6.0+ 180.0+ 180.0+ 180.0+ 180.0+
#>  [51]  73.0    5.0+ 180.0+ 180.0+ 180.0+   5.0+ 180.0+ 177.0+ 180.0+ 180.0+
#>  [61] 180.0+ 180.0+ 180.0+ 180.0+ 180.0+  10.0+ 172.0+ 180.0+ 180.0+ 180.0+
#>  [71] 180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+
#>  [81] 180.0+ 180.0+   7.0   88.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+  77.0 
#>  [91] 180.0+   5.0  180.0+ 180.0+ 180.0+ 180.0+   4.0+  85.0  180.0+  99.0 
#> [101]  16.0+ 180.0+ 152.0+   7.0+   6.0+ 180.0+ 180.0+ 171.0+ 180.0+ 180.0+
#> [111]  28.0    6.0+   1.0    9.0+ 180.0+ 180.0+ 180.0+ 180.0+   7.0+ 180.0+
#> [121] 180.0+ 180.0+ 180.0+  16.0  180.0+ 180.0+  12.0+ 134.0+   2.0  180.0+
#> [131] 180.0+ 180.0+ 180.0+ 180.0+ 165.0  180.0+ 180.0+ 180.0+   8.0+ 180.0+
#> [141] 180.0+   0.5  180.0+ 180.0+ 180.0+ 180.0+ 171.0+  15.0  166.0+   5.0+
#> [151]   4.0+ 180.0+ 180.0+ 180.0+ 180.0+   4.0+   9.0+   1.0  180.0+ 180.0+
#> [161]   2.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+
#> [171] 180.0+ 161.0+ 180.0+   3.0    1.0  180.0+  10.0+  45.0    3.0+  19.0 
#> [181] 180.0+   9.0+ 172.0+ 172.0+  24.0  180.0+   8.0  180.0+ 180.0+   1.0+
#> [191]  15.0  180.0+ 180.0+  13.0+ 180.0+  94.0    7.0  180.0+ 180.0+ 180.0+
#> [201]   3.0+ 180.0+  30.0  180.0+ 180.0+  28.0   13.0+   5.0    5.0+   1.0 
#> [211] 180.0+ 180.0+ 180.0+ 180.0+ 180.0+   4.0+ 180.0+ 180.0+   9.0    7.0+
#> [221]  22.0  180.0+ 180.0+ 180.0+ 180.0+   1.0    1.0  180.0+ 180.0+   4.0+
#> [231]   3.0+ 167.0    6.0+ 180.0+ 180.0+ 180.0+  12.0  180.0+ 180.0+ 180.0+
#> [241]   3.0+  88.0   12.0  180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+
#> [251] 180.0+  12.0  180.0+   3.0  180.0+  11.0+   2.0+  18.0+ 180.0+ 180.0+
#> [261] 180.0+ 180.0+   3.0+  15.0  180.0+ 180.0+   5.0+  13.0  180.0+ 179.0+
#> [271]  14.0+   3.0    3.0+ 180.0+ 175.0+ 180.0+   8.0    5.0   16.0    1.0 
#> [281] 180.0+ 123.0+  11.0+  79.0   80.0    4.0+ 180.0+ 180.0+ 174.0+ 180.0+
#> [291] 180.0+ 180.0+   8.0+   3.0  175.0  180.0+  10.0  180.0+ 180.0+   6.0 
#> [301]  19.0+  12.0  180.0+ 179.0+ 180.0+  11.0+ 180.0+  18.0    7.0+ 180.0+
#> [311] 180.0+ 152.0+ 180.0+ 180.0+  93.0   21.0+   1.0   18.0+   4.0    5.0 
#> [321]   7.0+ 150.0  171.0  174.0+ 180.0+   0.5  180.0+ 180.0+ 180.0+  14.0+
#> [331] 180.0+   7.0+   2.0    5.0+ 103.0   36.0    5.0+ 180.0+ 180.0+  97.0 
#> [341] 180.0+   7.0    8.0+   2.0+  18.0  180.0+ 180.0+   7.0    8.0+  13.0+
#> [351] 123.0  180.0+ 180.0+  51.0   19.0  180.0+   1.0   76.0  132.0   10.0+
#> [361] 180.0+ 162.0    7.0+   7.0+ 124.0    9.0  180.0+ 180.0+ 180.0+  12.0 
#> [371] 180.0+ 152.0  180.0+   2.0  180.0+ 173.0+ 180.0+ 180.0+ 180.0+ 180.0+
#> [381]  28.0  180.0+ 180.0+  16.0+ 180.0+  16.0+ 180.0+ 180.0+   7.0+   3.0+
#> [391]  13.0+ 180.0+ 180.0+ 180.0+   3.0+ 180.0+   0.5  180.0+   3.0   12.0 
#> [401]   4.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+   3.0  180.0+ 175.0    2.0 
#> [411] 180.0+  14.0+  10.0+ 180.0+ 179.0+   1.0  180.0+ 180.0+  15.0   10.0 
#> [421] 180.0+  13.0  180.0+ 180.0+  10.0  104.0+   1.0    3.0+  12.0  180.0+
#> [431] 180.0+ 180.0+ 180.0+ 177.0+   5.0   11.0+ 180.0+   7.0   15.0+  10.0 
#> [441]   3.0  180.0+ 180.0+ 180.0+  85.0  180.0+  17.0+ 180.0+ 174.0+   4.0 
#> [451]   7.0    0.5  180.0+  12.0  180.0+ 180.0+  46.0    4.0    1.0  180.0+
#> [461] 180.0+ 180.0+ 180.0+ 180.0+   8.0  180.0+   5.0  180.0+ 180.0+ 180.0+
#> [471]   1.0    7.0+   3.0  168.0+ 180.0+  18.0  180.0+ 180.0+   7.0  180.0+
#> [481]  32.0  180.0+ 180.0+ 172.0  119.0  180.0+   8.0  180.0+ 180.0+   1.0 
#> [491]  80.0  180.0+ 180.0+   4.0+   2.0   11.0   24.0   32.0   23.0  180.0+
#> [501] 180.0+ 180.0+ 180.0+  11.0    4.0    4.0   10.0+ 180.0+ 180.0+   1.0 
#> [511] 171.0    1.0  180.0+ 138.0  180.0+  71.0    8.0   40.0   59.0   17.0 
#> [521] 161.0  180.0+  93.0  118.0  173.0  180.0+  37.0  180.0+   7.0+  22.0 
#> [531] 180.0+   3.0  166.0+  71.0   20.0+   3.0+  10.0    6.0  180.0+ 180.0+
#> [541] 180.0+ 125.0  180.0+ 180.0+   4.0    6.0    9.0+ 180.0+ 180.0+ 103.0 
#> [551] 177.0+ 169.0   70.0  180.0+ 180.0+ 180.0+   7.0+ 180.0+  20.0   16.0 
#> [561] 180.0+ 180.0+ 180.0+ 177.0+   0.5  180.0+ 180.0+   2.0    3.0+  62.0 
#> [571]   4.0   38.0   89.0  180.0+  71.0    1.0   30.0  180.0+ 180.0+ 114.0 
#> [581] 154.0    2.0  180.0+ 180.0+   4.0+ 180.0+   1.0   12.0   16.0+ 180.0+
#> [591] 180.0+   3.0   83.0   88.0  126.0    8.0  180.0+ 165.0    3.0  180.0+
#> [601] 180.0+   3.0+ 180.0+ 180.0+ 180.0+ 180.0+   4.0+   5.0  180.0+   6.0 
#> [611] 180.0+ 180.0+  14.0    3.0   13.0  180.0+  92.0   38.0    4.0  177.0 
#> [621]   3.0+   6.0+   4.0+  20.0    4.0   22.0   11.0  180.0+ 180.0+   3.0+
#> [631]   1.0+   8.0   29.0  180.0+  46.0   14.0    1.0+ 180.0+   8.0  145.0 
#> [641]   3.0   50.0  126.0  180.0+ 180.0+   4.0    1.0  178.0+  75.0    3.0+
#> [651]  74.0  169.0   52.0    4.0    0.5  180.0+ 180.0+   4.0   50.0    1.0+
#> [661]   8.0+  76.0  180.0+  16.0   12.0    8.0    7.0+   2.0    3.0   15.0+
#> 
#> $weights
#> NULL
#> 


# Make predictions for the test rows
predictions = learner$predict(task, row_ids = ids$test)
#> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's').

# Score the predictions
predictions$score()
#> surv.cindex 
#>   0.8556432