Survival Bayesian Additive Regression Trees Learner
mlr_learners_surv.bart.Rd
Fits a Bayesian Additive Regression Trees (BART) learner to right-censored
survival data. Calls BART::mc.surv.bart()
from BART.
Prediction types
This learner returns two prediction types:
distr
: a 3d survival array with observations as 1st dimension, time points as 2nd and the posterior draws as 3rd dimension. Calculated using the internalpredict.survbart()
function.crank
: the expected mortality usingmlr3proba::.surv_return()
. The parameterwhich.curve
decides which posterior draw (3rd dimension) will be used for the calculation of the expected mortality. Note that the median posterior is by default used for the calculation of survival measures that require adistr
prediction, see more info on PredictionSurv.
Initial parameter values
mc.cores
is initialized to 1 to avoid threading conflicts with future.
Custom mlr3 parameters
quiet
allows to suppress messages generated by the wrapped C++ code. Is initialized toTRUE
.importance
allows to choose the type of importance. Default iscount
, see documentation of method$importance()
for more details.which.curve
allows to choose which posterior draw will be used for the calculation of thecrank
prediction. If between (0,1) it is taken as the quantile of the curves otherwise if greater than 1 it is taken as the curve index, can also be 'mean'. By default the median posterior is used, i.e.which.curve
is 0.5.
Parameters
Id | Type | Default | Levels | Range |
K | numeric | NULL | \([1, \infty)\) | |
events | untyped | NULL | - | |
ztimes | untyped | NULL | - | |
zdelta | untyped | NULL | - | |
sparse | logical | FALSE | TRUE, FALSE | - |
theta | numeric | 0 | \((-\infty, \infty)\) | |
omega | numeric | 1 | \((-\infty, \infty)\) | |
a | numeric | 0.5 | \([0.5, 1]\) | |
b | numeric | 1 | \((-\infty, \infty)\) | |
augment | logical | FALSE | TRUE, FALSE | - |
rho | numeric | NULL | \((-\infty, \infty)\) | |
usequants | logical | FALSE | TRUE, FALSE | - |
rm.const | logical | TRUE | TRUE, FALSE | - |
type | character | pbart | pbart, lbart | - |
ntype | integer | - | \([1, 3]\) | |
k | numeric | 2 | \([0, \infty)\) | |
power | numeric | 2 | \([0, \infty)\) | |
base | numeric | 0.95 | \([0, 1]\) | |
offset | numeric | NULL | \((-\infty, \infty)\) | |
ntree | integer | 50 | \([1, \infty)\) | |
numcut | integer | 100 | \([1, \infty)\) | |
ndpost | integer | 1000 | \([1, \infty)\) | |
nskip | integer | 250 | \([0, \infty)\) | |
keepevery | integer | 10 | \([1, \infty)\) | |
printevery | integer | 100 | \([1, \infty)\) | |
seed | integer | 99 | \((-\infty, \infty)\) | |
mc.cores | integer | 2 | \([1, \infty)\) | |
nice | integer | 19 | \([0, 19]\) | |
openmp | logical | TRUE | TRUE, FALSE | - |
quiet | logical | TRUE | TRUE, FALSE | - |
importance | character | count | count, prob | - |
which.curve | numeric | - | \([0, \infty)\) |
References
Sparapani, Rodney, Spanbauer, Charles, McCulloch, Robert (2021). “Nonparametric machine learning and efficient computation with bayesian additive regression trees: the BART R package.” Journal of Statistical Software, 97, 1–66.
Chipman, A H, George, I E, McCulloch, E R (2010). “BART: Bayesian additive regression trees.” The Annals of Applied Statistics, 4(1), 266–298.
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
-> LearnerSurvLearnerSurvBART
Methods
Method importance()
Two types of importance scores are supported based on the value
of the parameter importance
:
prob
: The mean selection probability of each feature in the trees, extracted from the slotvarprob.mean
. Ifsparse = FALSE
(default), this is a fixed constant. Recommended to use this option whensparse = TRUE
.count
: The mean observed count of each feature in the trees (average number of times the feature was used in a tree decision rule across all posterior draws), extracted from the slotvarcount.mean
. This is the default importance scores.
In both cases, higher values signify more important variables.
Returns
Named numeric()
.
Examples
lrn("surv.bart")
#> <LearnerSurvLearnerSurvBART:surv.bart>: Bayesian Additive Regression Trees
#> * Model: -
#> * Parameters: mc.cores=1, quiet=TRUE, importance=count, which.curve=0.5
#> * Packages: mlr3, mlr3proba, BART
#> * Predict Types: [crank], distr
#> * Feature Types: logical, integer, numeric
#> * Properties: importance, missings