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