Project October 2020
Mobile Battery Drain Prediction
My thesis: an Android data collection app and machine learning pipeline for analyzing and predicting phone battery drain.
Project details
For my thesis, I built BatteryApp, an Android app that records device usage and battery readings at regular intervals. I then used the collected data to study usage patterns and predict energy drain.
Analysis pipeline
- Collect and prepare data: BatteryApp records device and battery measurements for each sample.
- Group similar usage: Hierarchical clustering identifies patterns without requiring a fixed number of groups in advance. The groups are then assessed for how much useful information they contain.
- Predict energy drain: I trained separate models for the selected groups: linear regression, Ridge, Lasso, and eXtreme Gradient Boosting (XGBoost).
The diagram above shows the flow from data collection to clustering and prediction. The thesis PDF contains the full methodology and results in Greek.
What BatteryApp records
- Battery: Level, remaining capacity, temperature, voltage, technology, charging status, and health.
- Device activity: CPU use, available RAM, screen brightness, and whether the screen is on.
- Connectivity: Whether Wi-Fi, mobile data, Bluetooth, hotspot, and GPS are enabled. GPS location is not recorded.
- Sample context: Sampling time, sampling frequency, device model, and Android version.
Samples are associated with a unique user ID rather than a name. The repository documents the recorded variables in more detail.