-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding conformal extensions to right-censored data #22
Open
ariane-cwi
wants to merge
58
commits into
ryantibs:master
Choose a base branch
from
ariane-cwi:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
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
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.surv
With 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.rfsrc
Computation 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
).ipcw
wraps these three functions.split.R
New function:
conformal.pred.split.surv
Similar 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.surv
Similar 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.test
loco.surv
is 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.surv
is adapted to fit the corresponding class of object.loco.roo.R
New function:
loco.roo.surv
loco.roo.surv
is similar toloco.roo
, adapted to right-censored data. It calls the functionconformal.pred.roo.surv
for the construction of prediction intervals.rmst.pred (new file)
New functions:
rmst.pred
,print.rmst.pred
,plot.rmst.pred
,wrss
The function
rmst.pred
is 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.surv
is called. For global variable importance,loco.surv
is called. Results can be printed or plotted with the functionsprint.rmst.pred
andplot.rmst.pred
.