Prediction using SVM regression?

I want to use Vector Vector Machine (SVM) for forecasting. And I wrote the code as follows using the matlab function fitrsvmand predict,

tb = table(x,y)                                                  
Mdl = fitrsvm(tb,'y','KernelFunction','gaussian')                                                                          
YFit = predict(Mdl,tb);                                
scatter(x,y);                                                   
hold on                                                
plot(x,YFit,'r.')

The output that I get here.
 Here, blude is the test value ( tb), and red is the prediction using SVM. Since you can clearly see that this prediction is false. Can someone tell me some way to improve the prediction close to the measured values?

+4
source share
1 answer

You must use Kernel Function, such as RBF or Gaussian, and so on. enter image description here

SVM K (xi, xj) = xi*xj . , .

,

x = 0:0.01:5 ;
y = sin(x)+rand(1, length(x)) ;
x = x' ;
y = y' ;
tb = table(x,y) ;
Mdl = fitrsvm(tb,'y','KernelFunction','gaussian');
YFit = predict(Mdl,tb);                                
scatter(x,y);                                                   
hold on                                                
plot(x,YFit,'r.')

=============================================== ========================
, , , - , .

+3

Source: https://habr.com/ru/post/1679550/


All Articles