Level 1 project
Trustworthy ML: Compare Models Without Cheating
Start from the canonical project files, validate the result, and keep the evidence you need to explain what you built.
There is no upload or grading service. Run the documented validator or checks where applicable, keep the results, and score your own evidence against the rubric below. A passing check by itself does not mean the project is complete. Suggested strong-evidence target: 90/100. For p01, the listed test checks the unfinished starter, not a completed four-model project; see Validation below.
Start here
Launch lesson: Real-World Tabular ML: Pipelines and Model Review
Prerequisite project: Data Detective: Build and Explain a Tiny Predictor
Example only: Read a strong evidence report. Use your own numbers and observations in your submission.
Prerequisites
Python help for this project:
Complete Level 1 through L1.18 — Real-World Tabular ML: Pipelines and Model Review.
You should be able to use:
- train/test splits and training-only cross-validation;
- accuracy, precision, recall, and class-imbalance reasoning;
- pipelines and data-dependent preprocessing;
- leakage and overfitting checks;
- decision trees and depth;
- Random Forest bagging, feature randomness, and aggregation;
- gradient boosting as sequential error correction;
- reproducible experiment records.
This is a local Python Builder project. If repository roots, virtual environments, or package installation are new, read the Project Workbench before continuing.
Goal
Build a classification comparison that is fair, reproducible, and reviewable across several classical model families.
You will compare a trivial baseline with logistic regression, a decision tree, a Random Forest, and gradient boosting while keeping the information boundary, validation procedure, and final test conditions fixed.
The goal is not to choose a model because one headline metric is largest. The goal is to explain what the evidence supports and what tradeoffs remain.
Task
- Prediction contract
- state the target and prediction moment;
- list allowed features;
- explain why
certificate_issuedis forbidden.
- Fair evaluation and preprocessing
- preserve the fixed final test boundary;
- keep numeric/categorical imputation and one-hot encoding inside the fitted pipeline;
- use training-only validation for candidate comparison so preprocessing is refit inside each fold;
- do not choose among candidate families by repeatedly checking final-test results;
- keep the split and evaluation rules the same across models.
- Model-family comparison
- keep the majority baseline;
- compare logistic regression;
- compare a decision tree;
- compare a Random Forest;
- compare gradient boosting;
- explain at least one practical tradeoff among them.
- Metrics and imbalance reasoning
- report accuracy, precision, recall, and F1 as validation evidence;
- inspect class frequencies;
- state which error type matters more for your interpretation;
- write explicit selection criteria before opening learned-model final-test evidence;
- use more than one relevant signal or constraint when your stated decision costs require it;
- do not choose a model from one headline metric alone.
- Failure and overfitting analysis
- inspect training/validation behavior or another overfitting signal;
- include one intentional bad experiment, such as temporarily adding
certificate_issued; - explain why the suspicious improvement is invalid;
- restore the clean feature set.
- Reproducibility record
- data path/revision and target;
- split strategy and seed;
- preprocessing and fitting boundary;
- candidate settings for every compared family;
- validation procedure, metrics, and evidence;
- the selection policy written before final testing;
- selected candidate;
- baseline and selected-model final held-out metrics.
- Short model-review memo
- state a bounded recommendation for further testing;
- cite at least three pieces of evidence;
- name at least one limitation;
- explain why the selected model is preferable under your stated criteria rather than merely reporting that it has the largest score.
Validation
Run these commands from the downloaded Project folder or the public materials repository root.
python projects/tests/l01/test_project.pyStarter-only check: python projects/tests/l01/test_project.py expects only the initial logistic candidate, without a selected model or final-test report. It does not validate the finished project and may fail after you add the required four-family comparison and final evaluation. Run your completed experiment separately, record its reproducible output, and use the rubric to assess completion; do not treat this starter-test result as a completion grade.
Compare with a reference
First complete your own TODOs and run the submission validator above. Then open the published reference solution. Reference acceptance tests check the completed reference, not your submission:
python projects/tests/l01/test_reference.pyRubric
Project: Trustworthy ML: Compare Models Without Cheating Level: 1 Total: 100 points
This rubric maps to the expanded Level 1 exit skills: preserve information boundaries, compare major classical model families fairly, use imbalance-aware metrics, diagnose leakage/overfitting, and reproduce the full experiment.
| Criterion | Points | Observable evidence |
|---|---|---|
| Prediction contract and feature audit | 15 | Target and prediction moment are explicit; allowed features are justified; certificate_issued is rejected as future/target leakage. |
| Fair split and validation design | 20 | Final test set stays outside fitting/model selection; one training-only validation design is shared by candidates; selection criteria are written before learned-model final testing; split strategy and seed are recorded. |
| Model-family comparison and pipelines | 20 | Majority baseline plus logistic regression, decision tree, Random Forest, and gradient boosting are compared; numeric/categorical imputation, scaling, and one-hot encoding stay inside each fitted pipeline; tree/ensemble tradeoffs are explained. |
| Metrics and class-imbalance interpretation | 15 | Accuracy, precision, recall, and F1 are read as evidence; class frequency and error costs are discussed; selection criteria use the signals or constraints justified by those costs rather than one headline metric. |
| Leakage and overfitting debug path | 15 | An intentional bad experiment is isolated, diagnosed, and removed; train/validation behavior or another overfitting signal such as the recorded recall gap is inspected. |
| Reproducibility | 10 | Data source, target/features, split, seed, preprocessing boundary, candidate settings, validation method/metrics/evidence, selection policy, selected candidate, and final evidence are sufficient to repeat the result. |
| Communication and model-review decision | 5 | The conclusion cites evidence, names limitations, and explains the selection criteria instead of treating the largest single score as sufficient. |
Performance anchors
90–100 — Trustworthy and reproducible
The experiment boundary is clean, mixed-type preprocessing is refit inside the training boundary, all required model families are compared under the same training-only validation procedure, selection criteria are stated before learned-model final testing, and the conclusion explains metrics, tradeoffs, and limitations.
75–89 — Mostly trustworthy
Core workflow is correct, but one area is weak: family comparison, validation design, imbalance reasoning, failure analysis, or reproducibility. No final result depends on the leaky feature.
60–74 — Partial evidence
The learner can fit models and report scores, but model-family comparison or evaluation reasoning is incomplete. Examples include inconsistent splits, missing baseline, preprocessing outside the intended boundary, or choosing from one metric without discussing error costs.
Below 60 — Not yet trustworthy
The final comparison uses certificate_issued, repeatedly selects models on the final test set, changes evaluation conditions between candidates, or cannot be reproduced.
Required failure scenario
The submission must intentionally demonstrate one broken experiment and then fix it. The recommended scenario is to add certificate_issued temporarily and observe the suspiciously strong result. Full credit requires explaining why that feature would not exist at prediction time and confirming it is absent from the final clean model.
Scoring guidance
Do not demand byte-identical metrics or a particular winning family. Score the fairness of the information boundary, the recorded metrics, the model-family reasoning, the debugging, and the reproducibility of your evidence; if the evidence is thin, revise it before awarding full credit.
Self-check before you call it done
- Can you identify the prediction moment, allowed features, and why
certificate_issuedis unavailable then? - Can you show one fixed test split, training-only CV for all four learned families, and preprocessing fitted inside each pipeline?
- Can you point to baseline evidence, class balance, accuracy/precision/recall/F1, candidate settings, and a selection policy written before final testing?
- Can you reproduce one isolated leaky experiment, its diagnosis and removal, the selected model's final result, and a bounded recommendation?