How vishalbasker/flight-delay-prediction works
This repository develops flight-delay prediction in two parallel notebook-based implementations: an original build and a corrected rebuild, plus a Python inference agent. The documented training workflow covers merging flight and hourly weather data, cleaning and feature preparation, classification and regression, and evaluation. The sampled agent source confirms whitelist filtering, preprocessing, threshold-based classification, regression, and a response; unlike the README’s description, it runs regression for every input. Notebook internals were not sampled, so their links reflect only documented workflow.
Main entry points: fsa.py Flight status agent · ML_Flight_Part2 (after_removing_cols).ipynb Column cleaning · ML_Flight_Part1.ipynb Data extraction and merge · ML_Flight_Part3 (Classification).ipynb Classification
Components 19
Original build
- Data extraction and merge
manual/ML_Flight_Part1.ipynb - Column cleaning
manual/ML_Flight_Part2 (after_removing_cols).ipynb - Classification
manual/ML_Flight_Part3 (Classification).ipynb - Regression
manual/ML_Flight_Part4 (Regression).ipynb - Final pipeline
manual/ML_Flight_Part5 (Pipelining+Regression Analysis).ipynb
Corrected build
- Corrected notebook workflow
claude-code-build
Inference
- Feature and model settings
claude-code-build/feature_metadata_v2.pkl - Feature scaler
claude-code-build/scaler_v2.pkl - One-hot encoder
claude-code-build/ohe_v2.pkl - Classifier settings
claude-code-build/classifier_choice_v2.pkl - Regressor settings
claude-code-build/regressor_choice_v2.pkl - Flight status agent
claude-code-build/fsa.py - Input validation
claude-code-build/fsa.py - Feature preprocessing
claude-code-build/fsa.py - Delay classifier
claude-code-build/fsa.py - Delay regressor
claude-code-build/fsa.py - Prediction response
claude-code-build/fsa.py
Other components
- Flight and weather data
- Prediction caller
Connections 22
- Flight and weather data → Data extraction and merge: merge inputs
- Data extraction and merge → Column cleaning: prepare data
- Column cleaning → Classification: train classifier
- Column cleaning → Regression: train regressor
- Classification → Final pipeline: pipeline models
- Regression → Final pipeline: pipeline models
- Flight and weather data → Corrected notebook workflow: merge inputs
- Prediction caller → Flight status agent: submit flight
- Flight status agent → Feature and model settings: load metadata
- Flight status agent → Feature scaler: load scaler
- Flight status agent → One-hot encoder: load encoder
- Flight status agent → Classifier settings: load threshold
- Flight status agent → Regressor settings: load settings
- Flight status agent → Input validation: validate input
- Input validation → Feature preprocessing: filtered fields
- Feature preprocessing → Feature scaler: scale features
- Flight status agent → Delay classifier: classify flight
- Flight status agent → Delay regressor: estimate minutes
- Delay classifier → Prediction response: delay probability
- Delay regressor → Prediction response: delay estimate
- Flight status agent → Prediction response: format response
- Prediction response → Prediction caller: return result