Skip to contents

Generalized linear models with elastic net regularization. Calls glmnet::cv.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.cv.glmnet().

  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.cv.glmnet(). 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.

Dictionary

This Learner can be instantiated via lrn():

lrn("surv.cv_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]\)
excludeuntyped--
exmxnumeric250\((-\infty, \infty)\)
fdevnumeric1e-05\([0, 1]\)
foldiduntypedNULL-
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)\)
nfoldsinteger10\([3, \infty)\)
nlambdainteger100\([1, \infty)\)
offsetuntypedNULL-
newoffsetuntyped--
parallellogicalFALSETRUE, FALSE-
penalty.factoruntyped--
pmaxinteger-\([0, \infty)\)
pminnumeric1e-09\([0, 1]\)
precnumeric1e-10\((-\infty, \infty)\)
predict.gammanumericgamma.1se\((-\infty, \infty)\)
relaxlogicalFALSETRUE, FALSE-
snumericlambda.1se\([0, \infty)\)
standardizelogicalTRUETRUE, FALSE-
standardize.responselogicalFALSETRUE, FALSE-
threshnumeric1e-07\([0, \infty)\)
trace.itinteger0\([0, 1]\)
type.gaussiancharacter-covariance, naive-
type.logisticcharacterNewtonNewton, modified.Newton-
type.measurecharacterdeviancedeviance, C-
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 -> LearnerSurvCVGlmnet

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

LearnerSurvCVGlmnet$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

LearnerSurvCVGlmnet$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

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


# Make predictions for the test rows
predictions = learner$predict(task, row_ids = ids$test)

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