treeshap icon indicating copy to clipboard operation
treeshap copied to clipboard

Compute SHAP values for your tree-based models using the TreeSHAP algorithm

Results 12 treeshap issues
Sort by recently updated
recently updated
newest added

I tried to unify my binary classification rf model trained by ranger. There is an error _Warning message: In Ops.factor(get("Prediction"), n) : ‘/’ not meaningful for factors_ I don't know...

On treeshap version 0.3.0, there is an error thrown by ranger_surv.unify, when type= "chf": `unified_model_surv

Due to R not being able to handle large character strings, with a resulting error: `Error: R character strings are limited to 2^31-1 bytes`. See https://github.com/microsoft/LightGBM/issues/6288#issuecomment-1983592815

In treeshap.model_unified function, this line does not behave as expected if x is a data.table : ` x %as.data.frame%>%.[,colnames(x)%in%colnames(x)] a b 1 1 2 2 2 3 3 3 4...

`ranger.unify` and `gbm.unify` don't support categorical features, which is essential when working with `factors` in R.

feature 💡

Adding [support](https://github.com/ModelOriented/survex/issues/75) for survival models other than `ranger` (see [#24](https://github.com/ModelOriented/treeshap/issues/24)). The source code for the `ranger` can be followed. Functionality for `randomForestSRC` should be relatively easy to implement.

Great work. Are you planing on adding support for H2O based tree models as well?

feature 💡

I was trying to create a unified lightgbm. I've fit the model using the tidymodels framework. Unfortunately I got this error: `Error in ifelse(decision_type %in% c(">=", ">"), ret.second(split_index), : Unknown...

Good day. Is it possible to get SHAP values for random survival forest models with this package? For instance, those generated from [randomForestSRC](https://www.randomforestsrc.org/)? Thank you very much.

feature 💡

Hi, I would like to know if there are any plans for supporting the Cubist package? It is also based on decision trees.

feature 💡