Effacer les filtres
Effacer les filtres

predict future value using SVM regression

1 vue (au cours des 30 derniers jours)
Haneya Qureshi
Haneya Qureshi le 28 Mai 2018
Commenté : Almost Artsy le 2 Mar 2019
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?

Réponse acceptée

Shrestha Kumar
Shrestha Kumar le 29 Mai 2018
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.
  1 commentaire
Almost Artsy
Almost Artsy le 2 Mar 2019
Hi Shrestha, I've tried using the "predict" function. but it gives me the same value of output. can you help me solve this problem?
% Output %
yfit =
1.0e+0.3*
7.7353
7.6361
7.6312
7.6312
7.6312
7.6312
7.6312
7.6312
7.6312
7.6312
7.6312
7.6312
7.6312

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by