MATLAB: Predict future value using SVM regression

predictsvm regression

I have a training set for 20 days. X is from 1:20 and Y is the corresponding response variable (say, data usage for 20 days). I want to predict data usage for the 21st day using SVM regression. I have trained model using tb=table(X,Y); Mdl = fitrsvm(tb,Y). Now how do I predict data value for 21st day?

Best Answer

Hi Haneya,
Once the trained model is created you can use the predict function for predicting the values. For example -
Mdl=fitrsvm(tb,Y);
y = predict(Mdl,x); //where you can put x = 21 and get the output for 21st day.x can be an array also.