FLIGHT FARE PIPELINE WORKSHOP

A trace of raw booking fields transformed into model-ready signals

01 // RAW INPUTS 02 // PARSING 03 // DERIVED FEATURES 04 // PREPROCESSING 05 // PREDICTION DATE_OF_JOURNEY DEP_TIME ARRIVAL_TIME DURATION AIRLINE SRC_&_DEST STOPS SPLIT DATE SPLIT TIME DUR TO MINS JOURNEY_DAY JOURNEY_MONTH JOURNEY_YEAR DEP_HOUR DEP_MINUTE ARR_HOUR ARR_MINUTE DUR_MINUTES DAYS_LEFT * ONE-HOT ENCODE MINMAX SCALE FARE ESTIMATE IMPORTANCE SHAP ATTR % DAYS_LEFT ■■■■■■■■ 78% DURATION ■■■ 34% AIRLINE ■■ 16%

DEEP DIVE: DAYS_LEFT

The booking window (Days Left until departure) is the single most powerful continuous feature in flight pricing models.

Airlines use dynamic pricing algorithms that exponentially inflate fares as the departure date approaches. This targets high-urgency, price-insensitive business travelers.

Pricing Dynamics:

  • > 30 Days: Leisure floor pricing
  • 14-29 Days: Standard business tier
  • < 7 Days: Maximum yield capture
# Log-transforming helps models resolve # the exponential price curve: df['days_left_log'] = np.log1p(df['Days_Left'])