Support Vector Machine Regression Predict
2 views (last 30 days)
Show older comments
I have this Airlines dataset. I used 11 yers for training and 1 for testing.
Once i've chosen and trained the model (using fitrsvm, predict...), suppose that i need to predict the next 3 months how can i do?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/536141/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/536146/image.png)
Probably it's a dumb question, but i can't figure out.
Thanks.
0 Comments
Answers (1)
Iuliu Ardelean
on 2 Mar 2021
Edited: Iuliu Ardelean
on 2 Mar 2021
Hey
You could try:
numTrainPoints = 100; % Let's say you want 100 train points
dtrain = d(1:numTrainPoints, 1:(A-af); % select first 100 points for training
model = fitrsvm(dtrain, dresponse); % fit model to train data
dtest = d(numTrainPoints:end, 1:(A-af); % select the rest for testing
predictedPassengers = predict(model, dtest); % test
5 Comments
Iuliu Ardelean
on 3 Mar 2021
Edited: Iuliu Ardelean
on 3 Mar 2021
what value did you use for numTrainPoints?
Maybe try a smaller number, e.g. numTrainPoints = 10
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!