Survival DNNSurv Learner
mlr_learners_surv.dnnsurv.Rd
Fits a neural network based on pseudo-conditional survival probabilities.
Calls survivalmodels::dnnsurv()
from package 'survivalmodels'.
Details
Custom nets can be used in this learner either using the
survivalmodels::build_keras_net utility function or using keras.
The number of output channels should be of length 1
and number of input channels is
the number of features plus number of cuts.
Dictionary
This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn()
:
$get("surv.dnnsurv")
mlr_learnerslrn("surv.dnnsurv")
Meta Information
Task type: “surv”
Predict Types: “crank”, “distr”
Feature Types: “integer”, “numeric”
Required Packages: mlr3, mlr3proba, mlr3extralearners, survivalmodels, keras, pseudo, tensorflow, distr6
Parameters
Id | Type | Default | Levels | Range |
cuts | integer | 5 | \([1, \infty)\) | |
cutpoints | untyped | - | - | |
custom_model | untyped | - | - | |
optimizer | character | adam | adadelta, adagrad, adamax, adam, nadam, rmsprop, sgd | - |
lr | numeric | 0.02 | \([0, \infty)\) | |
beta_1 | numeric | 0.9 | \([0, 1]\) | |
beta_2 | numeric | 0.999 | \([0, 1]\) | |
epsilon | numeric | - | \([0, \infty)\) | |
decay | numeric | 0 | \([0, \infty)\) | |
clipnorm | numeric | - | \((-\infty, \infty)\) | |
clipvalue | numeric | - | \((-\infty, \infty)\) | |
schedule_decay | numeric | 0.04 | \((-\infty, \infty)\) | |
momentum | numeric | 0 | \([0, \infty)\) | |
nesterov | logical | FALSE | TRUE, FALSE | - |
loss_weights | untyped | - | - | |
weighted_metrics | untyped | - | - | |
early_stopping | logical | FALSE | TRUE, FALSE | - |
min_delta | numeric | 0 | \([0, \infty)\) | |
patience | integer | 0 | \([0, \infty)\) | |
verbose | integer | 0 | \([0, 2]\) | |
baseline | numeric | - | \((-\infty, \infty)\) | |
restore_best_weights | logical | FALSE | TRUE, FALSE | - |
batch_size | integer | 32 | \([1, \infty)\) | |
epochs | integer | 10 | \([1, \infty)\) | |
validation_split | numeric | 0 | \([0, 1]\) | |
shuffle | logical | TRUE | TRUE, FALSE | - |
sample_weight | untyped | - | - | |
initial_epoch | integer | 0 | \([0, \infty)\) | |
steps_per_epoch | integer | - | \([1, \infty)\) | |
validation_steps | integer | - | \([1, \infty)\) | |
steps | integer | - | \([0, \infty)\) | |
callbacks | untyped | - | - |
Installation
Package 'survivalmodels' is not on CRAN and has to be install from GitHub via
remotes::install_github("RaphaelS1/survivalmodels")
.
Custom mlr3 defaults
verbose
:Actual default:
1L
Adjusted default:
0L
Reason for change: Prevents plotting.
References
Zhao, Lili, Feng, Dai (2019). “Dnnsurv: Deep neural networks for survival analysis using pseudo values.” arXiv preprint arXiv:1908.02337.
See also
as.data.table(mlr_learners)
for a table of available Learners in the running session (depending on the loaded packages).Chapter in the mlr3book: https://mlr3book.mlr-org.com/basics.html#learners
mlr3learners for a selection of recommended learners.
mlr3cluster for unsupervised clustering learners.
mlr3pipelines to combine learners with pre- and postprocessing steps.
mlr3tuning for tuning of hyperparameters, mlr3tuningspaces for established default tuning spaces.
Super classes
mlr3::Learner
-> mlr3proba::LearnerSurv
-> LearnerSurvDNNSurv
Examples
learner = mlr3::lrn("surv.dnnsurv")
print(learner)
#> <LearnerSurvDNNSurv:surv.dnnsurv>: Neural Network
#> * Model: -
#> * Parameters: verbose=0
#> * Packages: mlr3, mlr3proba, mlr3extralearners, survivalmodels, keras,
#> pseudo, tensorflow, distr6
#> * Predict Types: [crank], distr
#> * Feature Types: integer, numeric
#> * Properties: -
# available parameters:
learner$param_set$ids()
#> [1] "cuts" "cutpoints" "custom_model"
#> [4] "optimizer" "lr" "beta_1"
#> [7] "beta_2" "epsilon" "decay"
#> [10] "clipnorm" "clipvalue" "schedule_decay"
#> [13] "momentum" "nesterov" "loss_weights"
#> [16] "weighted_metrics" "early_stopping" "min_delta"
#> [19] "patience" "verbose" "baseline"
#> [22] "restore_best_weights" "batch_size" "epochs"
#> [25] "validation_split" "shuffle" "sample_weight"
#> [28] "initial_epoch" "steps_per_epoch" "validation_steps"
#> [31] "steps" "callbacks"