Skip to content
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

Time-dependent AUC #333

Closed
ahucephe opened this issue Sep 15, 2023 · 6 comments
Closed

Time-dependent AUC #333

ahucephe opened this issue Sep 15, 2023 · 6 comments

Comments

@ahucephe
Copy link

I want to predict time-dependent AUC for surv.ranger learner. However, I couldn't achieve it with the mlr3proba package. First, I fit a model in mlr3proba. Then, I want to calculate the time-dependent AUC by the riskRegressin or survAUC packages. Because, in the mlr3proba package, the "Predict Types" for surv.ranger are “crank”, “distr”. I can't get "lp". How can I do that?

@RaphaelS1
Copy link
Collaborator

The response to your question is here #332 -- you can't use survAUC for ranger as it doesn't make lp predictions

@ahucephe
Copy link
Author

Isn't it correct to calculate time-dependent AUC for ranger? Why are there lp results for some learners but not for others?

@ahucephe
Copy link
Author

ahucephe commented Sep 15, 2023

I have one more question. Can I use exp(linear_pred)/(1+exp(linear_pred)) to convert the linear prediction value to survival probability? Similary, can I use log(surv.prob/1-surv.prob) for the opposite? So, is it lp=log(distr/1-distr) ?

@RaphaelS1
Copy link
Collaborator

Isn't it correct to calculate time-dependent AUC for ranger?

Yes but the issue is that the implementations all assume Cox regression is used to make the predictions, the exceptions to this are AUC.hc and AUC.uno but these also assume a one-to-one relationship between lp and the predicted survival probabilities, which won't hold for machine learning models

Why are there lp results for some learners but not for others?

lp means linear predictor, it therefore can only apply to models that are fit with linear predictors, for example in the cox model: $h(t) = h_0(t)exp(x\beta)$ in this equation $x\beta$ is the linear predictor and $exp(x\beta)$ is commonly used for crank as a risk prediction.

Can I use exp(linear_pred)/(1+exp(linear_pred)) to convert the linear prediction value to survival probability? Similary, can I use log(surv.prob/1-surv.prob) for the opposite? So, is it lp=log(distr/1-distr) ?

$distr returns the full probability distribution over time so there any mapping from linear_pred to distr depends on the chosen model form, e.g. if using PH then h(t) = h_0(t)exp(xb) but it's different for accelerated failure time and proportional odds models.

@ahucephe
Copy link
Author

ahucephe commented Sep 15, 2023

So, how should I calculate time-dependent Auc after fitting a survival model (e.g. surv.ranger, surv.ctree) in mlr3proba that does not give lp results? Can you give me any suggestions on this issue? I need the integrated time-dependent Auc.
And, can you give me the detailed calculation (or code) for surv.cindex measure for my comparisons?

@RaphaelS1
Copy link
Collaborator

So, how should I calculate time-dependent Auc after fitting a survival model (e.g. surv.ranger, surv.ctree) in mlr3proba that does not give lp results?

You can't. mlr3proba was designed such that you can't make calculations that are mathematically wrong, the results wuld not be valid. You'd need to use antolini's C which is model-agnostic but I haven't implemented this yet - but you're welcome to help implement that if you have the time?

And, can you give me the detailed calculation (or code) for surv.cindex measure for my comparisons?

I don't know what your code is so this is hard to do, which C-index are you using? Harrell's ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants