Skip to content
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: ranger_surv.unify(type = "survival") #24

Closed
kapsner opened this issue Apr 4, 2023 · 1 comment
Closed

Feature: ranger_surv.unify(type = "survival") #24

kapsner opened this issue Apr 4, 2023 · 1 comment

Comments

@kapsner
Copy link
Contributor

kapsner commented Apr 4, 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 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.

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

@kapsner
Copy link
Contributor Author

kapsner commented Aug 1, 2023

I guess this can be closed as #26 has already been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant