Support Vector Machine Regression Predict
显示 更早的评论
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?


Probably it's a dumb question, but i can't figure out.
Thanks.
回答(1 个)
Iuliu Ardelean
2021-3-2
编辑:Iuliu Ardelean
2021-3-2
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 个评论
TOMMASO BERTOCCHI
2021-3-2
Iuliu Ardelean
2021-3-2
Hey -- sorry about that -- my error -- I've updated the response -- please let me know if it still doesn't work
TOMMASO BERTOCCHI
2021-3-3
Iuliu Ardelean
2021-3-3
编辑:Iuliu Ardelean
2021-3-3
what value did you use for numTrainPoints?
Maybe try a smaller number, e.g. numTrainPoints = 10
TOMMASO BERTOCCHI
2021-3-3
类别
在 帮助中心 和 File Exchange 中查找有关 Support Vector Machine Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!