Cluster-Aware Machine Learning for Heterogeneous Power Forecasting in a Smart Campus
Abstract
Forecasting power consumption is essential for intelligent power management in IoT-enabled smart environments, where heterogeneous behaviors appear from diverse building usages. University campuses are considered environments that share similarities with smart cities, making them suitable for power dynamics analysis. We build upon an IoT-based Advanced Metering Infrastructure (AMI) we deployed at our Engineering School’s Campus (INPT, Morocco), and an optimized XGBoost pipeline enhanced via Genetic Algorithms. Limited modeling granularity is addressed in heterogeneous consumption patterns. We propose and justify a cluster-aware approach partitioning data (D) into K regimes such that D=⋃c=1KCc. Each cluster is treated as a homogeneous behavioral profile and modeled using a GA-XGBoost model, enabling an intermediate granularity between global and meter-level learning. Experiments on real-world campus AMI data show that our proposed GA-XGBoost model consistently outperforms SVR and LSTM baselines across all clusters. In addition, cluster-specific models further improve performance compared to a single GA-XGBoost model trained without clustering, achieving a 48.42% improvement in MASE. Overall, beyond improving forecasting accuracy, cross-cluster generalization shows performance degradation and distributional shift when models are transferred across clusters, while residual diagnostics reveal differences in variance, temporal dependence, and non-Gaussianity.