-
Notifications
You must be signed in to change notification settings - Fork 10
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
Feature request: Predict survival time #37
Comments
Thank you! I'd be happy to implement this. The biggest obstacle on my end is deciding how to do it. There are a few ways that could work:
My thoughts on these:
@hfrick, do you have thoughts or preferences on how I should proceed? My initial impression is that I like option 1 because it would be the most efficient computationally. However, it would also take me a little while to get it working and then run it through proper tests to make sure it's right. |
Option 1 of median time-to-event is, I think, the most common option and sounds the most straightforward in terms of definition. It'd be great to see that feature live in aorsf given that I think it'd be attractive for users both of aorsf directly and via a framework. Re time: no particular rush. We are currently actively working on survival analysis in tidymodels and want to release a whole lot of new features across the framework in Q1 but we can integrate survival time prediction via aorsf in censored at any time. |
Thank you! I appreciate your thoughts on this very much. I will move ahead using median time-to-event and keep you updated. |
Thanks so much for your willingness to implement this! 🙏 |
Hello @hfrick! I'm happy to share an update. With Do you think it would be feasible for me to propose making predicted mortality the default for library(aorsf)
fit_time <- orsf(pbc_orsf, time + status ~ . - id,
oobag_pred_type = 'time')
predict(fit_time, new_data = pbc_orsf[1:3, ], pred_type = 'time')
#> [,1]
#> [1,] 360.580
#> [2,] 2555.766
#> [3,] 1195.855
fit_time$eval_oobag$stat_values
#> [,1]
#> [1,] 0.8360331
fit_mort <- orsf_update(fit_time, oobag_pred_type = 'mort')
fit_mort$eval_oobag$stat_values
#> [,1]
#> [1,] 0.8435335 Created on 2024-01-22 with reprex v2.1.0 |
That's awesome, thank you! 🎉 I've opened tidymodels/censored#301 to enable that in censored. Given that there is such a high focus on consistency across tidymodels, I don't think we are likely to change what the default is for any one engine. At that abstraction level, the goal is typically to not have to remember details about an engine. Mortality predictions are also currently not part of tidymodels but that is something that might change in future. If that happens, that would be the opportunity to enable that for aorsf and others and possibly revist defaults. |
I totally understand prioritizing consistency! This is a good incentive for me to investigate more thoughtful ways for Thanks for your help improving |
Hi @bcjaeger! Sorry for intruding in this issue :)
|
Very nice! I will try this out |
This issue showed someone trying to predict survival time with aorsf via tidymodels. We currently only have predictions of the survival probability implemented in censored. Looking around aorsf I didn't see any prediction type that we could wrap for "survival time". Is that correct? Would you consider implementing that? 🙌
The text was updated successfully, but these errors were encountered: