homeprojectsblogcredentialsusesaboutcontact
projects/ntl-detection
PythonFastAPIScikit-LearnMLflowSupabasePlotly.js

TPDDL Non-Technical Loss (NTL) Detection Portal

Production-grade FastAPI & AI Command Portal for Tata Power DDL that transforms raw smart meter signals into a probability-ranked enforcement hit-list for targeted electricity theft raids.

Live demo ↗GitHub ↗
Precision: 73.4%Recall: 97.2%PR-AUC: 0.9696Threshold: 0.6725
Live Repository Metrics:
1 stars0 forks👁 1 watchers
Audit Precision
73.4%
Theft Recall Rate
97.2%
PR-AUC Score
96.96%
Audit Precision Floor
65%
Python60.4%JavaScript15.7%HTML14.4%CSS9.5%
73.4%Test Precision> 65% business floor
97.2%Test Recallnear-complete coverage
0.9696PR-AUC Scoreprecision-recall curve
0.6725Optimal Thresholdcalibrated cutoff

Non-Technical Losses (NTL) - electricity theft, meter tampering, and billing fraud - represent major operational costs for Tata Power DDL. Manual field inspections are expensive (₹1,500–₹5,000 per raid) and inefficient when unguided. Unranked suspect lists and high false-positive raids ('dry rolls') waste significant resources.

Built a production-grade FastAPI & ML Command Portal powered by scikit-learn (Logistic Regression L2) with skops safe serialization. Precision-first threshold calibration (0.6725) was performed against physical field audit ground truth to satisfy a 65%+ operational audit precision floor. The portal delivers a real-time, probability-ranked enforcement hit-list with High/Medium/Low risk tiers, interactive Plotly.js charts, and Supabase Cloud DB audit logging.

PythonFastAPIScikit-LearnMLflowSupabasePlotly.jsSkopsJoblibUvicornHTML/CSSRender
  • 73.4% Audit Test Precision - comfortably exceeding the 65% operational floor for field raids
  • 97.2% Test Recall - delivering near-complete coverage of real electricity theft cases
  • 0.9696 PR-AUC score evaluated against physical field audit ground truth
  • Calibrated optimal decision threshold (0.6725) to minimize high-cost false positive raids
  • Automated cloud audit logging via Supabase DB for all user authentications and inference events
  • Single Page Application (SPA) command portal with interactive evaluation charts & risk-tiered hit-lists
  • 01Threshold calibration against physical field audit ground truth drastically outperforms raw noisy recorded labels
  • 02Enforcing a strict operational precision floor (65%) directly optimizes ROI by eliminating wasteful 'dry roll' raids
  • 03Skops serialization enables safe model loading in production Python APIs without pickle vulnerability risks
  • 04Supabase DB with local SQLite fallback ensures continuous audit logging resilience
← Back to projects