learntodriveai.dev/Machine Learning/Pipelines, Transfer Learning, and Fairness
Machine LearningProject 065 unitsVerified on 16 October 2026

Pipelines, Transfer Learning, and Fairness

Priya KrishnamurthyDirector of Placement Operations · Healthcare staffing platform · Bangalore, India
Slack message · from Priya
I want a model that scores nurse-hospital matches so my team can work from a ranked list instead of spreadsheets. … I want to make sure this doesn't just automate our existing patterns.
Chat with Priya

What you hand back

  • A nurse-to-hospital match scoring model
  • Ranked match lists for each open position
  • A leak-proof preprocessing pipeline for mixed data
  • A baseline versus transfer model comparison
  • A regional fairness audit with before and after metrics
  • A plain-language client summary and README

5 units

  1. Unit 1: Priya's Matching Problem

    Read Priya's message, ask about her matching process, and profile the placement data for rating skew and missing text.

    Open unit 1
  2. Unit 2: Building the Pipeline

    Build a pipeline that treats numbers, categories and text separately, with feature selection kept inside cross-validation.

    Open unit 2
  3. Unit 3: Transfer Learning for Match Quality

    Adapt a pretrained language model with frozen base layers and compare it against the TF-IDF baseline.

    Open unit 3
  4. Unit 4: The Fairness Audit

    Break match scores down by region, find the Northeast India gap, try an intervention and report what changed.

    Open unit 4
  5. Unit 5: Delivering the System to Priya

    Write the client summary and README, walk Priya through the fairness trade-offs, and push the finished system to GitHub.

    Open unit 5
Read the full brief

You're building a nurse-to-hospital matching model for a staffing company in Bangalore -- scoring placement quality from a mix of structured fields and free-text descriptions, then auditing the model's predictions for fairness across demographic groups.

The discipline skills: constructing a scikit-learn Pipeline with ColumnTransformer for heterogeneous data (TF-IDF on text, preprocessing on tabular), adapting a pretrained language model through transfer learning with frozen base layers, conducting a fairness audit with disaggregated metrics, and choosing feature selection methods that respect the cross-validation boundary.

The AI-direction lesson: context curation becomes a deliberate skill. What you include in each AI session -- the full dataset schema or just the relevant columns, the complete evaluation plan or just the current metric -- shapes what AI produces. AI generates ColumnTransformers with misassigned columns when context is cluttered. It fine-tunes all layers with a uniform learning rate when it should freeze the base. It performs feature selection on the full dataset before cross-validation, creating a subtle form of leakage that Pipelines should prevent. And it computes overall accuracy without disaggregating by subgroup, hiding the fact that a model with 92% overall accuracy can fail 40% of the time for a specific group. The directing act is curating what AI sees so it produces what you need.

Your Role

You design what goes inside the Pipeline -- which columns get which treatment, which fairness intervention to apply, and how to communicate the trade-offs. Templates provide structure for the Pipeline construction and the fairness audit. You fill them with judgment.

What's New

Last time you took a working model and made it deliverable — Docker, scripted pipelines, prediction logging. The model itself was the starting point, not the challenge.

This time the model is the challenge. The placement data mixes structured columns with free-text descriptions, and they need different preprocessing. scikit-learn Pipelines make the wrong execution order impossible by design — a shift from catching leakage by hand (P4) to preventing it structurally. Transfer learning brings a pretrained model's existing knowledge to a task where training data alone is not enough. And the fairness audit surfaces something aggregate metrics hide: a model that works well overall can fail systematically for one group.

Tools

  • Python / pandas — data processing, Pipeline construction
  • scikit-learn — Pipelines, ColumnTransformer, feature selection, baseline models
  • Hugging Face Transformers — transfer learning (new)
  • PyTorch — training loop (familiar from P4)
  • MLflow — experiment tracking (familiar)
  • Jupyter — development
  • Claude Code — AI direction
  • Git / GitHub — version control

Materials

You receive:

  • The placement dataset — 2400 records with structured fields and free-text nurse bios and hospital notes
  • A Pipeline template showing ColumnTransformer structure with placeholder column groups
  • A fairness audit guide covering disaggregated evaluation, fairness metrics, and intervention options
  • A project governance file (CLAUDE.md)
Materials · 4 files
Start Project 6

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