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

Now we are ready to call the broken() function. Since kernlab is useing S4 methods we need to pass here the hook to kernlab:::predict method.

And plot it.

plot(explain_5_down) +  ggtitle(paste0("Prediction for SVM model ", round(base_prediction, 3)))