Research Article

Research on Home Electricity Prediction Based on LSTM

Yiwen Chen*
Hangzhou Normal University, Zhejiang, China

* Corresponding author: [email protected]

Abstract

This article proposes a deep learning model based on Long Short Term Memory (LSTM) network for multivariate time series prediction of household electricity consumption. The study is based on a household electricity dataset that includes global active power, voltage, current, and sub meter readings. Missing values are processed through mean interpolation, and time series continuity is optimized through hourly granularity resampling. Normalize 7 power features using MinMaxScaler, construct a sliding window supervised learning structure, and use historical time step features as input to predict the global active power (Global'active_power) at the current time step. The model adopts a single-layer LSTM unit (100 neurons) combined with Dropout regularization (ratio 0.1) to prevent overfitting, and is trained with mean square error (MSE) as the loss function and Adam as the optimizer. The experiment used the first 4000 hours of data as the training set and subsequent data as the testing set. After 100 rounds of training, the model achieved a prediction accuracy of RMSE [insert specific value] on the testing set. The visual comparison shows that the predicted values are highly consistent with the actual values in the first 500 hours. The results indicate that LSTM networks can effectively capture the complex temporal patterns of household electricity consumption, providing a reliable technical path for load forecasting and energy management in smart grids. This study further revealed the periodic patterns of electricity consumption through multi-scale data resampling (monthly, daily, hourly), providing data support for the interpretability of the model.

Keywords: Long Short Term Memory Network (LSTM); Multi Variable Time Series; Power Load Forecasting; Sliding Window Mean Interpolation; Lightweight Model Architecture
Published: June 9, 2025
DOI: 10.54254/2755-2721/2025.TJ23583
Volume: ACE Vol.160
pp. 155-161
Download PDF

References

  1. Albogamy F R, Paracha M Y I, Hafeez G, et al. Real-time scheduling for optimal energy optimization in smart grid integrated with renewable energy sources[J]. IEEE Access, 2022, 10: 35498-35520.
  2. Sapankevych N I, Sankar R. Time series prediction using support vector machines: a survey[J]. IEEE computational intelligence magazine, 2009, 4(2): 24-38.
  3. Liang Y, Gao Z, Gao J, et al. A new method for multivariable nonlinear coupling relations analysis in complex electromechanical system[J]. Applied soft computing, 2020, 94: 106457.
  4. Jakkula V. Tutorial on support vector machine (svm)[J]. School of EECS, Washington State University, 2006, 37(2.5): 3.
  5. Rigatti S J. Random forest[J]. Journal of Insurance Medicine, 2017, 47(1): 31-39.
  6. LeCun Y, Bengio Y, Hinton G. Deep learning[J]. nature, 2015, 521(7553): 436-444.
  7. Hochreiter S, Schmidhuber J. Long short-term memory[J]. Neural computation, 1997, 9(8): 1735-1780.
  8. Almeshaiei E, Soltan H. A methodology for electric power load forecasting[J]. Alexandria Engineering Journal, 2011, 50(2): 137-144.
  9. Gu A, Gulcehre C, Paine T, et al. Improving the gating mechanism of recurrent neural networks[C]//International conference on machine learning. PMLR, 2020: 3800-3809.
  10. Lemley J, Bazrafkan S, Corcoran P. Smart augmentation learning an optimal data augmentation strategy[J]. Ieee Access, 2017, 5: 5858-5869.
  11. Donders A R T, Van Der Heijden G J M G, Stijnen T, et al. A gentle introduction to imputation of missing values[J]. Journal of clinical epidemiology, 2006, 59(10): 1087-1091.
  12. Zhang Z, Qi P, Wang W. Dynamic malware analysis with feature engineering and feature learning[C]//Proceedings of the AAAI conference on artificial intelligence. 2020, 34(01): 1210-1217.
  13. Zhang Z, Qi P, Wang W. Dynamic malware analysis with feature engineering and feature learning[C]//Proceedings of the AAAI conference on artificial intelligence. 2020, 34(01): 1210-1217.
  14. Yu H F, Rao N, Dhillon I S. Temporal regularized matrix factorization for high-dimensional time series prediction[J]. Advances in neural information processing systems, 2016, 29.
  15. Wager S, Wang S, Liang P S. Dropout training as adaptive regularization[J]. Advances in neural information processing systems, 2013, 26.