Study interactive :: Progress tools open in the Study Hub reader.

Capstone: ML Engineer: Real-Time Risk Scoring System (GDPR-Safe)

Build a production-style ML system that scores events in real time (e.g., fraud/risk/churn propensity) and includes: data pipeline, training, evaluation, API serving, monitoring, and retraining triggers.

This blueprint is written to be safe for a public GitHub repo (no PII, no secrets, no datasets committed).


Why this is “industry-ready”

Companies don’t hire for “a model”, they hire for:


Target role


Deliverables (what your public repo should contain)


GDPR-safe data options (choose one)

Generate a dataset that mimics “transactions/events” without any real user data.

Example generator (small):

import random

def make_synthetic_events(n=20000, seed=42):
    random.seed(seed)
    events = []
    for _ in range(n):
        amount = round(random.expovariate(1/50), 2)
        hour = random.randint(0, 23)
        device_risk = random.choice([0, 1, 2])
        velocity_5m = random.randint(0, 10)
        # Simple rule for label (you’ll improve it later)
        risk = (amount > 200) + (device_risk == 2) + (velocity_5m >= 6) + (hour in [0,1,2,3])
        label = 1 if risk >= 2 else 0
        events.append(
            {
                "amount": amount,
                "hour": hour,
                "device_risk": device_risk,
                "velocity_5m": velocity_5m,
                "label": label,
            }
        )
    return events

Option B: Public anonymized dataset (download yourself)

Use a dataset where features are already anonymized. Do not commit it; only link to it in your README.


System architecture (minimal)

            (batch)                         (online)
Raw events --------> Feature pipeline -----> Scoring API (FastAPI)
   |                      |                     |
   |                      v                     v
   |                Train/Eval + Registry    Logs/Metrics
   |                      |                     |
   |                      v                     v
   +---------------> Model artifact (local)  Monitoring/Alerts (plan)

Milestones (step-by-step)

Milestone 1: Problem framing

Milestone 2: Baseline model

Milestone 3: Feature pipeline (reproducible)

Milestone 4: API serving

Milestone 5: Monitoring plan (what you would do in production)

Milestone 6: CI + tests


Public repo GDPR checklist (apply before publishing)


What to say in interviews (talking points)