Adding conformal extensions to right-censored data#22
Open
ariane-cwi wants to merge 58 commits intoryantibs:masterfrom
Open
Adding conformal extensions to right-censored data#22ariane-cwi wants to merge 58 commits intoryantibs:masterfrom
ariane-cwi wants to merge 58 commits intoryantibs:masterfrom
Conversation
Remove preds
Dimension alpha
lo and up dimension for alpha of length one
range should not be an option
p should have been prop
rmst.pred now allows to compute local vimp and global vimp over different sets of variables
Not possible anymore to select variables to plot for vimpL
Error fixed
Replace range by length
Test with factors
Test with factors
Test with factors
Removing possibility of factors
Rejection rate and impact of covariates on censoring
factors
Description of parameter rho
Format issue in case m=1
Format issue with x0 for factors
Error for division by zero (if the censoring survival function reaches 0 at the evaluated time)
Weights computed only on D2
Weights computed only on all data
More efficient computation for ipcw.cox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Application of conformal inference techniques to right-censored data. Details in "A Comprehensive Framework for Evaluating Time to Event Predictions using the Restricted Mean Survival Time" (Cwiling et al., 2023)
The extensions concern the computation of prediction intervals with the split and ROO algorithms and variable importance measures with the LOCO methodology.
Some R files are completed with new functions (check.R, split.R, roo.R, loco.R, loco.roo.R) and two new files are added (ipcw.R, rmst.pred.R).
The code for the illustrations of the article is in the file fig.loco.surv.R, in the folder cwiling23.
No automatic tests are implemented. The package runs on the code given in the file fig.loco.surv.R.
check.R
New function:
check.args.survWith standard data, the outputs are combined in a single vector y. For censored data, the outputs are collected in two vectors t and d, the first containing the observed times, the second containing the censorship indicators. In addition to the tests performed in check.args, the function check.args.surv tests the validity of the supplementary entry d, along with the horizon of time tau. The latter is the value needed in the definition of the restricted mean survival time.
ipcw.R (new file)
New functions:
ipcw,ipcw.km,ipcw.cox,ipcw.rfsrcComputation of Inverse Probability Censoring Weights, for the need of right-censored data. The censoring survival function can either be estimated with Kaplan-Meier (
ipcw.km), Cox (ipcw.cox) or Random Survival Forests (ipcw.rfsrc).ipcwwraps these three functions.split.R
New function:
conformal.pred.split.survSimilar to
conformal.pred.split, adapted to right-censored data. The function weighted.quantile is used to incorporate censoring weights in the estimation of the quantile. A difference is that more than one value of alpha can be passed to the function, in order to provide prediction intervals at different confidence levels at the same time.roo.R
New function:
conformal.pred.roo.survSimilar to
conformal.pred.roo, adapted to right-censored data. The function weighted.quantile is used to incorporate censoring weights in the estimation of the quantile. A difference is that more than one value of alpha can be passed to the function, in order to provide prediction intervals at different confidence levels at the same time.loco.R
New functions:
loco.surv,print.loco.surv,my.surv.sign.testloco.survis similar toloco, adapted to right-censored data. However, only one test can be performed, the one implemented inmy.surv.sign.test(details in Cwiling et al., 2023). The print functionprint.loco.survis adapted to fit the corresponding class of object.loco.roo.R
New function:
loco.roo.survloco.roo.survis similar toloco.roo, adapted to right-censored data. It calls the functionconformal.pred.roo.survfor the construction of prediction intervals.rmst.pred (new file)
New functions:
rmst.pred,print.rmst.pred,plot.rmst.pred,wrssThe function
rmst.predis a wrapper for a comprehensive evaluation of a restricted mean survival time estimation model. First, the mean squared error is estimated with the WRSS estimator (see Cwiling et al., 2023) implemented inwrss, with or without cross-validation. Then prediction intervals are computed for all data with the ROO algorithm (conformal.pred.roo.surv). Finally, variable importance is studied with the LOCO methodology. For local variable importance,loco.roo.survis called. For global variable importance,loco.survis called. Results can be printed or plotted with the functionsprint.rmst.predandplot.rmst.pred.