100 beginner machine learning projects with runnable Python code, tests and honest case studies. By Networkers Home, Bangalore.
This project demonstrates a small, reproducible pipeline for lead scoring using synthetic enquiry histories. It trains a calibrated logistic regression baseline (probabilistic scores) and compares that ranking to a simple recency-based queue. The exercises show how to measure precision at staff capacity, whether groups defined by a sensitive attribute are covered by the top-ranked items, and whether a minimum service standard (recent enquiries) still receives attention even when model scores are low.
The data are synthetic but designed to mimic enquiry records: numeric features correlated with a binary follow-up outcome, a numeric recency field (days since enquiry) and a protected/sensitive attribute included in the generation so we can demonstrate exclusion from modelling and simple subgroup checks. This is a small stand-in dataset for teaching the pipeline; it is not production data.
Run the project script. The main entry is run(seed: int = 42) -> dict which returns numeric metrics. To run as a script: python project.py
Install requirements and run pytest. The test suite checks that the run() output contains expected keys, numeric ranges, a conservative performance floor on precision at capacity and deterministic results for the same seed.
Measured by running python project.py (seed 42) on 2026-10-23; the tests in test_project.py assert the floor.
| Metric | Value |
|---|---|
| auc | 0.8529 |
| brier | 0.1231 |
| precision_at_capacity | 0.5000 |
| precision_recency | 0.2600 |
| subgroup_coverage_ratio | 1.2500 |
| min_service_rate | 0.0870 |
This is a teaching exercise with synthetic data. The generation is intentionally simple and does not capture real enquiry semantics, temporal drift, selection bias from staff actions, or realistic opt-outs. The protected attribute is synthetic and shown only to illustrate how to exclude sensitive inputs and to compute simple subgroup coverage; no fairness mitigation is implemented. Calibration is a single technique demonstration and would need deeper validation in deployment.
Full case study, build steps and evaluation checks: Lead scoring model on networkershome.com
Built by Networkers Home · Learn the skills in the AI Engineer Course · Part of 100 AI projects with code