You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently trying to add a functionality to treeshap that allows to compute SHAP values depending on the survival time.
My goal is to provide SHAP values computed with treeshap that allow to be further used with the survex R package in order to compute SurvSHAP(t) values, as the current computation using kernelshap seems to be rather slow for ranger (https://github.com/ModelOriented/survex/blob/main/R/surv_shap.R#L148).
The current state of implementation is located here in my fork: kapsner@ead7d15
Before I open a PR here, I want to make sure that there are no major issues.
Somehow, the difference between unified and original predictions increases with greater death_times, leading to a failing of the original comparison (expect_true(all(abs((from_unified - original) / original) < 10**(-14)))).
Does that somehow make sense? If this seems errorneous, would you have an idea, where the error might be located?
Thanks a lot in advance.
Best, Lorenz
The text was updated successfully, but these errors were encountered:
kapsner
changed the title
Feature: ranger_surv_fun.unify
Feature: ranger_surv.unify(type = "survival")
Apr 6, 2023
Hello @pbiecek,
I am currently trying to add a functionality to treeshap that allows to compute SHAP values depending on the survival time.
My goal is to provide SHAP values computed with treeshap that allow to be further used with the
survex
R package in order to compute SurvSHAP(t) values, as the current computation usingkernelshap
seems to be rather slow forranger
(https://github.com/ModelOriented/survex/blob/main/R/surv_shap.R#L148).The current state of implementation is located here in my fork: kapsner@ead7d15
Before I open a PR here, I want to make sure that there are no major issues.
At one of the unit tests, I encountered some irregularities when comparing "unified" to "original" predictions:
https://github.com/kapsner/treeshap/blob/master/tests/testthat/test_ranger_surv.R#L142
Somehow, the difference between unified and original predictions increases with greater death_times, leading to a failing of the original comparison (
expect_true(all(abs((from_unified - original) / original) < 10**(-14)))
).Does that somehow make sense? If this seems errorneous, would you have an idea, where the error might be located?
Thanks a lot in advance.
Best, Lorenz
The text was updated successfully, but these errors were encountered: