CCIEGZM
CCIEGZM

Reputation: 105

Time series forecasting use SVM

I am trying to set-up a python code for forecasting a time-series, using SVM libraries of scikit-learn.

My data consists of X values at a day interval for the last one years, and I need to predict y for a month of the next year . Here's what I have set up -

SVR().fit(X, y).predict(X)

But for this prediction to work, I need the X value for the next month, which is not available. How do I set this up to predict future y values?

Upvotes: 0

Views: 2779

Answers (1)

farhawa
farhawa

Reputation: 10417

So (X,y) is your train set (356 data instances with their labels), to forecast the first month of the next year your SVR Model need a data set X_nextMonth (30 data instances with the same features as those of X) to pass as argument to its .predict() method that he can predict labels y_nextMonth.

Upvotes: 1

Related Questions