How diyachuphal/electricity-theft-detector works
The product is a batch smart-meter anomaly detection pipeline with a Streamlit inspection dashboard. Its documented workflow transforms meter tables into daily features, scores meter-days with an Isolation Forest, and presents ranked flags and usage histories. Source confirms CSV inputs/outputs, model persistence, and dashboard reads; broader capabilities such as explainable reasons are represented by displayed feature values, not a separate explanation engine.
Main entry points: app.py Dashboard · train_model.py Train and score · feature_engineering.py Feature engineering
Components 13
Detection Pipeline
- Feature engineering
src/feature_engineering.py - Train and score
src/train_model.py - Isolation Forest
src/train_model.py
Inspection Dashboard
- Dashboard
app/app.py - Risk ranking
app/app.py - Usage drill-down
app/app.py - Feature values
app/app.py
Meter Data
- Meter CSV tables
- Daily features
- Saved model
- Flagged meter-days
Other components
- Pipeline operator
- Field inspector
Connections 13
- Pipeline operator → Feature engineering: runs
- Meter CSV tables → Feature engineering: reads
- Feature engineering → Daily features: writes
- Pipeline operator → Train and score: runs
- Daily features → Train and score: reads
- Train and score → Isolation Forest: fits and scores
- Train and score → Saved model: saves
- Train and score → Flagged meter-days: writes
- Field inspector → Dashboard: views
- Dashboard → Flagged meter-days: reads
- Dashboard → Risk ranking: summarizes
- Dashboard → Usage drill-down: drills down
- Dashboard → Feature values: displays