YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Smart Meter Anomaly Detector
Anomaly detection on smart meter (energy consumption) data. Flags unusual consumption patterns using an autoencoder or a classical method (e.g. Isolation Forest). Optional minimal Gradio dashboard for uploading series and viewing scores.
Overview
Designed for utilities or building management: input a time series of consumption readings; output anomaly scores or binary labels. Useful for fraud detection, fault detection, or demand response analysis.
Model
- Autoencoder (PyTorch): reconstructs a window of consumption; high reconstruction error indicates anomaly. Model in
model.py, training intrain.py, inference ininference.py; checkpoint./checkpoints/anomaly_ae.pt. Optional Gradio app inapp.py.
Usage
Training:
pip install -r requirements.txt
python train.py
Demo:
python app.py
Upload a CSV with a consumption column or use synthetic data; the app shows anomaly score or label.
Data
- CSV with a
consumptionorvaluecolumn (and optional timestamp). Training uses normal data; evaluation can include labeled anomalies.
Limitations / future work
- Threshold for "anomaly" is data-dependent; may need tuning per deployment.
- Could add explanation (which time steps contribute most to the score).
Author
Alireza Aminzadeh
- Email: alireza.aminzadeh@hotmail.com
- Hugging Face: syeedalireza
- LinkedIn: alirezaaminzadeh
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support