--- license: mit tags: - tabular-regression - tabular-classification - spatiotemporal - urban-mobility - traffic - onnx library_name: sklearn --- # MargaDrishti — Models Trained artefacts for **[MargaDrishti](https://github.com/adarshcod30/MargaDrishti)**, a spatio-temporal ML system over Bengaluru parking-violation and traffic-event data (Nov 2023 – Apr 2024). Live dashboard: **[adarshcod30/margadrishti](https://huggingface.co/spaces/adarshcod30/margadrishti)** ## Read this before using the numbers **These models rank predicted _enforcement demand_, not where illegal parking occurs.** `corr(log patrol_hours, log total_captures) = 0.96` across all 2,534 res-9 cells — about 93% of the variance in per-cell violation counts is explained by how much patrolling happened there. The project's own [enforcement-bias audit](https://github.com/adarshcod30/MargaDrishti/blob/main/reports/fairness_audit.md) returns **HIGH concern** on this system, and that is published rather than buried: no Getis-Ord hotspot in the data survives exposure adjustment. Two targets are **not** what a leaderboard row suggests: - **B3 (priority) is a recovered rule, not a prediction.** Corridor status predicts High priority at 99.84% (13 exceptions in 8,173 events). Scores near 1.0 reflect that rule. - **A3 (capture rejection) is not yet answerable.** The review process changed regime mid-window — February 2024 rejection jumped to 0.790 from ~0.28 while volume collapsed sixfold — so every family is miscalibrated. ## What's here | File | What it is | |---|---| | `onnx/b1_clearance_duration.onnx` | Event clearance duration (log1p minutes), RandomForest | | `onnx/b2_road_closure.onnx` | Road-closure probability, RandomForest | | `onnx/*.features.json` | **Exact input feature order** — ONNX takes a bare float array with no column names | | `leaderboard.csv` | Module A: every family × A1/A2/A3 | | `leaderboard_module_b.csv` | Module B: every family × B1–B4 | | `model_cards/` | One card per target, generated from the leaderboards | | `reports/` | Spatial statistics, CIS validation, enrichment ablation, fairness audit | ### Why RandomForest and not the leaderboard winner The browser ships RandomForest because **onnxmltools misroutes ~1% of LightGBM rows at split boundaries** — median divergence is float32 noise (4.3e-07) but 5 of 500 sample rows diverged by up to 0.09. skl2onnx converts RandomForest exactly (max 1.0e-06; the classifier is bit-exact). That trade is only defensible because the Module B leaderboard already put random_forest at 0.5034 against xgboost's 0.4990 — a gap far inside the ±0.13 fold standard deviation. Exact client/server agreement costs no measurable accuracy. ## Headline results | Target | Best family | Metric | vs strongest baseline | |---|---|---|---| | A1 · parking intensity | xgboost | 0.4999 Poisson deviance | **+43.0%** | | A2 · hotspot | random forest | 0.1365 PR-AUC | 46.9× base rate (0.291%) | | A3 · capture rejection | xgboost | 0.3088 PR-AUC | *not answerable* | | B1 · clearance duration | xgboost | 0.4990 ± 0.128 | +27.7% | | B2 · road closure | catboost | 0.3615 ± 0.071 PR-AUC | 4.1× (8.7% prevalence) | | B4 · cause from text | char n-gram + logreg | 0.478 macro-F1 | 10.8× | B4's notable result is equity rather than accuracy: **English 0.483 vs Kannada 0.472**, essentially no language gap on a field that mixes both scripts. ## Reproduce ```bash git clone https://github.com/adarshcod30/MargaDrishti cd MargaDrishti && make data && make reproduce ``` Seed 42. Splits are chronological, never random. ## Licence MIT. Source data are anonymised public releases and remain subject to their original terms.