Appliances Energy Prediction
Comparing regression models for smart-home energy consumption
- Role
- Data science
- Period
- 2025
- Status
- Open source
- Links
- GitHub ↗
By the numbers
19,73519,735 - sensor rows
- 0.76
- R² (LightGBM)
44 - models compared
Overview
Predicting appliance energy use from 19,735 ten-minute readings in the UCI dataset. Random Forest, XGBoost, LightGBM and linear regression were compared; LightGBM led with R² ≈ 0.76.
- The right-skewed target was log-transformed; hour, weekday and weekend features were derived.
- SelectKBest, RFE and PCA compared: SelectKBest gave a small gain, PCA hurt on this problem.
01
Problem
Appliance energy use is right-skewed with a few high peaks; indoor temperature/humidity sensors correlate strongly with outdoor weather. The goal was to predict ten-minute consumption and see which model family suits this structure.
02
Approach
Exploratory analysis on the 34-column dataset (time series, correlation heatmap, hourly box plots), log transform and time features. Linear regression as baseline; Random Forest, XGBoost and LightGBM trained with hyperparameter search. Evaluated on RMSE and R².
03
Architecture
- Data
- UCI veri seti
- 19.735 × 34
- Preparation
- Log dönüşümü
- Zaman öznitelikleri
- SelectKBest
- Models
- Linear
- Random Forest
- XGBoost
- LightGBM
04
Key decisions
- 01
Model the target on a log scale
Peaks dominated RMSE. The log transform balanced the distribution and let tree models learn the low-consumption regime too.
Outcome
LightGBM gave the best result with R² ≈ 0.76 and RMSE ≈ 0.217 on the log scale. SelectKBest feature selection lowered RMSE from 0.2138 to 0.2122; PCA raised it to 0.36, showing it is unsuitable for this problem.
Related projects
- AI / MLOpen source
Traffic Accident Severity Prediction
Route-risk prediction trained on 100,000+ accident records
Route-risk prediction trained on 100,000+ historical accident records, issuing real-time alerts at 85%+ accuracy using OpenRouteService and weather APIs.
- 100K+
- accident records
- 85%+
- accuracy
- Python
- Scikit-Learn
- XGBoost
- Pandas
- Flask
- React
Open - AI / MLOpen source
Mobile Price Classification
Classifying phone price tiers from hardware specifications
A classification study predicting a phone's price tier from hardware specs such as RAM, battery, screen and camera; includes a data-collection script, Jupyter analysis and a containerized prediction service.
- Python
- Pandas
- Scikit-Learn
- Jupyter
- Docker
Open
AI / MLLiveChefsStack
Recipe platform with a vector-based recommendation engine
A recipe and recommendation platform where suggestions come from vector similarity instead of hand-written rules, and user interactions flow through Kafka and Redis into personalized feeds.
- <50ms
- similarity query
- 1.000+
- interaction events processed
- Python
- FastAPI
- PostgreSQL
- pgvector
- Redis
- Kafka
Open