Machine Learning Fundamentals · Course lab · about 300 minutes · 6 tasks · marked out of 100, pass at 60

The dropout model, trained, evaluated honestly and deployed

The situation

An academy wants to know which students are likely to drop out. You will build the dataset (plausibly, with one leaky feature planted on purpose), train two models, evaluate them the honest way — held-out data, a baseline beaten or not, precision and recall argued — watch the leak inflate the score, then save the model, write the script that uses it, the monitoring plan, and the ethics check. This is the interview answer to "walk me through an ML project".

What you'll be able to show

  • Tell rules from ML, and spot the task that is neither
  • Build a dataset with documented handling of missing values and a planted leak
  • Evaluate on held-out data against a baseline, with precision/recall chosen for the business
  • Save, use, monitor and ethically check a model

What you need

  • Python with pandas and scikit-learn (or a notebook service)
  • A spreadsheet for the 60 invented rows
  • joblib for saving the model

Tasks

  1. 1Rule, ML, or trap
    Sort the five tasks from lesson 1 into rule vs ML with one line each, and name the trap (no examples exist or the pattern is not learnable).
    A correct result: Five verdicts and the trap named with a reason.
  2. 2The dataset, with a planted leak
    Build 60 plausible student rows: attendance genuinely correlating with completed/dropped labels, city one-hot encoded, one column with missing values handled and documented, and one deliberately LEAKY feature. Write the sentence explaining why the leak must be removed before training.
    A correct result: A 60-row file, the missing-value decision written down, and the leak identified with its sentence.
  3. 3Train two, read the tree
    Train a decision tree and a logistic regression on the clean features. Predict three invented new students. Plot the tree and read its rules aloud — do they make real-world sense? Rank features by logistic weights. Write one paragraph on which model you would hand the principal and why.
    A correct result: Two trained models, three predictions, the tree's rules assessed, the paragraph.
  4. 4Evaluate honestly
    Proper train/test split; both models scored on held-out data only; the majority-class baseline computed FIRST; precision and recall for the dropout class with one sentence choosing your trade-off and its business cost; the unlimited vs depth-3 tree comparison showing overfitting numerically.
    A correct result: A results table with baseline, both models, precision/recall, and the overfitting comparison.
  5. 5Let the leak in, then autopsy
    Re-add the leaky feature and re-run the evaluation. Watch the score soar. Write the one-line autopsy.
    A correct result: The inflated score next to the honest one, and the autopsy line.
  6. 6Ship, monitor, check
    joblib-save the chosen model. Write a 10-line script that loads it and prints the risk for a new student passed as input. Write the monitoring plan in three lines: what fresh data arrives when, what score triggers retraining, who is told. Then the ethics pass: one group your invented data might mistreat and the check you would run.
    A correct result: The saved model, the script working on one input, the three-line plan, and the ethics check.

What to hand in

The dataset file, the notebook or scripts, the results table, the autopsy line, the saved model with its loader script, the monitoring plan and the ethics check.

How it is marked

CriterionPoints
Rule/ML/trap sorted with reasons 10
Dataset built with documented missing-value handling and the leak identified 15
Two models trained, tree rules assessed, model choice argued 15
Honest evaluation: held-out, baseline first, precision/recall argued, overfitting shown 30
Leak demonstrated and autopsied 10
Model saved, loader works, monitoring plan and ethics check written 20
Total · pass at 60 100

Hand in your lab

Create a free BvLogic ID to hand in your lab, get it marked, and have it on your certificate.

Create your BvLogic ID

Already have one? Sign in and this course will be added to it.