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.181800
#> 2   1  0.59 0.165700
#> 3   2  1.23 0.151000
#> 4   2  2.07 0.137600
#> 5   3  4.02 0.125300
#> 6   3  6.72 0.114200
#> 7   3  8.72 0.104100
#> 8   3 10.27 0.094820
#> 9   3 11.49 0.086390
#> 10  3 12.49 0.078720
#> 11  3 13.30 0.071720
#> 12  3 13.99 0.065350
#> 13  3 14.55 0.059550
#> 14  3 15.02 0.054260
#> 15  3 15.42 0.049440
#> 16  3 15.76 0.045050
#> 17  3 16.04 0.041040
#> 18  4 16.30 0.037400
#> 19  5 16.53 0.034070
#> 20  6 16.73 0.031050
#> 21  6 16.91 0.028290
#> 22  6 17.07 0.025780
#> 23  6 17.20 0.023490
#> 24  6 17.31 0.021400
#> 25  6 17.40 0.019500
#> 26  6 17.48 0.017770
#> 27  6 17.54 0.016190
#> 28  6 17.59 0.014750
#> 29  6 17.64 0.013440
#> 30  6 17.68 0.012250
#> 31  6 17.71 0.011160
#> 32  6 17.74 0.010170
#> 33  6 17.76 0.009264
#> 34  6 17.78 0.008441
#> 35  6 17.80 0.007691
#> 36  6 17.81 0.007008
#> 37  6 17.82 0.006385
#> 38  6 17.83 0.005818
#> 39  6 17.84 0.005301
#> 40  6 17.85 0.004830
#> 41  6 17.85 0.004401
#> 42  6 17.86 0.004010
#> 43  6 17.86 0.003654
#> 44  6 17.86 0.003329
#> 
#> $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,]  38   2      0        115        0   150
#>   [8,]  36   1      0        180        1   155
#>   [9,]  38  12      1          8        1   120
#>  [10,]  36   5      1          0        1   115
#>  [11,]  38  16      1         10        0   160
#>  [12,]  37   1      1          0        1   146
#>  [13,]  40   2      1          1        1   148
#>  [14,]  38   5      1          3        0   125
#>  [15,]  42   2      0          2        0   140
#>  [16,]  40  11      1         10        1   120
#>  [17,]  42   2      0        180        0   100
#>  [18,]  41   2      1          1        0   166
#>  [19,]  40   1      1          0        1   145
#>  [20,]  42  15      1         13        1   125
#>  [21,]  40   3      1          1        0   170
#>  [22,]  42  12      1         10        1   170
#>  [23,]  43   2      1          1        1   116
#>  [24,]  42   2      0        180        1   124
#>  [25,]  44   5      1          1        0   170
#>  [26,]  45   3      0        180        1   154
#>  [27,]  41  10      1          8        0   150
#>  [28,]  44   3      0        180        0   141
#>  [29,]  41  13      1          1        0   140
#>  [30,]  45   9      1          7        0   110
#>  [31,]  45   6      0        180        1   170
#>  [32,]  41   5      1          4        1   141
#>  [33,]  44   2      1          1        1   150
#>  [34,]  45   2      0        180        1   140
#>  [35,]  46   2      1          1        0   126
#>  [36,]  45   3      0        150        0   130
#>  [37,]  46   7      1          2        0   166
#>  [38,]  43  29      0        180        1   180
#>  [39,]  45   4      1          0        0   124
#>  [40,]  47   6      1          0        1   116
#>  [41,]  46  13      1         10        0   100
#>  [42,]  44   0      1          0        1    96
#>  [43,]  47   4      1          3        1   160
#>  [44,]  45   5      0          5        0   141
#>  [45,]  46   6      1          0        1   100
#>  [46,]  44   4      1          0        1   114
#>  [47,]  44   9      1          8        1   135
#>  [48,]  46   5      1          3        0   130
#>  [49,]  46   4      0        180        1   121
#>  [50,]  44   2      0        180        0   142
#>  [51,]  46  15      0        180        1   120
#>  [52,]  45   9      1          0        1   145
#>  [53,]  47   3      1          1        1   120
#>  [54,]  48  12      1         11        0   200
#>  [55,]  47   9      1          6        0   170
#>  [56,]  49   4      0        180        0   117
#>  [57,]  50   6      1          2        1   140
#>  [58,]  49   7      1          7        1   110
#>  [59,]  46   3      1          1        1   140
#>  [60,]  50   7      0        180        1   110
#>  [61,]  49   2      0          2        0   105
#>  [62,]  51   1      0          1        1   145
#>  [63,]  49  15      1         11        1   160
#>  [64,]  47   2      0        180        0   150
#>  [65,]  49  23      0        179        1   112
#>  [66,]  46   6      1          0        1   156
#>  [67,]  50   4      0          4        1   100
#>  [68,]  50   1      1          0        0   150
#>  [69,]  47   8      0        180        0   160
#>  [70,]  51   8      0        180        1   140
#>  [71,]  52   2      0        180        0   155
#>  [72,]  48   7      1          0        1   110
#>  [73,]  53   8      0         36        1   160
#>  [74,]  49   9      1          3        0   102
#>  [75,]  53   5      0        180        1   140
#>  [76,]  54  17      1         12        1   102
#>  [77,]  53   5      0         77        0   159
#>  [78,]  53   7      1          0        0   199
#>  [79,]  54   6      1          3        0   129
#>  [80,]  51   3      1          1        0   140
#>  [81,]  50  14      1         13        0   170
#>  [82,]  53   8      1          7        0   160
#>  [83,]  53   4      0          4        0   140
#>  [84,]  52  14      1          7        1   200
#>  [85,]  48   6      0        180        0   160
#>  [86,]  53   4      1          0        1   156
#>  [87,]  51  13      0         99        1   160
#>  [88,]  49  16      0         16        0   125
#>  [89,]  55   3      1          1        0   150
#>  [90,]  54  23      1         10        0   131
#>  [91,]  52   7      1          2        0   154
#>  [92,]  54   9      1          1        0   130
#>  [93,]  52   4      0        180        1   180
#>  [94,]  50   3      0        174        1   153
#>  [95,]  55  28      1         13        1   160
#>  [96,]  49   6      1          0        1   130
#>  [97,]  49   1      0          1        1   110
#>  [98,]  50   7      1          1        0   156
#>  [99,]  53   9      0          9        1    95
#> [100,]  50   7      1          0        1   127
#> [101,]  56   4      1          1        1   130
#> [102,]  52   5      0        175        1   117
#> [103,]  55   2      0          2        0   145
#> [104,]  54   1      0        180        0   162
#> [105,]  54   7      1          0        1   100
#> [106,]  56   3      0        180        1   193
#> [107,]  55   5      1          4        1   120
#> [108,]  52   8      0        180        0   119
#> [109,]  53  18      1          9        1   150
#> [110,]  55   6      0        180        0   170
#> [111,]  53  10      1          9        0   172
#> [112,]  52  16      1         14        0   170
#> [113,]  53  15      0         15        1    90
#> [114,]  55   6      0        180        1   100
#> [115,]  55   6      1          5        1   138
#> [116,]  54  12      1          0        1   190
#> [117,]  54   3      0        180        0   128
#> [118,]  56   3      0          8        1   139
#> [119,]  55   1      0          2        0   130
#> [120,]  57   3      0          3        0   120
#> [121,]  54   2      1          1        0   135
#> [122,]  52   9      1          3        0   170
#> [123,]  54   2      1          1        1   176
#> [124,]  57   1      0        180        1   156
#> [125,]  56   4      1          0        1   140
#> [126,]  52  15      1         14        0   130
#> [127,]  56  14      1         11        0   130
#> [128,]  57  10      0        180        1   170
#> [129,]  58   8      0          8        1   130
#> [130,]  54   5      0        180        1   108
#> [131,]  55   3      1          1        1   156
#> [132,]  57   0      0          0        1   150
#> [133,]  53  21      1         13        1   130
#> [134,]  59   3      1          1        0   172
#> [135,]  57   4      0        180        1   119
#> [136,]  53  15      1         10        1   130
#> [137,]  54  17      1          8        1   227
#> [138,]  55   9      1          2        1   147
#> [139,]  55  13      0        166        1   140
#> [140,]  54  23      1          8        0   120
#> [141,]  57   4      1          2        1   185
#> [142,]  53   4      0        147        1   145
#> [143,]  57  11      1         10        1   129
#> [144,]  55   5      0          5        1   131
#> [145,]  54   7      1          0        1   141
#> [146,]  56   4      0          4        0   164
#> [147,]  59  15      1         10        0   140
#> [148,]  58   9      1          0        1   180
#> [149,]  58   1      1          1        1   200
#> [150,]  56   7      1          5        1   120
#> [151,]  55   2      0          2        0   106
#> [152,]  59   9      1          1        1   125
#> [153,]  57   1      0        180        0   148
#> [154,]  59   3      0        180        0   120
#> [155,]  58   4      1          0        1   160
#> [156,]  57   2      0          2        1   120
#> [157,]  60   5      1          1        0   138
#> [158,]  57   5      0        180        1   130
#> [159,]  58  11      1          9        1   124
#> [160,]  55   5      1          0        1   160
#> [161,]  59   6      1          0        1   140
#> [162,]  59   5      0        180        1   155
#> [163,]  59   4      1          0        1   152
#> [164,]  58  26      1          0        1   189
#> [165,]  61   9      0          9        1   160
#> [166,]  59   2      1          1        0   140
#> [167,]  58   8      0        161        1   140
#> [168,]  58  14      1          6        0   190
#> [169,]  61   9      1          8        0   150
#> [170,]  61   3      1          2        1   102
#> [171,]  58   1      0          1        1   100
#> [172,]  61  20      1         13        0   130
#> [173,]  57  13      1         10        0   110
#> [174,]  57   2      1          0        1   116
#> [175,]  58  10      0         10        1   150
#> [176,]  57  11      0        180        1   150
#> [177,]  61   3      0         17        0   143
#> [178,]  56  14      0         45        0   130
#> [179,]  56  13      1          6        1   158
#> [180,]  56  18      1         11        1   165
#> [181,]  59   9      1          0        1    80
#> [182,]  55   4      1          3        1   160
#> [183,]  58  11      0        172        1   135
#> [184,]  60  12      1          0        1   114
#> [185,]  61  13      1         12        1   130
#> [186,]  59  11      1          8        1   190
#> [187,]  58   5      1          1        1   135
#> [188,]  59  10      0        180        0   160
#> [189,]  61  13      0         13        0   210
#> [190,]  58   8      1          5        0   152
#> [191,]  62  10      1          0        1   153
#> [192,]  57   3      1          0        0   100
#> [193,]  61  18      0        170        0   140
#> [194,]  58   8      1          3        1   150
#> [195,]  61   7      0          7        1   150
#> [196,]  60  17      1          8        1   140
#> [197,]  58   3      1          0        1   146
#> [198,]  62   4      1          3        0   173
#> [199,]  59   1      0        180        0   155
#> [200,]  63   6      0         28        1   120
#> [201,]  61  13      0         13        0   120
#> [202,]  61   5      0          5        1   110
#> [203,]  57  18      1          9        1    93
#> [204,]  61   5      0          5        1   160
#> [205,]  58  11      1          9        0   179
#> [206,]  62  17      1         10        1   180
#> [207,]  63   3      1          1        0   180
#> [208,]  63   1      0        180        1   130
#> [209,]  61   7      0        180        0   135
#> [210,]  63   4      1          3        0   222
#> [211,]  62   3      0        180        1   105
#> [212,]  63   4      0        180        1   190
#> [213,]  63  15      1         10        1   126
#> [214,]  64   4      0        180        0   130
#> [215,]  63   4      1          1        0   155
#> [216,]  61   9      1          9        1   150
#> [217,]  62   7      0          7        0   150
#> [218,]  59   1      0         22        1   162
#> [219,]  58   2      0        180        0   127
#> [220,]  60   7      1          5        1   141
#> [221,]  60   7      0          7        0   140
#> [222,]  59   5      1          1        0   148
#> [223,]  60   7      1          1        1    90
#> [224,]  65  13      0        180        1   100
#> [225,]  63   1      0          1        0   162
#> [226,]  63   1      0          1        0   130
#> [227,]  62   6      0        180        0   170
#> [228,]  61  15      1         13        0   170
#> [229,]  59   4      0          4        0   149
#> [230,]  60   3      0          3        0   168
#> [231,]  64  10      1          9        0   160
#> [232,]  62   6      0          6        0   120
#> [233,]  61   6      1          1        1   117
#> [234,]  64  12      1         11        0   160
#> [235,]  66   1      1          0        1   120
#> [236,]  63  14      1          9        0   123
#> [237,]  65  36      1         11        0   140
#> [238,]  63   4      1          3        0   162
#> [239,]  66   5      1          0        1   110
#> [240,]  65   8      1          0        0   168
#> [241,]  60   6      0        180        0   130
#> [242,]  61  12      1         11        0   154
#> [243,]  64   9      0        180        0   150
#> [244,]  61   4      0        180        1   113
#> [245,]  63  16      1          7        1   110
#> [246,]  66   6      1          1        1   130
#> [247,]  62   3      1          1        1   199
#> [248,]  65   3      1          0        1    80
#> [249,]  62  13      1         11        0   180
#> [250,]  67  11      0         11        1   100
#> [251,]  64   2      0          2        0   201
#> [252,]  66  18      1          5        0   142
#> [253,]  61  14      1          5        0   140
#> [254,]  61  15      1         10        0   130
#> [255,]  63   3      1          2        0   120
#> [256,]  63   2      1          0        0   140
#> [257,]  65   8      1          0        1   140
#> [258,]  67   6      0        180        1   170
#> [259,]  65  15      1         11        1   160
#> [260,]  68   5      1          4        1   150
#> [261,]  66   7      1          0        1   115
#> [262,]  66  13      1          0        0   118
#> [263,]  64  14      1         13        1   150
#> [264,]  64   0      0          0        1   148
#> [265,]  67   4      1          3        0   130
#> [266,]  65   2      1          1        1   170
#> [267,]  64  10      1          9        1   110
#> [268,]  63   7      1          0        0   162
#> [269,]  68   5      0          5        1    90
#> [270,]  66  14      0        180        0   130
#> [271,]  65  17      1         14        1   100
#> [272,]  63   8      1          1        1   162
#> [273,]  65  18      1          3        0   120
#> [274,]  63   1      1          0        1   155
#> [275,]  63  10      0         18        1   130
#> [276,]  67  11      0         11        0   150
#> [277,]  68  11      0        180        0   160
#> [278,]  66  12      1         10        1   150
#> [279,]  65   4      1          2        1   145
#> [280,]  69  12      0         15        1   140
#> [281,]  66  15      1         13        1   160
#> [282,]  65  11      1          6        0   130
#> [283,]  69  21      1         10        0   180
#> [284,]  69   6      0        180        1   100
#> [285,]  63   8      0        180        1   120
#> [286,]  68  14      1         13        1   140
#> [287,]  65   8      1          0        1    90
#> [288,]  67   1      0        180        1   160
#> [289,]  68  10      1         10        1   150
#> [290,]  65   1      1          0        0   133
#> [291,]  67   7      1          4        1   130
#> [292,]  67   2      0        180        0   184
#> [293,]  65   6      0          6        0    80
#> [294,]  65  10      1          1        1   148
#> [295,]  66  19      1         12        1   150
#> [296,]  67  12      1         12        0   160
#> [297,]  64   4      0        179        0   160
#> [298,]  66   4      0        180        1   130
#> [299,]  67   2      0         18        0   131
#> [300,]  66   7      1          5        1   131
#> [301,]  66   4      0        180        0   177
#> [302,]  68   4      1          0        1   160
#> [303,]  65  13      1         12        1   130
#> [304,]  69  17      1         10        0   140
#> [305,]  69   8      0         93        0   140
#> [306,]  66   6      0        180        0   140
#> [307,]  65   1      0          1        1   120
#> [308,]  68  18      1          0        1   160
#> [309,]  65   6      0        101        1   115
#> [310,]  68   4      0          4        1   190
#> [311,]  68   7      0        150        0   210
#> [312,]  67   2      0        180        0   128
#> [313,]  66   9      1          3        1   151
#> [314,]  66   1      1          1        1   165
#> [315,]  69   8      0        180        1   153
#> [316,]  70  14      0        171        0   166
#> [317,]  66   4      0        180        0   130
#> [318,]  67  10      1          9        0   200
#> [319,]  67   6      1          4        0   130
#> [320,]  65   2      0        180        0   130
#> [321,]  68   7      1          0        1   150
#> [322,]  69   3      1          2        0   151
#> [323,]  67  14      1         13        0   130
#> [324,]  69   8      0        180        1   180
#> [325,]  71   7      0          7        0   230
#> [326,]  66   2      0          2        1   228
#> [327,]  71   3      0        103        0   133
#> [328,]  69   3      0          3        1   130
#> [329,]  67   5      0          5        0   130
#> [330,]  72   3      1          0        1   132
#> [331,]  69   8      1          7        1   108
#> [332,]  67   3      0        180        0   110
#> [333,]  66   2      1          1        0   123
#> [334,]  69  19      0        180        0   130
#> [335,]  69  11      1          0        1   120
#> [336,]  66   2      0        180        0   130
#> [337,]  67   7      1          4        0   122
#> [338,]  69   4      1          3        0   132
#> [339,]  68   2      0          7        1   130
#> [340,]  70   3      0        123        0   130
#> [341,]  70   9      0        180        1   142
#> [342,]  67  22      1          1        1   140
#> [343,]  68   3      0         19        0   135
#> [344,]  67  12      1          8        0   120
#> [345,]  69   1      0          1        1   110
#> [346,]  69   5      0         76        0   120
#> [347,]  67   8      1          0        1   130
#> [348,]  72  13      1         11        1   195
#> [349,]  68  10      1          8        1   160
#> [350,]  66  24      1         13        0   130
#> [351,]  70  35      1          0        1   105
#> [352,]  72  30      1          0        1   145
#> [353,]  70   7      0          7        0   102
#> [354,]  68   7      1          2        0   135
#> [355,]  71   6      0          9        0   120
#> [356,]  69  10      1          6        1   120
#> [357,]  70  11      0        180        1   210
#> [358,]  72  19      1          8        0   120
#> [359,]  72  12      1         10        0   170
#> [360,]  67   5      1          0        1   147
#> [361,]  67   9      0        180        0   158
#> [362,]  73  13      0        152        1   130
#> [363,]  70   5      0        180        0   150
#> [364,]  72   2      0          2        1   100
#> [365,]  67   4      1          1        0   134
#> [366,]  72   6      1          5        0   115
#> [367,]  68  23      0        180        1   220
#> [368,]  69   3      0        180        0   220
#> [369,]  71   3      1          2        0   150
#> [370,]  68   4      1          3        0   210
#> [371,]  72   5      0         28        0   120
#> [372,]  73   6      0        180        1   117
#> [373,]  69   8      1          1        0   164
#> [374,]  68   7      0        180        1   130
#> [375,]  72  16      1          1        1   130
#> [376,]  70   4      0        180        0   180
#> [377,]  73   6      1          0        1   270
#> [378,]  72   8      1          1        1   150
#> [379,]  73   7      0          7        1   140
#> [380,]  68  15      1         13        1   130
#> [381,]  70  13      1          9        0   100
#> [382,]  73   0      0        180        1   161
#> [383,]  74   8      1          0        1    85
#> [384,]  71   3      1          1        0   150
#> [385,]  71  15      1         11        0   165
#> [386,]  68   9      0        180        1   120
#> [387,]  71  20      1         10        0   140
#> [388,]  74   0      1          0        1    90
#> [389,]  71  17      1         11        0   160
#> [390,]  71   8      1          7        0   149
#> [391,]  71   3      1          2        1   190
#> [392,]  73  10      1          8        0   106
#> [393,]  74   4      0          4        0   120
#> [394,]  73   4      0         58        1   160
#> [395,]  72   5      1          3        1   160
#> [396,]  72  15      1          0        1   150
#> [397,]  72   8      1          0        1   140
#> [398,]  73  17      1         11        0   140
#> [399,]  71  13      1          8        0   121
#> [400,]  70   4      1          0        1   140
#> [401,]  71  14      1         13        1   170
#> [402,]  74   7      1          0        1   117
#> [403,]  72  15      1         13        0   156
#> [404,]  70   8      0          8        0   120
#> [405,]  71  10      1          9        1   120
#> [406,]  75   1      0          1        0   133
#> [407,]  75   2      1          1        0   145
#> [408,]  73  10      1          9        1   146
#> [409,]  72  10      1          9        1   160
#> [410,]  73  10      1         10        1   120
#> [411,]  74  15      1          9        1   179
#> [412,]  71   2      0         10        1   112
#> [413,]  73   1      0          1        1    80
#> [414,]  75   9      1          7        0   140
#> [415,]  75  13      1          1        1   130
#> [416,]  71  11      1          8        0   110
#> [417,]  72  15      1         12        1   120
#> [418,]  73  10      1          8        0   120
#> [419,]  72   1      1          1        0   168
#> [420,]  72  11      0         11        1   140
#> [421,]  70   3      0          3        0   150
#> [422,]  73   5      1          3        1   112
#> [423,]  76  25      1         12        1   170
#> [424,]  73  12      1         12        1   140
#> [425,]  72   2      0        180        0   120
#> [426,]  75   1      0        180        1   140
#> [427,]  72   4      1          0        1   197
#> [428,]  71   3      1          0        0   144
#> [429,]  73   5      0        180        0   126
#> [430,]  73   4      0        180        0   124
#> [431,]  76   3      1          0        1   120
#> [432,]  71  32      1         12        1   107
#> [433,]  72   5      0        180        0   154
#> [434,]  72   3      0        180        0   160
#> [435,]  76   5      0          5        1   130
#> [436,]  77  11      0         11        1   150
#> [437,]  72   7      1          2        0   142
#> [438,]  73  15      0         15        1   160
#> [439,]  71  16      0        180        0   140
#> [440,]  73  10      1         10        0   124
#> [441,]  74   3      0          3        1   128
#> [442,]  76   1      0        180        0   114
#> [443,]  76   8      1          0        1   141
#> [444,]  74  19      1          4        1   200
#> [445,]  73   6      0          6        1   114
#> [446,]  76  17      1          0        1   200
#> [447,]  76  13      1         10        0   110
#> [448,]  75   7      0          7        0   190
#> [449,]  75   0      0          0        1   130
#> [450,]  73  13      1         11        0   195
#> [451,]  75  12      0         12        1   160
#> [452,]  74   8      1          0        1   105
#> [453,]  74   6      0        180        0   160
#> [454,]  76   4      0          4        1   155
#> [455,]  74   2      0        180        0   111
#> [456,]  73   0      0        180        0   156
#> [457,]  72   5      0        180        0   120
#> [458,]  78  12      1         11        1   160
#> [459,]  76  44      1         10        0   105
#> [460,]  76   5      0        180        0   185
#> [461,]  74  10      1          0        1   135
#> [462,]  76   5      1          0        1   167
#> [463,]  75   9      0        180        1   140
#> [464,]  73  33      1         12        1   175
#> [465,]  77   5      1          0        0   123
#> [466,]  77  12      1          9        1   100
#> [467,]  73  10      1          9        0   146
#> [468,]  76  12      1         11        1   120
#> [469,]  78   5      1          0        1   170
#> [470,]  74   6      0         79        1   140
#> [471,]  79  10      1          8        0   190
#> [472,]  74   2      1          0        1   130
#> [473,]  77   3      0        180        0   110
#> [474,]  73   8      1          1        1   162
#> [475,]  73  11      1          2        1   110
#> [476,]  74   2      0        180        0   100
#> [477,]  78   7      0          7        1   133
#> [478,]  78   8      1          6        1   110
#> [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,]  80  10      1          6        1   147
#> [484,]  78   0      0        180        1   212
#> [485,]  75  12      1          1        1   120
#> [486,]  80   8      0          8        1   120
#> [487,]  75  13      1          6        0   150
#> [488,]  74  10      1          8        0   135
#> [489,]  79   4      0         80        0   145
#> [490,]  75   4      1          0        0   212
#> [491,]  78  10      0        180        1   130
#> [492,]  76  11      1          0        0   120
#> [493,]  75  11      1          4        0   162
#> [494,]  77  24      0         24        1   160
#> [495,]  80   6      0          6        1   150
#> [496,]  76   3      1          0        1   140
#> [497,]  79  11      0        180        0   160
#> [498,]  79   2      1          0        1   121
#> [499,]  81   1      0          1        0   130
#> [500,]  78  11      1          8        1   118
#> [501,]  76   4      0          4        1   160
#> [502,]  76  12      1         10        1   127
#> [503,]  77   6      0          6        1   107
#> [504,]  80   3      1          0        1   120
#> [505,]  75   2      1          1        1   204
#> [506,]  78  11      0        180        1   135
#> [507,]  76   1      0          1        1   140
#> [508,]  76   1      0          1        1    90
#> [509,]  78   7      1          0        1   110
#> [510,]  77   7      0        180        1   170
#> [511,]  77   6      0          6        1   144
#> [512,]  80  15      1         12        1   150
#> [513,]  77   9      1          4        0   141
#> [514,]  82   5      0          8        1   120
#> [515,]  80  40      1          0        1   138
#> [516,]  78   4      0         59        1   112
#> [517,]  80  17      1         12        0   100
#> [518,]  76   7      0        161        0   151
#> [519,]  80  15      1          0        1    90
#> [520,]  79  28      0        164        0   100
#> [521,]  80   9      0        118        1   186
#> [522,]  80   6      0        173        1   160
#> [523,]  79   1      0         37        1   140
#> [524,]  81   3      0        180        0   184
#> [525,]  77  13      1          0        1   190
#> [526,]  78  15      0         15        0   165
#> [527,]  80   5      1          1        1   108
#> [528,]  78   4      0        180        0   175
#> [529,]  78  26      1          5        0   194
#> [530,]  76   1      0        166        0   131
#> [531,]  77  10      1          8        1   130
#> [532,]  77   5      0         85        0   188
#> [533,]  79   6      0          6        0   152
#> [534,]  78   2      0        180        0   148
#> [535,]  80   5      0          5        1   130
#> [536,]  77   4      0        180        1    98
#> [537,]  78  12      0        180        0   134
#> [538,]  79   1      0        125        0   193
#> [539,]  84  22      1         10        0   180
#> [540,]  80   6      0          6        1   110
#> [541,]  82   5      0        180        0   110
#> [542,]  83   5      0        180        0   148
#> [543,]  79   7      1          6        0   130
#> [544,]  83   4      0        103        0    97
#> [545,]  81  11      1          8        0   160
#> [546,]  80  11      1          8        0   170
#> [547,]  78  23      1         10        1   145
#> [548,]  79   4      0          4        1   183
#> [549,]  78   9      1          4        1   120
#> [550,]  79   1      0        180        1   170
#> [551,]  81  15      0        180        1   140
#> [552,]  80   7      1          0        1   146
#> [553,]  84   5      1          1        1    85
#> [554,]  83   8      0          8        0   115
#> [555,]  81  16      0         16        1   110
#> [556,]  80  11      1          8        0   110
#> [557,]  81   8      0        180        0   146
#> [558,]  79   7      0        177        0   197
#> [559,]  79   0      1          0        1    96
#> [560,]  81   2      1          1        0   198
#> [561,]  83   2      0          2        1   155
#> [562,]  84   4      0        167        0   198
#> [563,]  84   5      0        180        1   203
#> [564,]  81   1      0          1        1   150
#> [565,]  84   1      0         38        1   205
#> [566,]  83   3      0        180        0   174
#> [567,]  81   4      0         90        1   138
#> [568,]  85   3      1          2        1   160
#> [569,]  79   4      0          4        1    60
#> [570,]  80   6      0         71        1   189
#> [571,]  83   1      0          1        1   100
#> [572,]  82  19      0         19        0   120
#> [573,]  83   3      0        114        0    98
#> [574,]  81  14      1         12        1   128
#> [575,]  83   2      0        154        0   130
#> [576,]  83   1      0        180        0   160
#> [577,]  81   4      0          4        0   175
#> [578,]  84  15      1         13        1   110
#> [579,]  81   1      0          1        1   145
#> [580,]  81  12      0         12        1   163
#> [581,]  82  16      1          8        0   103
#> [582,]  81   4      0          4        0   160
#> [583,]  86  12      0        180        1   120
#> [584,]  83  12      1          2        1   170
#> [585,]  81  19      1         14        0   120
#> [586,]  82   3      1          2        0   130
#> [587,]  82  15      1          0        0   183
#> [588,]  83   7      0        126        0   135
#> [589,]  81  16      1          9        0   180
#> [590,]  84   6      0        165        0   145
#> [591,]  86   3      0          3        1   140
#> [592,]  82   9      0        180        1   134
#> [593,]  81  13      0        180        0   152
#> [594,]  85   3      0          3        1   118
#> [595,]  81   4      0        180        0   160
#> [596,]  83   4      0          4        0   130
#> [597,]  87   2      0          5        1   137
#> [598,]  82  14      1         11        1   103
#> [599,]  83  19      0         43        0   150
#> [600,]  84   3      1          2        0   125
#> [601,]  86   2      0        180        1   169
#> [602,]  88  14      1          3        1   130
#> [603,]  84   3      0          3        1   121
#> [604,]  83  13      1         12        0   170
#> [605,]  84   7      1          2        0   148
#> [606,]  87   2      0        180        0   113
#> [607,]  84   9      0         92        1   110
#> [608,]  84   3      0        180        1   170
#> [609,]  86   4      0         38        1   122
#> [610,]  86  13      0        177        0   163
#> [611,]  86   6      0          6        1   117
#> [612,]  84  13      0         62        1   100
#> [613,]  86   6      1          1        0   112
#> [614,]  83  20      1          3        1   150
#> [615,]  85  22      0         22        1   184
#> [616,]  83   9      0         65        1   150
#> [617,]  86   9      1          7        1   142
#> [618,]  87   2      0        180        1   130
#> [619,]  86   6      0         46        0   173
#> [620,]  88   3      0        115        0   110
#> [621,]  83   3      0          3        1   130
#> [622,]  87   8      0          8        1   157
#> [623,]  86  15      1          8        1   109
#> [624,]  88   4      0          4        0    86
#> [625,]  89   5      0        119        1   140
#> [626,]  87   6      0        180        1   110
#> [627,]  84   8      0        180        1   119
#> [628,]  84   2      0        110        1   174
#> [629,]  87  29      0         29        1    97
#> [630,]  87  15      1          9        1   138
#> [631,]  84   0      0        180        1   136
#> [632,]  89  10      0         46        1   170
#> [633,]  90  14      0         14        1   100
#> [634,]  88   1      0          1        0   135
#> [635,]  91  10      0        145        0   135
#> [636,]  86   3      1          0        1    80
#> [637,]  88   7      0         24        0   119
#> [638,]  88   8      0         50        1   154
#> [639,]  86  10      0        180        1   137
#> [640,]  86   9      1          7        0   130
#> [641,]  90   4      1          0        0   121
#> [642,]  91   1      0          1        1    74
#> [643,]  87  43      0        178        1   130
#> [644,]  87   5      0         36        1   150
#> [645,]  88   3      1          2        0   159
#> [646,]  89   3      1          1        1   160
#> [647,]  92   1      0          1        1   167
#> [648,]  91   3      0         33        1   137
#> [649,]  87   7      0         74        1   105
#> [650,]  89  12      1          0        1   130
#> [651,]  89   2      0        168        0   118
#> [652,]  89  52      0         52        1   130
#> [653,]  89   4      0          4        1   159
#> [654,]  91   4      1          0        1   120
#> [655,]  90  19      1         11        1   129
#> [656,]  90   1      0          1        1   118
#> [657,]  91   2      0          2        1   116
#> [658,]  93   8      0        179        1   110
#> [659,]  94   8      0          8        1   142
#> [660,]  92   4      0         76        1   149
#> [661,]  90  16      0         16        1   106
#> [662,]  90   3      0         67        0   162
#> [663,]  95   8      1          5        1   150
#> [664,]  94   3      0         26        1   144
#> [665,]  91  12      0         53        1   212
#> [666,]  91   7      0          7        0   135
#> [667,]  92   5      0         69        0   139
#> [668,]  92   2      0          2        0   112
#> [669,]  93   4      0        180        1   135
#> [670,]  96  15      1          0        1   140
#> 
#> $y
#>   [1]   5.0+   2.0+   5.0+ 180.0+   5.0+ 180.0+ 115.0  180.0+  12.0    5.0+
#>  [11] 180.0+ 180.0+   2.0+   5.0+   2.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+
#>  [21] 180.0+ 180.0+   2.0+ 180.0+ 155.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+
#>  [31] 180.0+   5.0+ 180.0+ 180.0+ 180.0+ 150.0  180.0+ 180.0+ 180.0+   6.0+
#>  [41] 180.0+ 180.0+ 180.0+   5.0+ 180.0+ 180.0+ 180.0+   5.0+ 180.0+ 180.0+
#>  [51] 180.0+ 177.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+   7.0  180.0+ 180.0+
#>  [61]   2.0    1.0  179.0+ 180.0+ 179.0+ 180.0+   4.0+ 180.0+ 180.0+ 180.0+
#>  [71] 180.0+   7.0   36.0  180.0+ 180.0+ 180.0+  77.0  180.0+ 180.0+ 180.0+
#>  [81] 180.0+ 180.0+   4.0+  85.0  180.0+ 166.0+  99.0   16.0+ 180.0+ 152.0+
#>  [91]   7.0+ 180.0+ 180.0+ 174.0+  28.0    6.0+   1.0  180.0+   9.0+ 180.0+
#> [101] 180.0+ 175.0+   2.0  180.0+   7.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+
#> [111] 180.0+  16.0   15.0+ 180.0+ 180.0+  12.0+ 180.0+   8.0    2.0    3.0+
#> [121] 180.0+ 180.0+ 180.0+ 180.0+ 165.0  180.0+ 180.0+ 180.0+   8.0+ 180.0+
#> [131] 180.0+   0.5  180.0+ 180.0+ 180.0+ 180.0+ 171.0+  15.0  166.0+ 180.0+
#> [141]   4.0+ 147.0+ 180.0+   5.0+ 180.0+   4.0+ 180.0+   9.0+   1.0  180.0+
#> [151]   2.0+ 180.0+ 180.0+ 180.0+ 180.0+   2.0  180.0+ 180.0+ 180.0+ 180.0+
#> [161]  64.0  180.0+ 180.0+ 180.0+   9.0+ 180.0+ 161.0+ 171.0+ 180.0+   3.0 
#> [171]   1.0  180.0+ 180.0+ 180.0+  10.0+ 180.0+  17.0   45.0  180.0+ 180.0+
#> [181]   9.0+ 180.0+ 172.0+ 172.0+ 180.0+ 180.0+ 180.0+ 180.0+  13.0+   8.0+
#> [191] 180.0+ 180.0+ 170.0  180.0+   7.0  180.0+   3.0+ 180.0+ 180.0+  28.0 
#> [201]  13.0+   5.0   18.0    5.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+
#> [211] 180.0+ 180.0+ 180.0+ 180.0+   4.0+ 180.0+   7.0+  22.0  180.0+  84.0 
#> [221]   7.0+ 180.0+ 180.0+ 180.0+   1.0    1.0  180.0+ 180.0+   4.0+   3.0+
#> [231] 167.0    6.0+ 180.0+  12.0  180.0+  14.0+  36.0  180.0+ 180.0+ 180.0+
#> [241] 180.0+  12.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+   3.0  180.0+  11.0+
#> [251]   2.0+  18.0+ 180.0+ 180.0+   3.0+   2.0+  15.0  180.0+ 180.0+   5.0+
#> [261] 179.0+ 166.0+  14.0+   0.5+ 180.0+ 175.0+ 180.0+   7.0+   5.0  180.0+
#> [271] 180.0+ 180.0+ 123.0+   1.0+  18.0   11.0+ 180.0+  80.0    4.0+  15.0 
#> [281] 180.0+ 180.0+ 174.0+ 180.0+ 180.0+ 180.0+   8.0+ 180.0+  10.0  180.0+
#> [291] 180.0+ 180.0+   6.0  180.0+  19.0+  12.0  179.0+ 180.0+  18.0    7.0+
#> [301] 180.0+ 180.0+ 180.0+ 180.0+  93.0  180.0+   1.0   18.0+ 101.0    4.0 
#> [311] 150.0  180.0+ 180.0+   1.0  180.0+ 171.0  180.0+ 174.0+   6.0  180.0+
#> [321] 180.0+ 180.0+ 180.0+ 180.0+   7.0+   2.0  103.0    3.0+   5.0+ 180.0+
#> [331]   8.0+ 180.0+   2.0+ 180.0+ 180.0+ 180.0+   7.0  180.0+   7.0  123.0 
#> [341] 180.0+  51.0   19.0  180.0+   1.0   76.0  180.0+ 132.0   10.0+ 180.0+
#> [351] 180.0+ 162.0    7.0+   7.0+   9.0  180.0+ 180.0+ 180.0+  12.0  180.0+
#> [361] 180.0+ 152.0  180.0+   2.0   76.0  180.0+ 180.0+ 180.0+ 180.0+ 180.0+
#> [371]  28.0  180.0+ 180.0+ 180.0+  16.0+ 180.0+   6.0  180.0+   7.0+  15.0 
#> [381]  13.0+ 180.0+ 180.0+   3.0+ 180.0+ 180.0+  20.0    0.5  180.0+   8.0 
#> [391]   3.0   87.0    4.0+  58.0  180.0+ 180.0+ 180.0+ 180.0+ 175.0  180.0+
#> [401]  14.0+ 180.0+ 180.0+   8.0+ 179.0+   1.0  180.0+ 180.0+ 159.0   15.0 
#> [411] 180.0+  10.0    1.0  180.0+  13.0  180.0+ 180.0+  10.0    1.0   11.0 
#> [421]   3.0+   5.0  180.0+  12.0  180.0+ 180.0+ 180.0+ 180.0+ 180.0+ 180.0+
#> [431] 180.0+ 177.0+ 180.0+ 180.0+   5.0   11.0+   7.0   15.0+ 180.0+  10.0 
#> [441]   3.0  180.0+ 180.0+ 180.0+   6.0   17.0+ 174.0+   7.0    0.5  180.0+
#> [451]  12.0  180.0+ 180.0+   4.0  180.0+ 180.0+ 180.0+  12.0  180.0+ 180.0+
#> [461] 180.0+ 180.0+ 180.0+  33.0    5.0  180.0+ 180.0+  12.0  180.0+  79.0 
#> [471] 180.0+ 176.0+ 180.0+ 180.0+  11.0  180.0+   7.0    8.0+   7.0  180.0+
#> [481]  32.0  180.0+  10.0  180.0+  12.0    8.0  180.0+ 180.0+  80.0    4.0+
#> [491] 180.0+  11.0  152.0+  24.0    6.0    3.0+ 180.0+ 180.0+   1.0   11.0 
#> [501]   4.0  180.0+   6.0    3.0+   2.0+ 180.0+   1.0    1.0   43.0  180.0+
#> [511]   6.0  180.0+  71.0    8.0   40.0   59.0   17.0  161.0  180.0+ 164.0 
#> [521] 118.0  173.0   37.0  180.0+  22.0   15.0+   5.0+ 180.0+ 171.0+ 166.0+
#> [531]  10.0   85.0    6.0+ 180.0+   5.0  180.0+ 180.0+ 125.0  180.0+   6.0 
#> [541] 180.0+ 180.0+ 180.0+ 103.0  180.0+ 169.0   70.0    4.0  180.0+ 180.0+
#> [551] 180.0+   7.0+ 180.0+   8.0+  16.0  180.0+ 180.0+ 177.0+   0.5  180.0+
#> [561]   2.0  167.0  180.0+   1.0   38.0  180.0+  90.0  180.0+   4.0   71.0 
#> [571]   1.0   19.0  114.0  180.0+ 154.0  180.0+   4.0+ 180.0+   1.0   12.0 
#> [581]  16.0+   4.0+ 180.0+  77.0  180.0+   3.0   83.0  126.0  180.0+ 165.0 
#> [591]   3.0  180.0+ 180.0+   3.0+ 180.0+   4.0+   5.0  174.0   43.0  180.0+
#> [601] 180.0+  14.0    3.0   13.0  180.0+ 180.0+  92.0  180.0+  38.0  177.0 
#> [611]   6.0+  62.0    6.0+  20.0   22.0   65.0   11.0  180.0+  46.0  115.0 
#> [621]   3.0+   8.0+ 180.0+   4.0  119.0  180.0+ 180.0+ 110.0   29.0  180.0+
#> [631] 180.0+  46.0   14.0    1.0+ 145.0    3.0   24.0   50.0  180.0+ 180.0+
#> [641]   4.0    1.0  178.0+  36.0   75.0    3.0+   1.0   33.0   74.0  180.0+
#> [651] 168.0   52.0    4.0    4.0  180.0+   1.0+   2.0  179.0+   8.0+  76.0 
#> [661]  16.0   67.0    8.0   26.0   53.0    7.0+  69.0    2.0  180.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.8476278