All About Time Series Modeling With Neural Networks

Seth Weidman
Senior Data Scientist


In this presentation, Seth speaks to the details of   different types of time series and how to apply them to different problems experienced in the workplace. He covers tricks used to train models effectively in order for accurate predictions to be made and account for different variables used throughout a model.

“Companies entire businesses are based off of time series modeling. What the demand is going to be in the next minute, hour, etc. This requires dynamic and accurate predictions.”
Watch Seth Weidman’s full presentation here

Time series measure something that is varying over time and tries to predict what it will do in the future. These models are based on fluctuations in a univariate model to try and predict the outcome of that variable. ARIMA (auto regressive integrated moving average) models are commonly used in these univariate models. This class of modeling predicts linear effects of the last “p” time steps to future predictions. It assumes old patterns will hold in to the future by analyzing the correlation between deviations of previous trends.

Based on these historical trends and outcomes, a positive deviation will mimic the positive or negative changes that have occurred in the past. Downsides of this classical time series include only being able to look at linear relationships (which can be overcome with some feature engineering) and the inability to handle exogenous features (which can be particularly important in the financial realm where everything is connected).

These graphs represent exogenous factors and how they relate to the price of bitcoin

Classical time series can incorporate exogenous factors as extra regressors to the original model but have limitations. These can still only be captured as linear relationship between the features and targets. Additionally, they cannot capture relationships between any combinations of features and the target. 

RNNs (recurrent neural networks) can aid in overcoming some of these complications faced by classical time series. They are able to take in data from a sequence of time steps and process it sequentially to predict values into the future. A vector captures the stat of all of the variables in a model from a time step which classical time series do not do. By processing this data sequentially, it is much more effective at making predictions. This is accomplished by storing hidden statistics within the hidden layers of the neural network that then incorporate all of the data that has been used in the past. 

Classical time series can be given the same data as RNNs but will run this through a single model as opposed to the multiple models used in RNNs. Classical models do not have the same notion of sequential process of data and it is difficult to encode a notion of order.

This image shows classical time series using only one neural network
This image shows recurrent neural network with multiple models

RNNs do require a lot of data in order to form accurate predictions. This factor can be aided by the fact that RNNs work best when helpful exogenous features are present. While it is typical to understand the exact processes of neural networks due to the complicated mathematical processes taking place, they are useful in implementing what-if analyses. It is as simple as giving a properly trained model a new data set that reflects a specific question to see how results differ. An additional advantage of RNNs is that confidence intervals can be determined by using Bayesian Deep Learning techniques. By randomly dropping different subsets from the RNN nodes, the resulting change in predictions can be correlated to the confidence of that prediction.

Deep mind and open AI are continually being used in new ways to improve machine learning processes. Seth and his team at Facebook are continuing to find new ways to implement these tools for different uses in the workplace. As these techniques become more efficient and perfected their applications to real world uses continue to be realized.

Tags   •   Finance

Recent Posts

View All Posts