Skip to contents

Fits a Bayesian Additive Regression Trees (BART) learner to right-censored survival data. Calls BART::mc.surv.bart() from BART.


Two types of prediction are returned for this learner:

  1. distr: a 3d survival array with observations as 1st dimension, time points as 2nd and the posterior draws as 3rd dimension.

  2. crank: the expected mortality using mlr3proba::.surv_return. The parameter which.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 a distr 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 to TRUE.

  • importance allows to choose the type of importance. Default is count, see documentation of method $importance() for more details.

  • which.curve allows to choose which posterior draw will be used for the calculation of the crank 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.


This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn():


Meta Information

  • Task type: “surv”

  • Predict Types: “crank”, “distr”

  • Feature Types: “logical”, “integer”, “numeric”

  • Required Packages: mlr3, mlr3proba, BART


KnumericNULL\([1, \infty)\)
sparselogicalFALSETRUE, FALSE-
thetanumeric0\((-\infty, \infty)\)
omeganumeric1\((-\infty, \infty)\)
anumeric0.5\([0.5, 1]\)
bnumeric1\((-\infty, \infty)\)
augmentlogicalFALSETRUE, FALSE-
rhonumericNULL\((-\infty, \infty)\)
usequantslogicalFALSETRUE, FALSE-
rm.constlogicalTRUETRUE, FALSE-
typecharacterpbartpbart, lbart-
ntypeinteger-\([1, 3]\)
knumeric2\([0, \infty)\)
powernumeric2\([0, \infty)\)
basenumeric0.95\([0, 1]\)
offsetnumericNULL\((-\infty, \infty)\)
ntreeinteger50\([1, \infty)\)
numcutinteger100\([1, \infty)\)
ndpostinteger1000\([1, \infty)\)
nskipinteger250\([0, \infty)\)
keepeveryinteger10\([1, \infty)\)
printeveryinteger100\([1, \infty)\)
seedinteger99\((-\infty, \infty)\)
mc.coresinteger2\([1, \infty)\)
niceinteger19\([0, 19]\)
openmplogicalTRUETRUE, FALSE-
quietlogicalTRUETRUE, FALSE-
importancecharactercountcount, prob-
which.curvenumeric-\([0, \infty)\)


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



Super classes

mlr3::Learner -> mlr3proba::LearnerSurv -> LearnerSurvLearnerSurvBART


Inherited methods

Method new()

Creates a new instance of this R6 class.

Method importance()

Two types of importance scores are supported based on the value of the parameter importance:

  1. prob: The mean selection probability of each feature in the trees, extracted from the slot varprob.mean. If sparse = FALSE (default), this is a fixed constant. Recommended to use this option when sparse = TRUE.

  2. 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 slot varcount.mean. This is the default importance scores.

In both cases, higher values signify more important variables.




Named numeric().

Method clone()

The objects of this class are cloneable with this method.


LearnerSurvLearnerSurvBART$clone(deep = FALSE)



Whether to make a deep clone.


learner = mlr3::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

# available parameters:
#>  [1] "K"           "events"      "ztimes"      "zdelta"      "sparse"     
#>  [6] "theta"       "omega"       "a"           "b"           "augment"    
#> [11] "rho"         "usequants"   "rm.const"    "type"        "ntype"      
#> [16] "k"           "power"       "base"        "offset"      "ntree"      
#> [21] "numcut"      "ndpost"      "nskip"       "keepevery"   "printevery" 
#> [26] "seed"        "mc.cores"    "nice"        "openmp"      "quiet"      
#> [31] "importance"  "which.curve"