Description
Build a complete, responsible machine-learning classification workflow with Python and scikit-learn.
This hands-on practical guides you from defining a prediction task through model comparison, holdout evaluation, threshold selection, subgroup checks, and evidence-aware reporting. You will work with cleaned synthetic service-delivery data and compare a prevalence-only baseline, logistic regression, and a shallow decision tree.
What you will learn
- Distinguish prediction from explanation and causal inference.
- Define targets, features, observation units, and prediction moments.
- Identify identifier, proxy, temporal, and preprocessing leakage.
- Create reproducible stratified training and test sets.
- Build mixed-type preprocessing with scikit-learn pipelines.
- Compare models using cross-validation and an untouched holdout set.
- Interpret accuracy, precision, recall, F1, ROC AUC, confusion matrices, predicted probabilities, and decision thresholds.
- Check subgroup performance and communicate responsible-use boundaries.
What you will produce
- A feature and leakage review.
- Cross-validation and holdout performance tables.
- Confusion-matrix, ROC, precision-recall, and threshold figures.
- A subgroup performance table and coefficient table.
- A saved end-to-end model pipeline.
- A model card, decision log, and portfolio-ready project statement.
Tools: Python, pandas, NumPy, scikit-learn, Matplotlib, seaborn, joblib, and Quarto.
Important: This practical is for education, portfolio evidence, and local technical testing. Its synthetic data and demonstration outputs are not validated for operational, clinical, or other real-world decisions affecting people.




