Deep Neural Networks for Time Series Forecasting

Created by Dr. Pedram Jahangiry | Enhanced with Claude

Every control below retrains an actual feedforward neural network in your browser on the classic 1949–1960 airline-passenger counts, using your chosen number of lagged months as inputs. Watch the loss curve, the network diagram, and the forecast update after each run, and compare its error metrics against a simple linear-regression benchmark.

Understanding Deep Neural Networks for Time Series

This visualization demonstrates how Deep Neural Networks (DNNs) learn patterns in time series data using the classic airline passenger dataset (1949-1960). DNNs use multiple layers of neurons to capture complex nonlinear relationships between lagged values and future predictions.

Key Concept: Unlike linear models, DNNs can learn nonlinear transformations through activation functions (ReLU, tanh). Each hidden layer learns increasingly abstract features. The model is trained using backpropagation with the Adam optimizer to minimize Mean Squared Error (MSE).

Benchmark: We compare DNN performance against Linear Regression to understand when the added complexity provides value.

Model Configuration

2
12
200

Neurons per Layer

Training Loss Curve
Model Architecture
Feature Importance (First Layer Weights)
Time Series: Actual vs Predicted Passengers

When Do DNNs Outperform Linear Models for Time Series?