How to calculate joint feature contribution for XGBoost Classifier in python?


#1

I referred to Joint Feature Contributions this beautiful document to research about joint feature contibutions. But this works only for RandomForest algorithms because of treeinterpreter (does not work with xgboost). Is there a similar way out for XGBoost as well?

Basically what I want to achieve is to find out the joint contributions of all the combination of features towards the prediction. For example if I have a, b and c as my features, I want to know what is the effect of ab, bc and ca towards the prediction result. It is very similar to shap and lime but for combination of features.


#2

The article links to https://github.com/limexp/xgbfir


#3

This was really helpful. Kind of what i wanted. Thank you very much. But could you explain gain in terms of joint contributions. I understand the concept of gain with a single feature, but i am unable to map it to multiple feature interactions.


#4

I have no idea about joint contribution. You may want to reach out to the author of xgbfir or CrossValidated forum.