# Support Vector Machine Regression Predict

4 ビュー (過去 30 日間)
TOMMASO BERTOCCHI 2021 年 3 月 2 日
コメント済み: TOMMASO BERTOCCHI 2021 年 3 月 3 日
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 日

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 件のコメント表示非表示 4 件の古いコメント
TOMMASO BERTOCCHI 2021 年 3 月 3 日
it works only with numTrainpoints = 12, but it gaves the same result of the benigging
numTrainPoints = 12;
dtrain = d(1:numTrainPoints, 1:(A-af)); % select first points for training
model = fitrsvm(dtrain, dresponse); % fit model to train data
dtest = d(1:numTrainPoints, 1:(A-af)); % select the rest for testing
predictedPassengers = predict(model, dtest); % test
because it's the same code dtest result the same of dtrain

サインインしてコメントする。

### Community Treasure Hunt

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

Start Hunting!

Translated by