Skip to contents

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

Details

This learner returns two prediction types:

  1. lp: a vector of linear predictors (relative risk scores), one per observation. Calculated using glmnet::predict.cv.glmnet().

  2. 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.

Custom mlr3 parameters

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

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