As an applied scientist and systems thinker I’ve always been interested in the problems of prediction, pattern recognition and fitting non-linear models in the process. One interesting and helpful technique is Support Vector Regression – a machine learning technique and a variant of Support Vector Machines.
Today I wanted to learn how-to use Support Vector Regression as easily and simply as possible in R – and luckily I found this great tutorial by Alexandre KOWALCZYK.
Below is Support Vector Regression using the e1071 library by David Meyer in 20 lines of R code including example data 🙂
This library is super simple to use as I am sure you can see – its the same as a linear model (lm) but you use the svm command! Unlike the lm however its important to tune your SVM model this is achieved using a grid search approach.
As can be seen in the plot above Support Vector Regression is very effective at fitting non-linear models.