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