learntodriveai.dev/Machine Learning/Artifact Creation Pipeline: Churn Prediction Phase 2
Machine LearningProject 026 unitsVerified on 16 October 2026

Artifact Creation Pipeline: Churn Prediction Phase 2

Emeka OkaforHead of Customer Retention · Mobile virtual network operator · Lagos, Nigeria
Email · from Emeka
But I've been looking at the results and I have some concerns. … First, the model seems to miss a lot of the prepaid customers who churn. It catches the postpaid ones pretty well but the prepaid ones slip through.
Chat with Emeka

What you hand back

  • A requirements document with success criteria
  • An evaluation plan with per-segment metrics
  • Documented preprocessing decisions
  • Tracked MLflow experiments against a baseline
  • A churn prediction API ranked by risk
  • Board-facing evaluation results in plain language

6 units

  1. Unit 1: The Brief and the Plan

    Read Emeka's email, ask him about prepaid behavior and the board, profile the new data, and write the PRD.

    Open unit 1
  2. Unit 2: Evaluation Design

    Choose primary and secondary metrics, design per-segment evaluation for prepaid and postpaid, and set baselines and success thresholds.

    Open unit 2
  3. Unit 3: Data Preparation

    Check the distributions before imputing, decide encoding for each categorical column, review the preprocessing, then split and document the choices.

    Open unit 3
  4. Unit 4: Training and Experiments

    Set up MLflow, train a logistic regression baseline, tune a RandomForest, and compare results per segment.

    Open unit 4
  5. Unit 5: Serving and Documentation

    Check the results against the PRD thresholds, serve the model through an API, and write the board document.

    Open unit 5
  6. Unit 6: Project Close

    Confirm every artifact exists, write the README, make the final commit, and reflect on the order of the pipeline.

    Open unit 6
Read the full brief

You're building the next version of a churn prediction system for the same Lagos-based mobile operator -- this time with a prepaid segment the first model missed and documentation the board can review.

The discipline skills: writing a PRD, designing evaluation criteria before training, choosing metrics that match the business problem, handling class imbalance with encoding and imputation decisions you justify, tracking experiments in MLflow, and evaluating per segment.

The AI-direction lesson: last time, every decision was made for you -- the algorithm, the metric, the threshold. This time you make the decisions, and AI will make them too if you don't. AI defaults to accuracy on imbalanced data even when you know better. It applies LabelEncoder to nominal categories, imposing a false ordinal relationship. It jumps to complex models without establishing a baseline. The new skill is checking AI's choices, not just its code. Self-review enters here: asking AI to "list every transformation applied before the split" produces findings. Asking "does this look right?" produces reassurance.

Your Role

You run the full artifact creation pipeline: requirements document, evaluation design, preprocessing with documented decisions, experiment tracking in MLflow, per-segment evaluation, serving, and board-facing documentation.

You still direct Claude Code through the implementation. What changes is that the decisions are yours. P1 told you which metric to use and what threshold to hit. This time you decide.

What's New

Last time everything was provided: the algorithm, the evaluation criteria, the preprocessing instructions. You directed AI through a defined plan.

This time you make the plan. You choose the metrics. You decide how to handle encoding and imputation based on what the data looks like. You write the PRD. You design the evaluation before training starts.

The hard part is not the model. It's the decisions that come before the model — and being able to explain why you made them.

Tools

  • Python / pandas — data loading, profiling, preprocessing
  • scikit-learn — preprocessing, training, evaluation
  • MLflow — experiment tracking (first systematic use)
  • Jupyter — notebook workflow
  • FastAPI / uvicorn — model serving
  • Claude Code — AI direction
  • Git / GitHub — version control
  • curl — API testing

Materials

You receive:

  • Emeka's follow-up email describing the prepaid gap and board needs
  • An updated subscriber dataset (same format, three more months)
  • A data dictionary for the updated dataset
  • A PRD template to structure your requirements document
  • A ticket breakdown for the full project
  • A project governance file (CLAUDE.md)

The brief and tickets give you structure. The metrics, preprocessing choices, and evaluation design are yours.

Materials · 6 files
Start Project 2

You work at a computer with a terminal. Signed in, your place is saved.