XGBoost 2 will bring a lot of cool features. But we need to adapt the shapviz() wrapper around predict(...,):
The column name "BIAS" was renamed to "(Intercept)". Since it is always the last column, we might work with integer position instead of names.
In multi-output settings, instead of a list of SHAP (interaction) values, an array of one order higher is returned. The new class dimension is at position 2.
The new strict_shape = TRUE option correctly handles the single row case, where the old behaviour dropped a dimension.
XGBoost 2 will bring a lot of cool features. But we need to adapt the
shapviz()
wrapper aroundpredict(...,)
:The column name "BIAS" was renamed to "(Intercept)". Since it is always the last column, we might work with integer position instead of names.
In multi-output settings, instead of a list of SHAP (interaction) values, an array of one order higher is returned. The new class dimension is at position 2.
The new
strict_shape = TRUE
option correctly handles the single row case, where the old behaviour dropped a dimension.These proposals should work with XGBoost 1 and 2.