October 2017
Beginner to intermediate
572 pages
26h 1m
English
Besides using SVM to predict the category of new observations, you can use SVM to predict continuous values. In other words, one can use SVM to perform regression analysis.
In the following example, we will show how to perform a simple regression prediction based on a fitted SVM with the type specified as eps-regression.
Perform the following steps to train a regression model with SVM:
> library(car)
> data(Quartet)
> model.regression = svm(Quartet$y1~Quartet$x,type="eps -regression")
> predict.y = predict(model.regression, Quartet$x) > predict.y Output 1 2 3 4 5 8.196894 7.152946 8.807471 7.713099 8.533578 ...
Read now
Unlock full access