[Feature] Expose TreeShap feature contribution


The method to calculate shapely values via TreeShap has been added. However, it is not yet exposed in cli_main for people to use it to get feature importance values for prediction.
The functionality has been added in tree_model.cc
Can I add that to the cli_main for usage?


It’s available from Python and R bindings. Do you mean the CLI?


Yes, I meant the CLI.


How can you obtain SHAP values directly from XGBoost API without using the dedicated SHAP package?