predict future value using SVM regression

조회 수: 3 (최근 30일)
Haneya Qureshi
Haneya Qureshi 2018년 5월 28일
댓글: Almost Artsy 2019년 3월 2일
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?

채택된 답변

Shrestha Kumar
Shrestha Kumar 2018년 5월 29일
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
Almost Artsy
Almost Artsy 2019년 3월 2일
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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Support Vector Machine Regression에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by