Flight Price Prediction

Regression • Random Forest + feature engineering + model interpretability

Flight price prediction thumbnail

Flight ticket prices fluctuate based on several factors, making prediction a challenging problem. This project uses machine learning to predict ticket prices from features like airline, departure/arrival times, duration, stops, and travel date.

TL;DR

Random Forest regression model trained on flight features with preprocessing, tuning, and evaluation using MAE/RMSE/R².

My role

Built the end-to-end ML workflow: data cleaning + encoding, feature engineering, model training, evaluation, and feature importance analysis.

Tech

PythonPandasNumPyscikit-learnRandom ForestGridSearchCVMatplotlib

Links


What’s inside

  • Data preprocessing: missing values, categorical encoding, feature engineering
  • Model training: Random Forest Regression
  • Hyperparameter tuning: GridSearchCV
  • Evaluation: MAE, RMSE, R²
  • Interpretability: feature importance visualization

Media

Actual vs predicted flight prices
Actual vs predicted prices. Points closer to the diagonal indicate stronger predictions.
Feature importance bar chart for flight price model
Feature importance from the trained Random Forest model (which features influence the price the most).

Repository

Explore the code on GitHub: Flight Price Prediction