Support Vector Regression-R


Support Vector Regression is a Generalization of SVM into Regression problems. SVR’s are supervised learning algorithms which require a training data set including the target variable to develop an algorithm which can be used to build a model. As we already gone through the conceptual understanding of SVR algorithm. In this section we would try to implement SVR logic using R commands/Packages.

Let us look into codes step by step.

Step 1: First setup the working library for the R-Studio or whichever interface you are using. We set a working library as it becomes easier to importing the stored data set or even while saving final codes.


Step 2: Import the Data set:


Data set contains Position, Level and Salary.

Step 3: We would use “e1071” package while working with Random Forest. First try to install the package using the following code.


Step 4: In this analysis we would use just last two columns. So we would select last two columns using the following command


Step 5: Following code will help us implement SVR




  1. naturally like your website however you need to check the spelling on quite a few of your posts. Many of them are rife with spelling problems and I to find it very troublesome to inform the truth on the other hand I will definitely come again again.

  2. Hey there! I just would like to offer you a huge thumbs up for your excellent info you’ve got right here on this post.
    I am coming back to your website for more soon.


Please enter your comment!
Please enter your name here