Adding Brier-Score Calculation and Calibration Plots (smooth and binned version)#101
Adding Brier-Score Calculation and Calibration Plots (smooth and binned version)#101laqua-stack wants to merge 11 commits into
Conversation
sebp
left a comment
There was a problem hiding this comment.
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