← All projects

Python · Scikit-learn · Pandas

Flight delay prediction

Predicting U.S. flight delays with four regression models, evaluated separately on arrivals, departures, and the combined dataset, using the DOT flight delay dataset on Kaggle.

Overview

I trained and compared Linear Regression, Ridge Regression, Random Forest, and KNN to predict delay length in minutes, then evaluated each on three separate slices of the data — combined, arrivals only, and departures only — since delays behave differently depending on which end of the flight you're predicting.

Key results

13.4 minlowest MAE overall — Random Forest, combined dataset
0.799best F1 score — Linear/Ridge Regression, arrivals
13.9 minlowest MAE — KNN, departures

No single model won across every metric and every subset. Random Forest had the best raw error on the combined data, but Linear and Ridge Regression classified delays more accurately for arrivals specifically, and KNN handled departures — the noisier of the two — best.

Takeaway

Model selection has to depend on the actual use case: minimizing average error (MAE) and correctly flagging "will this be significantly delayed" (F1/classification) aren't the same objective, and the best model changed depending on which one mattered and which leg of the flight was being predicted.