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
Hi, I have been wordering if there is a way to connect the bart regression model with some other tree based model, like XGboost or sklearn's trees. This in order to use the bart model to estimate some of the parameters of these models and then use the other tree models to generate SHAP values. This is based on the following blog in towardsdatascience.com: Bayesian inference.
This will generate a more thorough analysis of the black box model generated from the BART model.
From a quick look at that notebook, what you need is to make predictions from a model and then pass those predictions to the shape package. That's something you can do with any PyMC model including BART models. You can compute predictions using pm.sample_posterior_predictive, no need to rewrite the model as in the notebook you shared. The author builds a SimpleModel class, which seems unnecessary to me.
I think we can add an example of this to the docs.
Ohh, now I understand, the shap package is expecting an object with a prediction method. I guess that is what you mean by getting a "frequentist model". Still, the approach in that notebook is not very "pymc-onic". I guess the best approach will be to provide a utility function to simplify the user experience.
Short Description
Hi, I have been wordering if there is a way to connect the bart regression model with some other tree based model, like XGboost or sklearn's trees. This in order to use the bart model to estimate some of the parameters of these models and then use the other tree models to generate SHAP values. This is based on the following blog in towardsdatascience.com: Bayesian inference.
This will generate a more thorough analysis of the black box model generated from the BART model.
Code Example or link
This can be seen in examples from : this blog post
And the shap value package is: shap
Relevant documentation or public examples
The text was updated successfully, but these errors were encountered: