This example demonstrates how to use the breakDown package for models created with the xgboost package.

Now we are ready to call the broken() function.

And plot it.

library(ggplot2)
plot(explain_2) + ggtitle("breakDown plot for xgboost model")