How to calculate feature contribution of XGBoost and LightGBM model?

Question

This Content is from Stack Overflow. Question asked by Wenhui Hu

It is able to extract feature contributions of the Random Forest model with the python library “treeinterpreter” with reference to http://blog.datadive.net/random-forest-interpretation-with-scikit-learn/.
Is there a similar way to calculate feature contributions of the XGboost or LightGBM model ? Thank you !



Solution

Check the Answers


This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of
CC BY-SA 2.5.
CC BY-SA 3.0.
CC BY-SA 4.0.

people found this article helpful. What about you?