Skip to content

Repository files navigation

✈️ Airline Loyalty Program: Behavioral Intelligence & Retention Strategy

An end-to-end data analytics and product strategy project that pivots a mid-sized Canadian airline's loyalty program from a reactive points-management system to a proactive, data-driven behavioral intelligence engine.


📌 Executive Summary

Historically, this airline relied on basic Customer Lifetime Value (CLV) and administrative cancellation metrics to track loyalty. This approach created a critical blind spot: high-value users drifted into inactivity undetected.

This project tackles that challenge by:

  1. Redefining Churn: Building a multi-factor behavioral anchor to catch "silent churners."
  2. Predictive Modeling: Deploying a Random Forest classifier (ROC-AUC: 0.966) to forecast churn susceptibility before it happens.
  3. Multidimensional Segmentation: Using K-Means clustering to identify 5 distinct, highly actionable customer personas based on flight velocity and engagement intensity.
  4. Product-Led Growth (PLG): Translating algorithmic outputs into a working Streamlit dashboard that provides marketing managers with exact retention playbooks for targeted cohorts.

📂 Repository Structure

├── Dashboard/
│   ├── app.py                      # The interactive Streamlit web application
│   └── master_final_segmented.csv  # The scored and segmented dataset driving the UI
├── Initial_Datasets/
│   ├── Customer Loyalty History.csv # Raw demographic and enrollment data
│   └── Customer Flight Activity.csv # Raw transactional flight logs
├── Models_Output/
│   ├── feature_importances.png     # Visual ranking of churn drivers
│   ├── ROC_Curve.png               # Model evaluation metric
│   └── cluster_profiles.png        # Summary of the 5 K-Means personas
├── src/
│   ├── phase1_data_cleaning.py     # Defensive imputation and time-series aggregation
│   ├── phase2_target_definition.py # Engineering the multi-factor churn logic
│   ├── phase3_random_forest.py     # Predictive modeling and feature extraction
│   └── phase4_kmeans_clustering.py # Multidimensional segmentation framework
├── Report/
│   └── Technical_Report.pdf        # The comprehensive, LaTeX-typeset strategy document
└── README.md

⚙️ Methodology & Technical Execution

Phase 1: Data Architecture & Defensive Cleaning

  • Merged multi-year operational datasets and handled missing demographic values (e.g., median-based salary imputation by education tier) to prevent algorithmic bias.
  • Resolved pipeline artifacts by aggregating split-booking records, ensuring a strict "one row per customer-month" architecture.

Phase 2: Target Definition & Feature Engineering

The Silent Churn Rule

Flagged users with zero flights and zero redemptions over a continuous 12-month period.

The Exception Rule

Protected active revenue by ensuring users who canceled a co-branded card but continued to fly were correctly labeled as Active.


Phase 3: Predictive Modeling (Random Forest)

  • Trained a Random Forest Classifier with class_weight='balanced' to correct for the 84/16 class imbalance.
  • Achieved:
    • ROC-AUC: 0.966
    • Recall: 97%

Key Insight

Feature importances proved churn is a behavioral problem, not a demographic one.

  • Months_Flown
  • Redemption_Rate

far outweighed:

  • Salary
  • Province

🧠 Core Segmentation Framework (Phase 4)

To overcome the "CLV Paradox"—where raw lifetime totals hide high-potential new members—an unsupervised K-Means clustering algorithm (k=5) was deployed using 10 engineered dimensions focused on velocity and intensity:

Engineered Features

  • CLV & CLV_Per_Month
    Total historical value vs. the rate of value generation.

  • Tenure_Months
    Total account age.

  • Frequency_Penetration
    Percentage of active months within a 24-month window.

  • Engagement_Intensity
    Average flights per month (calculated only for active months).

  • Redemption_Rate
    Fraction of earned points successfully burned.

  • Recency_Months
    Total months elapsed since the last flight.

  • Demographics & Status

    • Salary
    • Loyalty Card Tier
  • Churn_Probability
    Predicted risk score generated by the Random Forest classifier.


👥 The 5 Strategic Personas

Based on these 10 dimensions, the 16,700-member base was grouped into the following actionable cohorts:

1. VIP Loyalists (19.8%)

Highest-value, high-tenure corporate travelers who fly consistently and present near-zero churn risk.

2. Emerging Members (15.5%)

Newer members with moderate value who are still establishing habits and are highly vulnerable to early-stage churn.

3. Loyal Budget Flyers (45.4%)

The massive volume engine; long-tenure customers with lower individual CLV but highly consistent flight patterns.

4. At-Risk Dormant (14.6%)

Previously high-value members who have not flown in months and require aggressive win-back campaigns.

5. High-Engagement Newcomers (4.7%)

The future VIP pipeline; brand-new members showing extremely high flight intensity right out of the gate.


🎯 Product-Led Growth (PLG) Playbooks

Using the segmentation framework, we developed structural product interventions rather than relying on generic discount codes.

For VIP Loyalists

Deploy:

  • Zero-Friction Guarantees

    • Example: 1-tap rebooking for delayed flights
  • Status Portability

    • Example: gifting lounge passes

Goal: leverage loyalty for zero-CAC acquisition.


For Emerging Members

Drop Phantom Points upon signup.

Example:

  • 5,000 points with a 60-day expiry

This leverages behavioral loss aversion to force the critical "first flight" habit.


For Loyal Budget Flyers

Unlock In-Flight Micro-Burns.

Example:

  • Redeem 500 points for:
    • Wi-Fi
    • Snacks

Benefits:

  • Clears financial liability off the balance sheet
  • Creates a recurring reward loop

For High-Engagement Newcomers

Activate the Fast-Track Multiplier.

Example:

  • 3x points for 90 days

Goal: lock in momentum before their initial surge in travel fades.


For At-Risk Dormant

Trigger:

  • Algorithmic route-specific price alerts
  • A 90-day "Prove It" status match challenge

based on historical flight patterns.


🚀 The Product Dashboard

The final deliverable is a functional Streamlit interface that closes the gap between machine learning outputs and concrete business action.

It allows non-technical marketing managers to:

  • Filter the database by:

    • Risk Level
    • Persona
  • Instantly surface:

    • targeted customer lists
    • corresponding PLG retention strategies

💻 How to Run the Dashboard Locally

1. Clone the repository

git clone <repository-url>

2. Navigate to the dashboard directory

cd Dashboard

3. Install dependencies

pip install -r requirements.txt

Required Packages

  • streamlit
  • pandas
  • plotly
  • scikit-learn

4. Launch the app

streamlit run app.py

About

Summer_Project

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages