Research Article

Monthly Electricity Consumption Forecasting Method Based on X12 and STL Decomposition Model in an Integrated Energy System

Algorithm 1

BP neural network procedure.
Input: Training set ; learning rate
Output: Multilayer Feedforward Neural Network Connecting Weights or Thresholds
(1)function
(2)  Randomly initialize all connection weights and thresholds in the network within the range of (0, 1)
(3)  repeat
(4)   for all do
(5)    Calculate the current sample output
(6)    Calculate the gradient of the output neuron
(7)    Calculate the gradient of the hidden layer neuron
(8)    Update the weights
(9)    Update the threshold
(10)   end for
(11)  until the stop conditions are achieved
(12)end function