This repository contains two distinct approaches to predicting air passenger numbers using time series forecasting techniques:
- Recurrent Neural Network (RNN) with LSTM
- Custom ARIMA-like Model
- Source: Air Passengers Monthly Data
- Description: Monthly total number of international airline passengers from 1949 to 1960
- Objective: Predict future passenger numbers using different methodologies
air-passengers-prediction/
│
├── data/
│ └── AirPassengers.csv
│
├── rnn_prediction.py
├── arima_prediction.py
│
├── README.md
└── requirements.txt
- Model: LSTM-based neural network
- Key Features:
- Deep learning approach
- Sequence-to-sequence prediction
- Captures complex temporal dependencies
- Preprocessing:
- Min-Max scaling
- Sequence creation
- 3D tensor transformation
- Model: Linear Regression with RNN-inspired preprocessing
- Key Features:
- Statistical time series approach
- Custom sequence preparation
- Flexible model parameters
- Preprocessing:
- Similar to RNN approach
- Linear regression-based prediction
- NumPy
- Pandas
- Matplotlib
- Scikit-learn
- TensorFlow (for RNN)
- Clone the repository
git clone https://github.com/yourusername/air-passengers-prediction.git
cd air-passengers-prediction
- Install dependencies
pip install -r requirements.txt
python rnn_prediction.py
python arima_prediction.py
Both models are evaluated using:
- Mean Squared Error (MSE)
- Mean Absolute Error (MAE)
Each implementation generates:
- Actual vs Predicted Passenger Numbers
- Loss Curves (for RNN)
- Prediction Error Analysis
- Captures non-linear patterns
- Learns complex temporal dependencies
- Deep learning approach
- Simpler implementation
- Statistical foundation
- Faster computation
-
RNN:
- Requires more data
- Computationally expensive
- Hyperparameter sensitive
-
ARIMA-like Model: