You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi,
I am doing uni variate forecasting by using SVM in r. I did my in sample forecast precisely but when i do forecast for some next time period it gives the same values. here are codes.
lagged_data<-y[complete.cases(y),]
View(lagged_data)
n<-dim(lagged_data)[1]
train_data<-lagged_data[1:(n-24),]
test_data<-lagged_data[(n-23):n,]
modelsvm = svm(inflation~.,train_data)
predYsvm = predict(modelsvm, test_data)
forecast<-data.frame(test_data$inflation, predYsvm)
till now it did good but it is in sample forecast but when i do for out sample forecast it repeats the training values.
out_predYsvm = predict(modelsvm, h=24)
The text was updated successfully, but these errors were encountered:
Rizwanrustam
changed the title
How to forecast out of sample by SVM in r?
How to do out of sample forecast by SVM in r?
Mar 20, 2019
hi,
I am doing uni variate forecasting by using SVM in r. I did my in sample forecast precisely but when i do forecast for some next time period it gives the same values. here are codes.
lagged_data<-y[complete.cases(y),]
View(lagged_data)
n<-dim(lagged_data)[1]
train_data<-lagged_data[1:(n-24),]
test_data<-lagged_data[(n-23):n,]
modelsvm = svm(inflation~.,train_data)
predYsvm = predict(modelsvm, test_data)
forecast<-data.frame(test_data$inflation, predYsvm)
till now it did good but it is in sample forecast but when i do for out sample forecast it repeats the training values.
out_predYsvm = predict(modelsvm, h=24)
The text was updated successfully, but these errors were encountered: