Back to all projects

Governed supervised learning

E-commerce Conversion ML

Focuses on responsible model selection: accuracy is reported alongside feature availability, calibration, uncertainty and drift diagnostics.

Static governance dashboard for the e-commerce conversion model.

Measured project results

public e-commerce sessions
12,330
deployment-safe ROC-AUC
0.7602
test bootstrap resamples
500
tests across model and API behavior
16

Metrics come from the committed reproducible run in the linked repository. Their interpretation and limits are documented below.

Architecture

System flow and reviewable outputs.

  1. 01

    Versioned UCI dataset

  2. 02

    Schema and split controls

  3. 03

    Pipeline model comparison

  4. 04

    Feature-availability ablation

  5. 05

    Calibration and cost policy

  6. 06

    Monitoring, API and dashboard

Reviewable artifacts

  • Model pipelines
  • Ablation study
  • Calibration
  • Drift monitoring
  • FastAPI
  • Docker
  • Tests and CI

Technology stack

  • Python
  • scikit-learn
  • FastAPI
  • Pydantic
  • Docker
  • Streamlit

Question

What the project investigates.

Estimate a session conversion probability without presenting a potentially end-of-session feature as safely available for early scoring. The result must also expose uncertainty, calibration and policy trade-offs.

Approach

Method, in order.

  1. 01

    Download the public dataset with a manifest and validate schema and ranges.

  2. 02

    Use a stratified 60/20/20 train-validation-test split and preprocessing inside pipelines.

  3. 03

    Compare prevalence, logistic and histogram gradient boosting baselines with cross-validated tuning.

  4. 04

    Run a PageValues ablation before defining the deployment-safe candidate.

  5. 05

    Calibrate on validation, define F1 and normalized-cost thresholds, then evaluate an untouched test with bootstrap intervals.

Evidence

Results with context.

  • The full-session benchmark reaches 0.9293 ROC-AUC, but the portfolio treats it as a performance ceiling rather than an early-scoring deployment candidate.
  • The deployment-safe model reaches 0.7602 ROC-AUC, 0.3513 average precision and 0.1163 Brier score on the untouched test.
  • The repository exposes PSI drift references, cohort stress checks and FastAPI contracts alongside the dashboard.

Quality controls

How the work can be reviewed.

  • Feature availability is treated as a modeling requirement, not a post-hoc caveat.
  • The serialized bundle records its numerical environment for compatibility review.
  • Pytest, Ruff and GitHub Actions cover pipelines, metrics, calibration, costs, drift and API endpoints.

Limits

What the output is not.

  • The UCI data provides month only, so it cannot support a true chronological holdout.
  • Cost units are a transparent analytical scenario, not observed company economics.
  • PSI signals distribution change but does not by itself prove a performance decline.