Skip to content

This project uses a Long Short-Term Memory (LSTM) Recurrent Neural Network to predict monthly international airline passenger counts based on historical data.

Notifications You must be signed in to change notification settings

SrujanBhirud/Airline-Passenger-Prediction-Using-LSTM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Airline-Passenger-Prediction-Using-LSTM

Overview

This project implements a Long Short-Term Memory (LSTM) Recurrent Neural Network in Python to predict the number of international airline passengers. The dataset used is the International Airline Passengers dataset, which records monthly totals of international airline passengers (in thousands) from January 1949 to December 1960.

The goal is to predict the number of passengers for a given month and year, using historical data. The project employs TimeSeriesSplit for model optimization and evaluates the model's performance using Root Mean Squared Error (RMSE).


Dataset Details


Project Features

  • Model: Long Short-Term Memory (LSTM) Recurrent Neural Network
  • Optimization: TimeSeriesSplit for hyperparameter tuning and performance evaluation
  • Error Metrics: Root Mean Squared Error (RMSE) for train and test sets

Results

  • Train RMSE: 20.90
  • Test RMSE: 46.01

Repository Structure

.
├── data
│   └── airline_passengers.csv  # Dataset file
├── models
│   └── model.pkl           # Trained LSTM model
├── notebooks
│   └── time_series_analysis.ipynb  # Jupyter Notebook for analysis
└── README.md                   # Project description

Implementation Steps

  1. Data Preparation: Loaded and preprocessed the time series data, normalized values, and created sequences for training and testing.
  2. Model Design: Designed an LSTM network to capture temporal dependencies in the data.
  3. Optimization: Used TimeSeriesSplit for hyperparameter tuning and model selection.
  4. Training: Trained the LSTM model on the dataset.
  5. Evaluation: Assessed the model's performance using RMSE on both train and test sets.

Usage

Prerequisites

  • Python 3.8 or higher
  • Libraries: TensorFlow, NumPy, Pandas, Matplotlib, scikit-learn

Instructions

  1. Clone this repository:
    git clone https://github.com/SrujanBhirud/Airline-Passenger-Prediction-Using-LSTM.git
  2. Navigate to the project directory:
    cd Airline-Passenger-Prediction-Using-LSTM
  3. Install dependencies:
    pip install -r requirements.txt
  4. Run the notebook:
    jupyter notebook notebooks/time_series_analysis.ipynb

Key Results and Insights

  • The LSTM model effectively captures temporal patterns but demonstrates room for improvement in predicting test data.
  • RMSE on the test set indicates higher error due to unseen data, suggesting the need for more robust regularization or additional features.

Future Work

  • Experiment with additional architectures like GRU and Transformer models.
  • Incorporate external features such as economic indicators or seasonality adjustments.

Acknowledgments

About

This project uses a Long Short-Term Memory (LSTM) Recurrent Neural Network to predict monthly international airline passenger counts based on historical data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published