# Visualization of predictions

In this post I want to shortly introduce you to the great visualization possibilities of mlr. Within the last months a lot of work has been put into that field. This post is not a tutorial but more a demonstration of how little code you have to write with mlr to get some nice plots showing the prediction behaviors for different learners.

First we define a list containing all the learners we want to visualize. Notice that most of the mlr methods are able to work with just the string (i.e. "classif.svm") to know what learner you mean. Nevertheless you can define the learner more precisely with makeLearner() and set some parameters such as the kernel in this example.

First we define the list of learners we want to visualize.

## Support Vector Machines

Now lets have a look at the different results and lets start with the SVM with a linear kernel.

We can see clearly that in fact the decision boundary is indeed linear. Furthermore the misclassified items are highlighted and a 10-fold cross validation to obtain the mean missclassification error is executed.

For the polynomial and the radial kernel the decision boundaries already look a bit more sophisticated:

Note that the intensity of the colors also indicates the certainty of the prediction and that this example is probably a rare case where the linear kernel performs best. although this is likely only the case because we didn’t optimize the parameters for the radial kernel.