ModelOriented / survex

Explainable Machine Learning in Survival Analysis
https://modeloriented.github.io/survex
GNU General Public License v3.0
99 stars 10 forks source link

Feature: add support for computing SurvSHAP using treeshap-algorithm #75

Closed kapsner closed 1 year ago

kapsner commented 1 year ago

The purpose of this formal feature request is mainly for a documentation of ongoing works and to avoid duplicate efforts.

I've started to work on implementing support for computing SurvSHAP values using the treeshap algorithm in this fork of survex.

As of now, both, local and global computation of SurvSHAP values using the ranger algorithm work technically.

Statistical / mathematical correctness needs yet to be proven for:

kapsner commented 1 year ago

Regarding the computation of the prediction of the survival probability at predefined time points using treeshap, the latest code adaptions seem to work well: the SurvSHAP-plot computed with treeshap produces very similar results compared to the one computed with kernelshap (but computation with treeshap was faster).

Plot with Treeshap (code-ref https://github.com/kapsner/survex/blob/d2c16a608792c6387b2e65890446521890d088e0/tests/testthat/test-predict_parts.R#L122): surv_treeshap

Plot with Kernelshap (code-ref https://github.com/kapsner/survex/blob/d2c16a608792c6387b2e65890446521890d088e0/tests/testthat/test-predict_parts.R#L137): surv_kernelshap

mikolajsp commented 1 year ago

Completed in #87