Project 09AdvancedBusiness8-12 focused hoursEnd-to-end SaaS retention modeling capstone
LearnPracticeBuild

End-to-End Customer Retention Modeling

Build a defensible churn-prediction workflow from framing and leakage checks through final evaluation and stakeholder communication.

ClassificationPipelinesFeature EngineeringModel EvaluationTrees & Ensembles
FRAMEDATAANALYZEMODELEVALUATECOMMUNICATE

BUSINESS CONTEXT

Why this project matters

A subscription SaaS company wants to prioritize retention outreach, but the team can contact only a limited number of at-risk customers each week. A useful model must respect prediction timing, intervention capacity, and the cost of missed churn.

PROJECT OBJECTIVE

What you are expected to accomplish

Create a reproducible predictive workflow that identifies useful churn risk while documenting its limits, threshold decision, and recommended retention action.

DATASET OVERVIEW

Expected dataset structure

Expect customer-level subscription data with engagement, billing, support, plan, and marketing fields. The learner must decide which signals are valid at prediction time.

Main entities / rows

One row per active customer at a defined scoring date

Target variable

churned within the chosen prediction horizon (Yes/No)

customer_id

string

Identifier; useful for joins but normally not a predictor.

signup_date

date

Account start used for time-valid features.

plan_type

categorical

Current subscription plan.

monthly_fee

float

Recurring charge, potentially skewed.

sessions_last_30_days

integer

Recent engagement.

support_tickets_last_90_days

integer

Recent support activity.

payment_failures_last_90_days

integer

Historical payment friction.

last_login_date

date

Potential recency feature.

country

categorical

Customer geography.

contract_type

categorical

Commitment structure.

churned

binary

Target outcome.

Data quality issues to expect

  • Missing values and inconsistent categories require documented treatment.
  • Skewed numeric fields and date-derived opportunities need validation.
  • Post-cancellation fields or outcome-time notes can leak the target.

QUESTIONS TO ANSWER

Focus the work around meaningful decisions

  1. 01

    What counts as churn, when is the prediction made, and what action follows?

  2. 02

    Which features are available at that time?

  3. 03

    Which metric and threshold fit intervention capacity and error costs?

  4. 04

    Where does the selected model fail?

PROJECT ROADMAP

Move through the case study in a practical sequence

  1. 01

    Step 01

    Frame the decision

    Write the target, row grain, scoring time, horizon, capacity, costs, and primary metric.

  2. 02

    Step 02

    Audit and explore

    Inspect schema, target balance, missingness, distributions, identifiers, leakage risks, and useful relationships.

  3. 03

    Step 03

    Protect the test set

    Justify random or chronological splitting and keep final test data out of development.

  4. 04

    Step 04

    Establish baselines

    Compare a simple business baseline and logistic-regression baseline before complex models.

  5. 05

    Step 05

    Preprocess safely

    Use training-fitted Pipeline and ColumnTransformer decisions for numeric and categorical data.

  6. 06

    Step 06

    Engineer valid features

    Propose time-valid engagement, recency, and rate features and check availability.

  7. 07

    Step 07

    Compare models

    Compare a sensible subset with consistent cross-validation, metric, complexity, and interpretability notes.

  8. 08

    Step 08

    Tune and choose a threshold

    Tune only on development data, then choose an operating point aligned with outreach capacity.

  9. 09

    Step 09

    Final evaluation and errors

    Evaluate once on test data, inspect errors and subgroups, and compare with baseline.

  10. 10

    Step 10

    Reproduce and communicate

    Document seeds, features, configuration, raw-row inference flow, and stakeholder recommendation.

TASKS / MILESTONES

Concrete work to complete

  • Write a problem-framing note before modeling.
  • Produce a concise EDA and leakage audit.
  • Create a protected test set and development workflow.
  • Build baseline and pipeline-based candidate models.
  • Compare models with cross-validation and modest tuning.
  • Analyze probabilities, thresholds, confusion matrix, errors, and subgroups.
  • Write a README and retention memo with assumptions and limitations.

SUGGESTED VISUALIZATIONS

Visuals worth creating

  • Target balance and segment charts
  • Feature distributions and missingness summary
  • Model-comparison table
  • Precision-recall or threshold-capacity chart
  • Confusion matrix and subgroup error summary

DELIVERABLES

What the learner should produce

  • Problem-framing note
  • EDA and leakage audit
  • Reproducible preprocessing/model pipeline
  • Model comparison and threshold analysis
  • Final protected-test report
  • Error analysis
  • README and stakeholder retention memo

SUCCESS CRITERIA

What strong completion looks like

  • Prediction time and target are explicit.
  • No obvious leakage and a protected test set are maintained.
  • A baseline and fair model comparison are included.
  • Pipeline preprocessing is reproducible and training-fitted.
  • Metric and threshold reflect business action and capacity.
  • Final conclusions communicate evidence and limits rather than a headline score.

GUIDANCE

Support when you need a nudge

Reveal practical hints, checkpoints, and framing help without exposing a full finished solution.

Complete this project when the work is yours

Use this only after you have worked through the roadmap, milestones, and your own analysis.

KEY LEARNING OUTCOMES

Skills reinforced by this project

  • Frame and evaluate a complete tabular classification workflow.
  • Prevent leakage through valid splits and preprocessing.
  • Compare models, thresholds, and errors honestly.
  • Communicate a reproducible retention recommendation.

RELATED LESSONS

Revisit published lessons that support this build