Spider-Man hanging upside down
FIG. 03

Flight Price Predictor

A Random Forest regression model predicting flight prices at an R² of 0.87 — built to support dynamic pricing decisions with real feature engineering behind it.

ROLE
Solo Project
MODEL
Random Forest
TYPE
Regression / ML
STATUS
Completed
0.87
R² SCORE
10+
ENGINEERED FEATURES
1
MODEL, BENCHMARKED
Live
PRICE ESTIMATOR BELOW

Model Performance

How well the model actually explains price variation — the honest numbers, not just the headline R².

0.87
R² SCORE
LOW ERROR ON SHORT-HAUL ROUTES
HIGHER VARIANCE NEAR HOLIDAYS

Case File

Three angles on the same build — click through.

// WHY THIS NEEDED BUILDING

Flight prices swing constantly based on demand, seasonality, and how far out you book — but that pricing logic is opaque from the outside. Airlines optimize it internally; nobody outside gets a clear model of what's actually driving the number on any given route.

The goal was to reverse-engineer enough of that signal to predict price accurately from a small set of interpretable features — proving that dynamic pricing isn't a black box, it's a regression problem with the right feature engineering.

// HOW IT WAS PUT TOGETHER
  • Feature Engineering — converted raw booking data into signals that actually predict price: days-before-departure, route distance, time-of-day bucket, and seasonal demand flags, instead of feeding the model raw dates.
  • Preprocessing — handled categorical encoding for airlines and routes, and normalized numerical features so the model wasn't skewed by scale differences between price and distance.
  • Model Choice — went with Random Forest over a single decision tree specifically because it handles the non-linear relationship between days-before-departure and price (that late-booking price spike isn't linear) without overfitting to noise.
  • Evaluation — measured with R² rather than raw error alone, since the goal was explaining price variance across very different route types, not just minimizing error on the most common ones.
// WHAT SHIPPED

A model explaining 87% of the variance in flight prices from a compact, interpretable feature set — accurate enough to support real dynamic-pricing decisions, not just a classroom exercise.

The bigger takeaway: most of the performance gain came from feature engineering, not model complexity. A well-chosen feature set with Random Forest beat more complex approaches with poorly engineered inputs — a pattern that's shown up in every ML project since.

Try the Price Estimator

Adjust the inputs to see how the same signals used in training shift a predicted fare.

30 days
1200 km
PREDICTED FARE
₹6,240
WITHIN TYPICAL RANGE

Stack

Click any tag to see how it's actually used in this project.

SELECT A TAG

Click any technology above to see exactly how it's used in this build.

← Student Risk Dashboard Music Recognition App →