-
Notifications
You must be signed in to change notification settings - Fork 216
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 Brier-Score Calculation and Calibration Plots (smooth and binned version) #101
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for helping to improve scikit-survival!
I haven't checked your code in detail, yet, but one important thing that's currently missing is unit tests. You would need to provide a couple of examples to check that the implementation returns the desired results, especially for failure cases (e.g. all times are censored). If it's based on an R implementation, you can just take the outputs from there and add a unit test that checks that the python implementation arrives at the same result.
Dear @sebp, thank you for your reply. |
calculate inverse probability of censoring at time t* for all obs, not events only
I had a closer look at your code. The implementation of the (integrated) Brier score seems straight forward. In addition, you implemented |
Thank you for your effort. I hope, that I can clearify some things. Yes, their work deals with competing risks, but can be applied to "normal" right-censored survival data with only one event and uninformative censoring. In this implementation we consider a special case of competing risk analysis, where there is just one "competing" event of interest. Then the proposed Aalen-Johnson-Matrix-Estimator simplyfies to a Kaplan-Meier-Product-Limit estimator.
Or ( More on pseudo-observations including their properties in different settings: https://doi.org/10.1177%2F0962280209105020 and in the cited papers by Graw and Gerds et al. Actually the r function Once competing risks would be implemented (hey, what about a competing risk random survival forest? :-) ) we would ofcourse need to update the code (besides many other things to do) by exchanging the KM-product-limit estimator with the Aalen-Johnson estimator. I hope I have clearified what it does. |
I updated the code for I haven't looked into |
Yes, the There would be an option to use the |
Hi @sebp,
This pull requests adds an IPCW-based Brier-Score Calculation to the metrics.py.
For details about the calculation cf. the comments in the metrics.py.
Moreover, a modified version of r's calPlot using loess smoothing on jackknife pseudovalues is suggested for visual assessment of model calibration.
For a usage scenario, I modifed your Random Survival Forrest Example. Maybe, you would like to add/modify the post on your blog?
TODOS:
However, for the binned version of the calibration plot confidence intervals for the Kaplan-Meier estimates are needed.
In case of any questions, feel free to ask! I hope, that I can respond accordingly ;-)
Beste Grüße, Fabian Laqua