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.201600
#> 2   1  0.67 0.183700
#> 3   2  1.31 0.167400
#> 4   2  2.30 0.152500
#> 5   2  3.15 0.138900
#> 6   3  5.36 0.126600
#> 7   3  7.97 0.115400
#> 8   3  9.94 0.105100
#> 9   3 11.47 0.095770
#> 10  3 12.70 0.087260
#> 11  4 13.74 0.079510
#> 12  4 14.62 0.072450
#> 13  4 15.35 0.066010
#> 14  4 15.96 0.060150
#> 15  4 16.48 0.054800
#> 16  4 16.92 0.049930
#> 17  4 17.29 0.045500
#> 18  4 17.60 0.041460
#> 19  4 17.87 0.037770
#> 20  4 18.09 0.034420
#> 21  5 18.29 0.031360
#> 22  6 18.48 0.028570
#> 23  6 18.64 0.026040
#> 24  6 18.78 0.023720
#> 25  6 18.90 0.021620
#> 26  6 19.00 0.019700
#> 27  6 19.08 0.017950
#> 28  6 19.15 0.016350
#> 29  6 19.21 0.014900
#> 30  6 19.26 0.013580
#> 31  6 19.30 0.012370
#> 32  6 19.34 0.011270
#> 33  6 19.36 0.010270
#> 34  6 19.39 0.009357
#> 35  6 19.41 0.008526
#> 36  6 19.43 0.007768
#> 37  6 19.44 0.007078
#> 38  6 19.45 0.006449
#> 39  6 19.46 0.005876
#> 40  6 19.47 0.005354
#> 41  6 19.48 0.004879
#> 42  6 19.49 0.004445
#> 43  6 19.49 0.004050
#> 44  6 19.50 0.003690
#> 45  6 19.50 0.003363
#> 
#> $x
#>        age los revasc revascdays stchange sysbp
#>   [1,]  28   9      0        180        1   107
#>   [2,]  35   5      1          2        0   172
#>   [3,]  35  10      1          9        0   106
#>   [4,]  35   2      0        180        0   121
#>   [5,]  35   2      1          1        1   112
#>   [6,]  37   9      0        180        1   151
#>   [7,]  38  13      1          0        1   161
#>   [8,]  36   1      0        180        1   155
#>   [9,]  38  12      1          8        1   120
#>  [10,]  36   5      1          0        1   115
#>  [11,]  42   2      0        180        1   100
#>  [12,]  38   5      1          3        0   125
#>  [13,]  42   2      0          2        0   140
#>  [14,]  40   6      0        180        1   138
#>  [15,]  40  11      1         10        1   120
#>  [16,]  42   2      0        180        0   100
#>  [17,]  41   2      1          1        0   166
#>  [18,]  40   1      1          0        1   145
#>  [19,]  42   4      0        180        0   162
#>  [20,]  42  15      1         13        1   125
#>  [21,]  40   3      1          1        0   170
#>  [22,]  43   2      1          1        1   116
#>  [23,]  44   5      1          1        0   170
#>  [24,]  41  10      1          8        0   150
#>  [25,]  41  13      1          1        0   140
#>  [26,]  45   6      0        180        1   170
#>  [27,]  41   5      1          4        1   141
#>  [28,]  44   2      1          1        1   150
#>  [29,]  45   2      0        180        1   140
#>  [30,]  46  15      0        180        0   120
#>  [31,]  46   2      1          1        0   126
#>  [32,]  48  15      0        180        1   160
#>  [33,]  45   3      0        150        0   130
#>  [34,]  46   7      1          2        0   166
#>  [35,]  43  29      0        180        1   180
#>  [36,]  45   4      1          0        0   124
#>  [37,]  43  10      0        180        0   185
#>  [38,]  47   6      1          0        1   116
#>  [39,]  46  13      1         10        0   100
#>  [40,]  44   0      1          0        1    96
#>  [41,]  43   3      1          0        1   124
#>  [42,]  45   8      1          0        1   117
#>  [43,]  49   5      0         73        1   136
#>  [44,]  45   5      0          5        0   141
#>  [45,]  46   2      1          1        1   122
#>  [46,]  46   6      1          0        1   100
#>  [47,]  44   4      1          0        1   114
#>  [48,]  47   2      0        180        0   108
#>  [49,]  45   5      0        180        1   190
#>  [50,]  46   5      1          3        0   130
#>  [51,]  46   4      0        180        1   121
#>  [52,]  45   9      1          0        1   145
#>  [53,]  47   3      1          1        1   120
#>  [54,]  48   3      0        180        0   154
#>  [55,]  47   5      1          3        1   130
#>  [56,]  47   9      1          6        0   170
#>  [57,]  46   3      1          0        1   119
#>  [58,]  49   4      0        180        0   117
#>  [59,]  47  10      0         10        1   140
#>  [60,]  50   1      1          0        1   129
#>  [61,]  47   7      0        180        0   145
#>  [62,]  50   4      1          1        0   125
#>  [63,]  49   7      1          7        1   110
#>  [64,]  46   9      1          9        1   122
#>  [65,]  50   7      0        180        1   110
#>  [66,]  51   1      0          1        1   145
#>  [67,]  49  15      1         11        1   160
#>  [68,]  49  23      0        179        1   112
#>  [69,]  46   6      1          0        1   156
#>  [70,]  50   4      0          4        1   100
#>  [71,]  51   3      1          2        0   113
#>  [72,]  50   1      1          0        0   150
#>  [73,]  50   9      0        180        0   130
#>  [74,]  47   8      0        180        0   160
#>  [75,]  47   6      0        180        1   162
#>  [76,]  51   8      0        180        1   140
#>  [77,]  52   2      0        180        0   155
#>  [78,]  46   3      0        180        1   120
#>  [79,]  46   1      1          1        0   145
#>  [80,]  50   4      1          1        0   150
#>  [81,]  49   9      1          3        0   102
#>  [82,]  53   5      0        180        1   140
#>  [83,]  54  17      1         12        1   102
#>  [84,]  54   6      1          3        0   129
#>  [85,]  50   2      0          5        1   106
#>  [86,]  49   5      1          2        1   150
#>  [87,]  52  14      1          7        1   200
#>  [88,]  48  11      1         10        0   120
#>  [89,]  53   4      1          0        1   156
#>  [90,]  54   9      1          0        1   138
#>  [91,]  49  16      0         16        0   125
#>  [92,]  54  23      1         10        0   131
#>  [93,]  52   7      1          2        0   154
#>  [94,]  55   6      1          2        1   114
#>  [95,]  54   9      1          1        0   130
#>  [96,]  55   4      1          2        0   150
#>  [97,]  52   4      0        180        1   180
#>  [98,]  51  13      1         11        0   145
#>  [99,]  50   5      1          4        1   150
#> [100,]  54   4      1          0        1   121
#> [101,]  52   4      0        180        0   183
#> [102,]  50   3      0        174        1   153
#> [103,]  49   6      1          0        1   130
#> [104,]  49   1      0          1        1   110
#> [105,]  50   7      1          1        0   156
#> [106,]  53   8      1          0        1   130
#> [107,]  56   4      1          1        1   130
#> [108,]  52   5      0        175        1   117
#> [109,]  55   1      0        180        0   127
#> [110,]  55   2      0          2        0   145
#> [111,]  54   1      0        180        0   162
#> [112,]  54   7      1          0        1   100
#> [113,]  56   2      0        180        0   132
#> [114,]  54   3      0        180        1   180
#> [115,]  52  16      0         16        0   152
#> [116,]  52  16      1         14        0   170
#> [117,]  53  15      0         15        1    90
#> [118,]  55   6      0        180        1   100
#> [119,]  54  12      1          0        1   190
#> [120,]  55   2      0        134        1   140
#> [121,]  55   1      0          2        0   130
#> [122,]  57   3      0          3        0   120
#> [123,]  54   7      1          2        0   129
#> [124,]  54   2      1          1        0   135
#> [125,]  57   5      1          3        1   138
#> [126,]  56   4      1          0        1   140
#> [127,]  55  11      1          7        0   104
#> [128,]  52  15      1         14        0   130
#> [129,]  57  10      0        180        1   170
#> [130,]  58   8      0          8        1   130
#> [131,]  54   5      0        180        1   108
#> [132,]  53  21      1         13        1   130
#> [133,]  59   3      1          1        0   172
#> [134,]  57   4      0        180        1   119
#> [135,]  54  17      1          8        1   227
#> [136,]  55   9      1          2        1   147
#> [137,]  55  13      0        166        1   140
#> [138,]  57   4      1          2        1   185
#> [139,]  57  11      1         10        1   129
#> [140,]  55   3      1          2        0   140
#> [141,]  55   5      0          5        1   131
#> [142,]  54   7      1          0        1   141
#> [143,]  56   4      0          4        0   164
#> [144,]  59  15      1         10        0   140
#> [145,]  58   9      1          0        1   180
#> [146,]  55   2      0          2        0   106
#> [147,]  59   9      1          1        1   125
#> [148,]  57   1      0        180        0   148
#> [149,]  60  11      1          9        0   106
#> [150,]  59   3      0        180        0   120
#> [151,]  58   4      1          0        1   160
#> [152,]  57   2      0          2        1   120
#> [153,]  57   5      0        180        1   130
#> [154,]  55   5      1          0        1   160
#> [155,]  57  10      1          9        0   103
#> [156,]  59   5      0        180        1   155
#> [157,]  58  26      1          0        1   189
#> [158,]  61   9      0          9        1   160
#> [159,]  58   4      1          3        0   120
#> [160,]  58   8      0        161        1   140
#> [161,]  58  14      1          6        0   190
#> [162,]  61   4      1          3        0   151
#> [163,]  61   9      1          8        0   150
#> [164,]  61   3      1          2        1   102
#> [165,]  58   1      0          1        1   100
#> [166,]  57  13      1         10        0   110
#> [167,]  57   2      1          0        1   116
#> [168,]  58  10      0         10        1   150
#> [169,]  57   4      1          3        0   138
#> [170,]  57  11      0        180        1   150
#> [171,]  61   3      0         17        0   143
#> [172,]  57   3      1          2        0   120
#> [173,]  56  13      1          6        1   158
#> [174,]  59   9      1          0        1    80
#> [175,]  55   4      1          3        1   160
#> [176,]  58  11      0        172        1   135
#> [177,]  60  12      1          0        1   114
#> [178,]  55   9      1          7        1   135
#> [179,]  61   4      1          0        1   115
#> [180,]  59  11      1          8        1   190
#> [181,]  57   1      0          1        0   126
#> [182,]  59   5      1          2        0   182
#> [183,]  59  10      0        180        0   160
#> [184,]  61  13      0         13        0   210
#> [185,]  58   8      1          5        0   152
#> [186,]  62  10      1          0        1   153
#> [187,]  62   7      1          2        1   180
#> [188,]  57   3      1          0        0   100
#> [189,]  61  28      1          7        0   133
#> [190,]  58   8      1          3        1   150
#> [191,]  57   7      0        169        0   180
#> [192,]  61   7      0          7        1   150
#> [193,]  61   6      0          6        0   134
#> [194,]  59  13      1          2        0   198
#> [195,]  57  12      1          9        1   120
#> [196,]  60  17      1          8        1   140
#> [197,]  58   3      1          0        1   146
#> [198,]  62   4      1          3        0   173
#> [199,]  63   6      0         28        1   120
#> [200,]  57  18      1          9        1    93
#> [201,]  61   5      0          5        1   160
#> [202,]  57   2      1          1        0   159
#> [203,]  62  17      1         10        1   180
#> [204,]  62   1      1          0        1   172
#> [205,]  61   7      0        180        0   135
#> [206,]  63   4      1          3        0   222
#> [207,]  64   4      0        180        0   130
#> [208,]  63   4      1          1        0   155
#> [209,]  60  18      1         13        0   132
#> [210,]  58   9      1          9        0   110
#> [211,]  62   7      0          7        0   150
#> [212,]  59   1      0         22        1   162
#> [213,]  58   2      0        180        0   127
#> [214,]  59   4      0        180        0   196
#> [215,]  60   7      1          5        1   141
#> [216,]  60   7      1          1        1    90
#> [217,]  65  13      0        180        1   100
#> [218,]  63   1      0          1        0   162
#> [219,]  63   1      0          1        0   130
#> [220,]  62   6      0        180        0   170
#> [221,]  61  15      1         13        0   170
#> [222,]  64  10      1          9        0   160
#> [223,]  62   6      0          6        0   120
#> [224,]  60   8      0         17        1   130
#> [225,]  61   6      1          1        1   117
#> [226,]  64  12      1         11        0   160
#> [227,]  66   1      1          0        1   120
#> [228,]  64   6      1          0        1   140
#> [229,]  63  14      1          9        0   123
#> [230,]  65  36      1         11        0   140
#> [231,]  63   4      1          3        0   162
#> [232,]  66   3      1          1        0   127
#> [233,]  61  10      1          2        1   194
#> [234,]  63  12      1          9        0   114
#> [235,]  66   5      1          0        1   110
#> [236,]  65  10      1          8        1   120
#> [237,]  61  12      1         11        0   154
#> [238,]  65   3      0        180        1   190
#> [239,]  63  16      1          7        1   110
#> [240,]  66   6      1          1        1   130
#> [241,]  63  12      0         12        1   150
#> [242,]  65   6      0          9        0   112
#> [243,]  65   3      1          0        1    80
#> [244,]  63   2      1          1        0   180
#> [245,]  67  11      0         11        1   100
#> [246,]  64   2      0          2        0   201
#> [247,]  66  18      1          5        0   142
#> [248,]  66  16      1         11        1   169
#> [249,]  61  15      1         10        0   130
#> [250,]  63   9      1          8        1   160
#> [251,]  63   2      1          0        0   140
#> [252,]  64  19      1          8        1   160
#> [253,]  65   8      1          0        1   140
#> [254,]  67   6      0        180        1   170
#> [255,]  65  15      1         11        1   160
#> [256,]  68   5      1          4        1   150
#> [257,]  64  13      1         12        1   150
#> [258,]  64   6      1          0        1   125
#> [259,]  66  13      1          0        0   118
#> [260,]  65   3      0          3        0   105
#> [261,]  64   0      0          0        1   148
#> [262,]  66   3      1          0        1   135
#> [263,]  66   6      1          0        1   140
#> [264,]  65   2      1          1        1   170
#> [265,]  68   1      0        180        1   166
#> [266,]  67   8      1          1        1   130
#> [267,]  68   5      0          5        1    90
#> [268,]  63  10      0         16        1   160
#> [269,]  66  14      0        180        0   130
#> [270,]  68  18      0        180        1   260
#> [271,]  65  18      1          3        0   120
#> [272,]  63  10      0         18        1   130
#> [273,]  67  11      0         11        0   150
#> [274,]  68  14      0         79        0   172
#> [275,]  66  12      1         10        1   150
#> [276,]  66  11      1          0        0   100
#> [277,]  65   4      1          2        1   145
#> [278,]  66  15      1         13        1   160
#> [279,]  69   6      0        180        1   100
#> [280,]  66   9      1          8        0   130
#> [281,]  68  14      1         13        1   140
#> [282,]  67   1      0        180        1   160
#> [283,]  68  10      1         10        1   150
#> [284,]  67   7      1          4        1   130
#> [285,]  63   2      1          0        0    99
#> [286,]  67   2      0        180        0   184
#> [287,]  65  10      1          1        1   148
#> [288,]  69   6      0         99        1   140
#> [289,]  65   4      1          1        0   130
#> [290,]  70  15      1         12        1   132
#> [291,]  64   4      0        180        1   140
#> [292,]  66   4      0        180        0   177
#> [293,]  68   4      1          0        1   160
#> [294,]  69   4      1          3        1   150
#> [295,]  64  21      0         21        1   155
#> [296,]  66   6      0        180        0   140
#> [297,]  65   1      0          1        1   120
#> [298,]  65   6      0        101        1   115
#> [299,]  71   3      0          5        0   112
#> [300,]  71  20      1          0        1   160
#> [301,]  67   2      0        180        0   128
#> [302,]  66   9      1          3        1   151
#> [303,]  66   1      1          1        1   165
#> [304,]  70   4      1          0        1   180
#> [305,]  69   8      0        180        1   153
#> [306,]  70  14      0        171        0   166
#> [307,]  68  18      1         14        1   170
#> [308,]  69   0      0          0        1   148
#> [309,]  65   2      0        180        0   130
#> [310,]  68   7      1          0        1   150
#> [311,]  69   3      1          2        0   151
#> [312,]  69   8      0        180        1   180
#> [313,]  71   7      0          7        0   230
#> [314,]  66   2      0          2        1   228
#> [315,]  71   6      0         45        1   158
#> [316,]  69   5      0          5        1   142
#> [317,]  69   3      0          3        1   130
#> [318,]  70  22      1         13        0   103
#> [319,]  67   1      0         36        1   104
#> [320,]  68   6      0        180        0   145
#> [321,]  69   8      1          5        1   195
#> [322,]  69   6      1          4        1   174
#> [323,]  72   3      1          0        1   132
#> [324,]  69   8      1          7        1   108
#> [325,]  67   3      0        180        0   110
#> [326,]  66   2      1          1        0   123
#> [327,]  67  14      0        172        1   140
#> [328,]  69  11      1          0        1   120
#> [329,]  66   2      0        180        0   130
#> [330,]  69   4      1          3        0   132
#> [331,]  69   8      1          2        0   121
#> [332,]  67  13      1          9        0   130
#> [333,]  70   3      0        123        0   130
#> [334,]  70   9      0        180        1   142
#> [335,]  72   5      1          4        0   170
#> [336,]  67  22      1          1        1   140
#> [337,]  68   3      0         19        0   135
#> [338,]  67  12      1          8        0   120
#> [339,]  69   1      0          1        1   110
#> [340,]  67   1      0          1        1    60
#> [341,]  69   5      0         76        0   120
#> [342,]  67   8      1          0        1   130
#> [343,]  68  10      1          8        1   160
#> [344,]  70  35      1          0        1   105
#> [345,]  72  30      1          0        1   145
#> [346,]  70   7      0          7        0   102
#> [347,]  68   7      1          2        0   135
#> [348,]  71   6      0          9        0   120
#> [349,]  69  10      1          6        1   120
#> [350,]  70  11      0        180        1   210
#> [351,]  72  19      1          8        0   120
#> [352,]  72  12      1         10        0   170
#> [353,]  67   5      1          0        1   147
#> [354,]  67   9      0        180        0   158
#> [355,]  73  13      0        152        1   130
#> [356,]  70   5      0        180        0   150
#> [357,]  67   4      1          1        0   134
#> [358,]  71   1      0        173        1   188
#> [359,]  68  23      0        180        1   220
#> [360,]  70   3      0        180        0   121
#> [361,]  71   3      1          2        0   150
#> [362,]  68   4      1          3        0   210
#> [363,]  72   5      0         28        0   120
#> [364,]  71   5      0        180        0   191
#> [365,]  69  16      1         10        1   140
#> [366,]  72  16      1          1        1   130
#> [367,]  69   1      1          0        0   155
#> [368,]  72   8      1          1        1   150
#> [369,]  71   2      1          0        1   180
#> [370,]  73   7      0          7        1   140
#> [371,]  68  15      1         13        1   130
#> [372,]  70   3      0          3        1   159
#> [373,]  70  13      1          9        0   100
#> [374,]  73   0      0        180        1   161
#> [375,]  71   3      1          1        0   150
#> [376,]  71  15      1         11        0   165
#> [377,]  74  20      0         20        1   180
#> [378,]  68   9      0        180        1   120
#> [379,]  73   3      1          0        1   136
#> [380,]  70   5      1          0        1   190
#> [381,]  71  17      1         11        0   160
#> [382,]  71   8      1          7        0   149
#> [383,]  73  10      1          8        0   106
#> [384,]  69  12      1          1        1   149
#> [385,]  74   4      0          4        0   120
#> [386,]  73   4      0         58        1   160
#> [387,]  72   5      1          3        1   160
#> [388,]  70   3      0        180        1   154
#> [389,]  73   6      0        180        0   110
#> [390,]  72   8      1          0        1   140
#> [391,]  74   3      0          3        1   150
#> [392,]  70   4      1          0        1   140
#> [393,]  71  14      1         13        1   170
#> [394,]  74   7      1          0        1   117
#> [395,]  72  10      1          8        1   153
#> [396,]  69   7      0        180        1   144
#> [397,]  70   8      0          8        0   120
#> [398,]  71  10      1          9        1   120
#> [399,]  75   1      0          1        0   133
#> [400,]  75   2      1          1        0   145
#> [401,]  73  10      1          9        1   146
#> [402,]  73  10      1         10        1   120
#> [403,]  74  15      1          9        1   179
#> [404,]  71   2      0         10        1   112
#> [405,]  73   1      0          1        1    80
#> [406,]  75   9      1          7        0   140
#> [407,]  75  13      1          1        1   130
#> [408,]  71   4      0          4        0   134
#> [409,]  73  10      1          8        0   120
#> [410,]  70   7      1          4        0   184
#> [411,]  72   1      1          1        0   168
#> [412,]  72   7      0         57        1   145
#> [413,]  73  10      0        180        0   162
#> [414,]  70   3      0          3        0   150
#> [415,]  76  25      1         12        1   170
#> [416,]  73  12      1         12        1   140
#> [417,]  72   2      0        180        0   120
#> [418,]  72   4      1          0        1   197
#> [419,]  71   3      1          0        0   144
#> [420,]  73   5      0        180        0   126
#> [421,]  73   4      0        180        0   124
#> [422,]  74  34      1          8        1   233
#> [423,]  76   3      1          0        1   120
#> [424,]  72   5      0        180        0   154
#> [425,]  77   4      0          4        0   185
#> [426,]  75   3      1          1        0   180
#> [427,]  72   7      1          2        0   142
#> [428,]  71  16      0        180        0   140
#> [429,]  73  10      1         10        0   124
#> [430,]  74   7      0        180        1   150
#> [431,]  74   3      0          3        1   128
#> [432,]  76   1      0        180        0   114
#> [433,]  74   2      1          1        0   140
#> [434,]  76   8      1          0        1   141
#> [435,]  74  19      1          4        1   200
#> [436,]  73   6      0          6        1   114
#> [437,]  74   2      0        180        0   190
#> [438,]  72   4      1          3        0   160
#> [439,]  76  17      1          0        1   200
#> [440,]  73   4      1          3        1   125
#> [441,]  75   7      0          7        0   190
#> [442,]  75   0      0          0        1   130
#> [443,]  73  13      1         11        0   195
#> [444,]  75  12      0         12        1   160
#> [445,]  76  13      1          8        1   148
#> [446,]  75   4      1          2        1   188
#> [447,]  76   4      0          4        1   155
#> [448,]  75   1      0          1        1   125
#> [449,]  74   2      0        180        0   111
#> [450,]  73   1      0         52        1   105
#> [451,]  72   5      0        180        0   120
#> [452,]  76  44      1         10        0   105
#> [453,]  74  10      1          0        1   135
#> [454,]  76   5      1          0        1   167
#> [455,]  74   8      1          8        1   170
#> [456,]  75   9      0        180        1   140
#> [457,]  73  33      1         12        1   175
#> [458,]  77   5      1          0        0   123
#> [459,]  77  12      1          9        1   100
#> [460,]  73  10      1          9        0   146
#> [461,]  76  12      1         11        1   120
#> [462,]  73   7      1          0        0   174
#> [463,]  74   6      0         79        1   140
#> [464,]  75   3      1          1        1   171
#> [465,]  75   6      0        180        0   150
#> [466,]  79  10      1          8        0   190
#> [467,]  74   2      1          0        1   130
#> [468,]  78  18      0         18        1   144
#> [469,]  77   3      0        180        0   110
#> [470,]  76  29      0         47        0    90
#> [471,]  73  11      1          2        1   110
#> [472,]  78   7      0          7        1   133
#> [473,]  74  15      0        180        1   172
#> [474,]  76  13      1          1        1   170
#> [475,]  78  32      1          9        1   198
#> [476,]  80  10      1          6        1   147
#> [477,]  78   0      0        180        1   212
#> [478,]  78  13      1          5        0   130
#> [479,]  75   5      0        119        1   150
#> [480,]  75  12      1          1        1   120
#> [481,]  78  15      0        180        1   270
#> [482,]  80   8      0          8        1   120
#> [483,]  75  13      1          6        0   150
#> [484,]  76   1      0          1        1    83
#> [485,]  79   4      0         80        0   145
#> [486,]  78   2      1          1        0   130
#> [487,]  75   4      1          0        0   212
#> [488,]  78  10      0        180        1   130
#> [489,]  76  11      1          0        0   120
#> [490,]  75  11      1          4        0   162
#> [491,]  75   3      0          3        0     0
#> [492,]  77  24      0         24        1   160
#> [493,]  79   8      0         32        1   120
#> [494,]  80   9      0         23        1   128
#> [495,]  78   6      1          0        1   240
#> [496,]  78  11      1          1        1   140
#> [497,]  78  11      1          8        1   118
#> [498,]  79   4      0          4        1   125
#> [499,]  76  12      1         10        1   127
#> [500,]  77   6      0          6        1   107
#> [501,]  80   3      1          0        1   120
#> [502,]  75   2      1          1        1   204
#> [503,]  78  11      0        180        1   135
#> [504,]  76   1      0          1        1   140
#> [505,]  76   1      0          1        1    90
#> [506,]  78   7      1          0        1   110
#> [507,]  79   3      0          3        0   120
#> [508,]  77   7      0        180        1   170
#> [509,]  77   6      0          6        1   144
#> [510,]  79   4      1          0        1   120
#> [511,]  81   1      0        180        0   120
#> [512,]  80  15      1         12        1   150
#> [513,]  78   4      0         59        1   112
#> [514,]  80  17      1         12        0   100
#> [515,]  76   7      0        161        0   151
#> [516,]  79  10      0         10        1   120
#> [517,]  81   4      1          2        1   126
#> [518,]  79  28      0        164        0   100
#> [519,]  80   9      0        118        1   186
#> [520,]  80   6      0        173        1   160
#> [521,]  78  32      0        180        1   130
#> [522,]  81   3      0        180        0   184
#> [523,]  81   2      0        175        0   172
#> [524,]  78   7      0          7        1   147
#> [525,]  78  15      0         15        0   165
#> [526,]  80   5      1          1        1   108
#> [527,]  78   4      0        180        0   175
#> [528,]  79   3      0          3        1   101
#> [529,]  78  26      1          5        0   194
#> [530,]  76   1      0        166        0   131
#> [531,]  80   1      0          1        0   100
#> [532,]  78   3      1          1        1   152
#> [533,]  82   3      1          1        1   144
#> [534,]  77   5      0         85        0   188
#> [535,]  79   6      0          6        0   152
#> [536,]  78   2      0        180        0   148
#> [537,]  80   5      0          5        1   130
#> [538,]  82   1      1          0        1    82
#> [539,]  79  10      0        180        1   150
#> [540,]  77   4      0        180        1    98
#> [541,]  81   1      0        108        0   129
#> [542,]  78  12      0        180        0   134
#> [543,]  80   6      0          6        1   110
#> [544,]  82   5      0        180        0   110
#> [545,]  79   7      1          6        0   130
#> [546,]  83   4      0        103        0    97
#> [547,]  80  11      1          8        0   170
#> [548,]  78  23      1         10        1   145
#> [549,]  78   9      1          4        1   120
#> [550,]  82   8      1          1        0   128
#> [551,]  79   1      0        180        1   170
#> [552,]  81  15      0        180        1   140
#> [553,]  80   7      1          0        1   146
#> [554,]  81  16      0         16        1   110
#> [555,]  81   8      0        180        0   146
#> [556,]  79   7      0        177        0   197
#> [557,]  85   4      0        180        0    90
#> [558,]  83   2      0          2        1   155
#> [559,]  82   6      0        128        1   100
#> [560,]  84   4      0        167        0   198
#> [561,]  80   3      1          1        1   230
#> [562,]  82  23      1          0        0   110
#> [563,]  84   4      0          4        1    85
#> [564,]  81   1      0          1        1   150
#> [565,]  84   1      0         38        1   205
#> [566,]  81   4      0         90        1   138
#> [567,]  80  13      1          8        1   140
#> [568,]  84   4      0         89        1   129
#> [569,]  80   2      1          0        1   130
#> [570,]  79   4      0          4        1    60
#> [571,]  83   1      0          1        1   100
#> [572,]  82  19      0         19        0   120
#> [573,]  83   9      0        180        0   198
#> [574,]  79  14      1          0        0   110
#> [575,]  83   3      0        114        0    98
#> [576,]  81  14      1         12        1   128
#> [577,]  83   2      0        154        0   130
#> [578,]  83   1      0        180        0   160
#> [579,]  81   4      0          4        0   175
#> [580,]  84  15      1         13        1   110
#> [581,]  81   1      0          1        1   145
#> [582,]  81  12      0         12        1   163
#> [583,]  82   5      1          0        1   146
#> [584,]  81   4      0          4        0   160
#> [585,]  86  12      0        180        1   120
#> [586,]  83  12      1          2        1   170
#> [587,]  81  19      1         14        0   120
#> [588,]  82   3      1          2        0   130
#> [589,]  82  15      1          0        0   183
#> [590,]  83   7      0        126        0   135
#> [591,]  86   8      0          8        1   132
#> [592,]  84   6      0        165        0   145
#> [593,]  86   3      0          3        1   140
#> [594,]  82   9      0        180        1   134
#> [595,]  84   3      0        180        1   120
#> [596,]  81  13      0        180        0   152
#> [597,]  85   3      0          3        1   118
#> [598,]  82   1      0        180        1   193
#> [599,]  83   4      0          4        0   130
#> [600,]  86  12      1          0        1   132
#> [601,]  82  14      1         11        1   103
#> [602,]  86   6      1          0        1   140
#> [603,]  84  16      0         70        1   150
#> [604,]  83  19      0         43        0   150
#> [605,]  84   3      1          2        0   125
#> [606,]  83  10      1          0        1   190
#> [607,]  86   2      0        180        1   169
#> [608,]  84   3      0          3        1   121
#> [609,]  83  13      1         12        0   170
#> [610,]  84   9      0         92        1   110
#> [611,]  84   3      0        180        1   170
#> [612,]  86   4      0         38        1   122
#> [613,]  82   4      0          4        0   130
#> [614,]  86  13      0        177        0   163
#> [615,]  86   6      0          6        1   117
#> [616,]  88   4      0          4        0   100
#> [617,]  85  22      0         22        1   184
#> [618,]  83   9      0         65        1   150
#> [619,]  86   9      1          7        1   142
#> [620,]  87   2      0        180        1   130
#> [621,]  86   6      0         46        0   173
#> [622,]  88   3      0        115        0   110
#> [623,]  88   2      0        180        1    68
#> [624,]  87   8      0          8        1   157
#> [625,]  86  15      1          8        1   109
#> [626,]  88   4      0          4        0    86
#> [627,]  89   4      0          4        1   153
#> [628,]  89   5      0        119        1   140
#> [629,]  87   6      0        180        1   110
#> [630,]  87   1      0          1        0   170
#> [631,]  84   2      0        110        1   174
#> [632,]  87  29      0         29        1    97
#> [633,]  84   0      0        180        1   136
#> [634,]  88   1      0          1        0   135
#> [635,]  86   4      0        180        1   145
#> [636,]  91   8      0          8        0   100
#> [637,]  87   2      0        180        0   160
#> [638,]  87   6      1          0        0   125
#> [639,]  88   8      0         50        1   154
#> [640,]  87   6      0        126        1   168
#> [641,]  86   9      1          7        0   130
#> [642,]  90   4      1          0        0   121
#> [643,]  91   1      0          1        1    74
#> [644,]  90   5      1          0        1   125
#> [645,]  89   3      1          1        1   160
#> [646,]  92   1      0          1        1   167
#> [647,]  91   3      0         33        1   137
#> [648,]  88   5      0        158        0   100
#> [649,]  87   7      0         74        1   105
#> [650,]  89   2      0        168        0   118
#> [651,]  91   5      0        169        1   176
#> [652,]  92   7      0          7        1   110
#> [653,]  89   4      0          4        1   159
#> [654,]  91   0      0          0        0     0
#> [655,]  89  14      0        180        1    84
#> [656,]  90  18      0        180        0   188
#> [657,]  91   4      1          0        1   120
#> [658,]  94   6      0         50        0    78
#> [659,]  93   8      0        179        1   110
#> [660,]  94   8      0          8        1   142
#> [661,]  91   1      0        180        0   158
#> [662,]  90  16      0         16        1   106
#> [663,]  95   8      1          5        1   150
#> [664,]  91  12      0         53        1   212
#> [665,]  91   7      0          7        0   135
#> [666,]  93   0      1          0        1   122
#> [667,]  92   5      0         69        0   139
#> [668,]  92   2      0          2        0   112
#> [669,]  96   3      1          0        1   104
#> [670,]  96  15      1          0        1   140
#> 
#> $y
#>   [1] 180.0+   5.0+ 180.0+ 180.0+   2.0+ 180.0+ 180.0+ 180.0+  12.0    5.0+
#>  [11] 180.0+   5.0+   2.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+
#>  [21] 180.0+   2.0+ 155.0+ 180.0+ 180.0+ 180.0+   5.0+ 180.0+ 180.0+ 180.0+
#>  [31] 180.0+ 180.0+ 150.0  180.0+ 180.0+ 180.0+ 180.0+   6.0+ 180.0+ 180.0+
#>  [41] 180.0+ 180.0+  73.0    5.0+ 161.0+ 180.0+ 180.0+ 180.0+ 180.0+   5.0+
#>  [51] 180.0+ 177.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+  10.0+ 172.0+
#>  [61] 180.0+ 180.0+   7.0  180.0+ 180.0+   1.0  179.0+ 179.0+ 180.0+   4.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+ 180.0+ 180.0+   5.0  180.0+  85.0  180.0+ 166.0+ 180.0+
#>  [91]  16.0+ 152.0+   7.0+   6.0+ 180.0+ 180.0+ 180.0+  13.0+ 171.0+ 180.0+
#> [101] 180.0+ 174.0+   6.0+   1.0  180.0+ 180.0+ 180.0+ 175.0+ 180.0+   2.0 
#> [111] 180.0+   7.0+ 180.0+ 180.0+  16.0+  16.0   15.0+ 180.0+  12.0+ 134.0+
#> [121]   2.0    3.0+ 180.0+ 180.0+ 140.0  165.0  180.0+ 180.0+ 180.0+   8.0+
#> [131] 180.0+ 180.0+ 180.0+ 180.0+ 171.0+  15.0  166.0+   4.0+ 180.0+ 180.0+
#> [141]   5.0+ 180.0+   4.0+ 180.0+   9.0+   2.0+ 180.0+ 180.0+ 180.0+ 180.0+
#> [151] 180.0+   2.0  180.0+ 180.0+ 180.0+ 180.0+ 180.0+   9.0+ 180.0+ 161.0+
#> [161] 171.0+ 180.0+ 180.0+   3.0    1.0  180.0+ 180.0+  10.0+ 180.0+ 180.0+
#> [171]  17.0    3.0+ 180.0+   9.0+ 180.0+ 172.0+ 172.0+  24.0  180.0+ 180.0+
#> [181]   1.0+ 180.0+ 180.0+  13.0+   8.0+ 180.0+ 180.0+ 180.0+  94.0  180.0+
#> [191] 169.0    7.0    6.0  180.0+ 180.0+ 180.0+   3.0+ 180.0+  28.0   18.0 
#> [201]   5.0+ 180.0+ 180.0+   1.0  180.0+ 180.0+ 180.0+   4.0+ 180.0+   9.0 
#> [211]   7.0+  22.0  180.0+ 180.0+  84.0  180.0+ 180.0+   1.0    1.0  180.0+
#> [221] 180.0+ 167.0    6.0+  17.0  180.0+  12.0  180.0+ 180.0+  14.0+  36.0 
#> [231] 180.0+   3.0+  88.0   12.0  180.0+ 180.0+  12.0+ 180.0+ 180.0+ 180.0+
#> [241]  12.0    9.0    3.0  180.0+  11.0+   2.0+  18.0+ 180.0+ 180.0+ 180.0+
#> [251]   2.0+ 103.0   15.0  180.0+ 180.0+   5.0+  13.0  180.0+ 166.0+   3.0 
#> [261]   0.5+   3.0+ 180.0+ 175.0+ 180.0+   8.0    5.0   16.0  180.0+ 180.0+
#> [271] 123.0+  18.0   11.0+  79.0   80.0  180.0+   4.0+ 180.0+ 180.0+ 180.0+
#> [281] 180.0+ 180.0+  10.0  180.0+ 180.0+ 180.0+ 180.0+  99.0  180.0+ 180.0+
#> [291] 180.0+ 180.0+ 180.0+ 152.0+  21.0+ 180.0+   1.0  101.0    5.0  180.0+
#> [301] 180.0+ 180.0+   1.0  180.0+ 180.0+ 171.0  180.0+   0.5  180.0+ 180.0+
#> [311] 180.0+ 180.0+   7.0+   2.0   45.0    5.0+   3.0+ 180.0+  36.0  180.0+
#> [321] 180.0+  97.0  180.0+   8.0+ 180.0+   2.0+ 172.0+ 180.0+ 180.0+ 180.0+
#> [331]   8.0+  13.0+ 123.0  180.0+ 180.0+  51.0   19.0  180.0+   1.0    1.0 
#> [341]  76.0  180.0+  10.0+ 180.0+ 162.0    7.0+   7.0+   9.0  180.0+ 180.0+
#> [351] 180.0+  12.0  180.0+ 180.0+ 152.0  180.0+  76.0  173.0+ 180.0+ 180.0+
#> [361] 180.0+ 180.0+  28.0  180.0+  16.0+  16.0+ 180.0+ 180.0+ 180.0+   7.0+
#> [371]  15.0    3.0+  13.0+ 180.0+   3.0+ 180.0+  20.0  180.0+ 180.0+ 180.0+
#> [381] 180.0+   8.0   87.0   12.0    4.0+  58.0  180.0+ 180.0+ 180.0+ 180.0+
#> [391]   3.0  180.0+  14.0+ 180.0+  10.0+ 180.0+   8.0+ 179.0+   1.0  180.0+
#> [401] 180.0+  15.0  180.0+  10.0    1.0  180.0+  13.0    4.0+  10.0  104.0+
#> [411]   1.0   57.0  180.0+   3.0+ 180.0+  12.0  180.0+ 180.0+ 180.0+ 180.0+
#> [421] 180.0+  34.0  180.0+ 180.0+   4.0+ 180.0+   7.0  180.0+  10.0  180.0+
#> [431]   3.0  180.0+ 180.0+ 180.0+ 180.0+   6.0  180.0+ 180.0+  17.0+ 180.0+
#> [441]   7.0    0.5  180.0+  12.0  180.0+  46.0    4.0    1.0  180.0+  52.0 
#> [451] 180.0+ 180.0+ 180.0+ 180.0+   8.0  180.0+  33.0    5.0  180.0+ 180.0+
#> [461]  12.0    7.0+  79.0    3.0  180.0+ 180.0+ 176.0+  18.0  180.0+  47.0 
#> [471]  11.0    7.0  180.0+ 180.0+  32.0   10.0  180.0+ 172.0  119.0   12.0 
#> [481] 180.0+   8.0  180.0+   1.0   80.0  180.0+   4.0+ 180.0+  11.0  152.0+
#> [491]   3.0   24.0   32.0   23.0  180.0+ 180.0+  11.0    4.0  180.0+   6.0 
#> [501]   3.0+   2.0+ 180.0+   1.0    1.0   43.0    3.0  180.0+   6.0  138.0 
#> [511] 180.0+ 180.0+  59.0   17.0  161.0   10.0+  93.0  164.0  118.0  173.0 
#> [521] 180.0+ 180.0+ 175.0+   7.0+  15.0+   5.0+ 180.0+   3.0  171.0+ 166.0+
#> [531]   1.0    3.0+ 180.0+  85.0    6.0+ 180.0+   5.0    1.0  180.0+ 180.0+
#> [541] 108.0  180.0+   6.0  180.0+ 180.0+ 103.0  169.0   70.0  180.0+ 180.0+
#> [551] 180.0+ 180.0+   7.0+  16.0  180.0+ 177.0+ 180.0+   2.0  128.0  167.0 
#> [561]   3.0+  62.0    4.0    1.0   38.0   90.0  180.0+  89.0  180.0+   4.0 
#> [571]   1.0   19.0  180.0+ 180.0+ 114.0  180.0+ 154.0  180.0+   4.0+ 180.0+
#> [581]   1.0   12.0    5.0+   4.0+ 180.0+  77.0  180.0+   3.0   83.0  126.0 
#> [591]   8.0  165.0    3.0  180.0+ 180.0+ 180.0+   3.0+ 180.0+   4.0+ 180.0+
#> [601] 174.0    6.0   70.0   43.0  180.0+ 180.0+ 180.0+   3.0   13.0   92.0 
#> [611] 180.0+  38.0    4.0  177.0    6.0+   4.0+  22.0   65.0   11.0  180.0+
#> [621]  46.0  115.0  180.0+   8.0+ 180.0+   4.0    4.0  119.0  180.0+   1.0+
#> [631] 110.0   29.0  180.0+   1.0+ 180.0+   8.0  180.0+  25.0   50.0  126.0 
#> [641] 180.0+   4.0    1.0   89.0    3.0+   1.0   33.0  158.0   74.0  168.0 
#> [651] 169.0    7.0    4.0    0.5  180.0+ 180.0+   4.0   50.0  179.0+   8.0+
#> [661] 180.0+  16.0    8.0   53.0    7.0+   0.5   69.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.8290126