Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

126 Commits

Folders and files

Repository files navigation

MBTA Delay Prediction Tool

Overview

This project predicts MBTA subway delays using multiple machine learning approaches for two tasks:

  1. Delay Probability Prediction
    Predict whether a train will be delayed.

  2. Delay Duration Prediction
    Predict how long a delay will last.

The project compares four models:

  • Long Short-Term Memory (LSTM) - prediction
  • Hidden Markov Model (HMM) - prediction
  • Random Forest Regressor - duration
  • Gradient Boosting Regressor - duration

The system includes data preprocessing pipelines, model training, saved model artifacts, and a Streamlit-based frontend for generating predictions.


Goal:
Evaluate how different machine learning models perform in predicting both the likelihood and duration of MBTA delays using a limited but well-engineered set of features.

Project Structure

src/models/lstm.py
src/models/hmm.py
src/models/random_forest.py
src/models/gradient_boosting.py

src/preprocessing/
src/visualizations/

Datasets/
src/models/model_storage

app.py
requirements.txt
README.md

Installation

Prerequisites

Python 3.10+ (we used Python 3.14)

Required libraries:

  • torch
  • numpy
  • pandas
  • scikit-learn
  • matplotlib
  • streamlit
  • pyyaml

Install Dependencies

Clone the repository:

git clone https://github.com/ColinCarnish/CS4100_Final.git
cd CS4100_Final

Install packages:

pip install -r requirements.txt

Running the Project

Train Models

python CS4100_Final/src/models/lstm.py  
python CS4100_Final/src/models/hmm_model.py   
python CS4100_Final/src/models/GBM.py  
python CS4100_Final/src/models/forest/forest.py                 

Launch Frontend

streamlit run app/main.py

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages