I wrote an article titled “Time Series Regression using a C# Neural Network” in the October 2017 issue of Microsoft MSDN Magazine. See https://msdn.microsoft.com/en-us/magazine/mt826350.
I started my article by noting that the goal of a time-series regression problem is to make predictions based on historical time data. For example, if you have monthly sales data (over the course of a year or two), you might want to predict sales for the upcoming month. Time-series regression is usually very difficult, and there are many different techniques you can use.
In my article, I tackle a standard time series problem where the data is total international airline passengers per month, from January 1949 through December 1960 (144 months). I used a “rolling window” approach where the raw data is configured to look like this:
1.12, 1.18, 1.32, 1.29, 1.21 1.18, 1.32, 1.29, 1.21, 1.35 1.32, 1.29, 1.21, 1.35, 1.48 1.29, 1.21, 1.35, 1.48, 1.48 1.21, 1.35, 1.48, 1.48, 1.36 . . . 6.06, 5.08, 4.61, 3.90, 4.32
Each value is the number of passengers in 100,000s. Each set of four consecutive months is used to predict the passenger count for the next month. The window size of four is arbitrary and in general you must use trial and error to determine a good window size for each problem.
I used a neural network approach. In essence, this is just a normal regression problem (i.e., the goal is to predict a single numeric value) with specially formed training data.
The prediction model worked pretty well:
Time series regression is very challenging. This simple example is relatively easy, but real-life time series problems are among the most difficult problems in all of machine learning.