Bagg_pred_Surv: Bagging survival tree prediction

View source: R/Bagg_pred_Surv.R

Bagg_pred_SurvR Documentation

Bagging survival tree prediction

Description

Use the Bagging improper survival tree to predict on new features and to evaluate the predictor using Out Of Bag Integrated Brier Scores with either the Nelson Aalen estimator or the Breslow estimator. A permutation importance score is also computed using OOB observations.

Usage

Bagg_pred_Surv(xdata, Y.names, P.names, resBag, args.parallel = list(numWorkers = 1), 
               new_data = data.frame(), OOB = FALSE)

Arguments

xdata

The learning data frame

Y.names

A vector of the names of the two variables of interest (the time-to-event is follow by the event indicator)

P.names

The names of independant variables acting on the non-susceptible population (the plateau)

resBag

The result of the Bagg_Surv function

args.parallel

a list containing the number of parallel computing arguments: The number of workers, the type of parallelization to achieve, ... see mclapply for further details.

new_data

An optional data frame to validate the bagging procedure (the test dataset)

OOB

A value of TRUE or FALSE with TRUE indicating the computation of the OOB error using the Integrated Brier Score and also the computation of the permutation importance score.

Value

PREDNA

A matrix with Nelson Aalen predictions on all individuals of the learning sample

PREDBRE

A matrix with Breslow predictions on all individuals of the learning sample

tabhazNAa

A list of matrix with Nelson Aalen prediction of each tree of the bagging sequence with the leaf node prediction in each column

tabhazBRe

A list of matrix with Breslow prediction of each tree of the bagging sequence with the leaf node prediction in each column

OOB

A value of NULL if OOB is FALSE. A list of twelve elements otherwise: IBSKM: The Kaplan-Meier estimation of the Integrated Brier Score; IBSNAOOB: The OOB error using the Nelson-Aalen estimator; IBSBREOOB: The OOB error using the Breslow estimator; vimpoobpbpna: The permutation variable importance using the Nelson-Aalen estimator; vimpoobpbpbre: The permutation variable importance using the Breslow estimator; oobibspbpna: The mean OOB error predictor by predictor using the Nelson-Aalen estimator; oobibspbpbre: The mean OOB error predictor by predictor using the Breslow estimator; SURVNAOOB: A matrix with the predicted OOB survival using the Nelson-Aalen estimator; SURVBREOOB: A matrix with the predicted OOB survival using the Breslow estimator; BSTKM: The vector of Brier scores using the KM estimator; BSTNAOOB: The vector of Brier scores using the NA estimator; BSTBREOOB: The vector of Brier scores using the BRE estimator.

Timediff

The execution time of the prediction procedure

TEST

A value of NULL if new_data is not available. A list of seven elements otherwise: IBSNAKMnew: The IBS using the NA estimator on the new dataset; IBSBRKMnew: The IBS using the BRE estimator on the new dataset; IBSKMnew: The IBS using the KM estimator on the new dataset; SURVNAnew: A matrix of predicted survival on the new dataset using the NA estimator; SURVBREnew: A matrix of predicted survival on the new dataset using the BRE estimator; SURV_NAnew: a vector of survival prediction on the testing dataset using the NA estimator; SURV_BREnew: a vector of survival prediction on the testing dataset using the BRE estimator.

Author(s)

Cyprien Mbogning and Philippe Broet

References

Mbogning, C. and Broet, P. (2016). Bagging survival tree procedure for variable selection and prediction in the presence of nonsusceptible patients. BMC bioinformatics, 17(1), 1.

Duhaze Julianne et al. (2020). A Machine Learning Approach for High-Dimensional Time-to-Event Prediction With Application to Immunogenicity of Biotherapies in the ABIRISK Cohort. Frontiers in Immunology, (11).

See Also

Bagg_Surv

Examples

## Not run: 
 data(burn)
 myarg = list(cp = 0, maxcompete = 0, maxsurrogate = 0, maxdepth = 2)
 Y.names = c("T3" ,"D3")
 P.names = 'Z2'
 T.names = c("Z1", paste("Z", 3:11, sep = ''))
 mybag = 40
 feat_samp = length(T.names)
 set.seed(5000)
 
 burn.BagEssai0 <- suppressWarnings(Bagg_Surv(burn, 
        Y.names, 
        P.names, 
        T.names, 
        method = "LR", 
        args.rpart = myarg, 
        args.parallel = list(numWorkers = 1), 
        Bag = mybag, feat = feat_samp))
 
 burn.BagEssai1 <- suppressWarnings(Bagg_Surv(burn, 
        Y.names, 
        P.names, 
        T.names, 
        method = "R2", 
        args.rpart = myarg, 
        args.parallel = list(numWorkers = 1), 
        Bag = mybag, feat = feat_samp))

pred0 <- Bagg_pred_Surv(burn, 
    Y.names, 
    P.names, 
    burn.BagEssai0, 
    args.parallel = list(numWorkers = 1), 
    OOB = TRUE) 
 
 
 pred1 <- Bagg_pred_Surv(burn, 
    Y.names, 
    P.names, 
    burn.BagEssai1, 
    args.parallel = list(numWorkers = 1), 
    OOB = TRUE) 
 
## End(Not run)

iBST documentation built on Jan. 12, 2023, 5:15 p.m.