Short-Term Power Load Forecasting Based on SAPSO-CNN-LSTM Model considering Autocorrelated Errors
Algorithm 1
The SAPSO-CNN-LSTM.
(1)
Perform data preprocessing, fill in vacancies, and remove outliers.
(2)
Define fitness fit as the mean absolute error of network prediction, as in
ā
where is the observed value and is the predicted value.
(3)
Initialize the particle swarm.
(4)
Construct multiple CNN-LSTM networks with the location information of particles as the hyperparameters of the network.
(5)
Train all networks to obtain the fitness of each particle, find the personal best and global best, and record their position information.
(6)
Perform simulated annealing and select the personal best with the largest jump probability to replace the global best. The jump probability of each personal best is shown in (9) and (10).
(7)
Update the velocity and position of particles with adaptive inertia weights.
(8)
Decrease the annealing temperature and increase the number of iterations by one.
(9)
Judge whether the maximum number of iterations is reached. If the maximum number of iterations is reached, the optimization ends, and the process goes to step (10); otherwise, it returns to step (4).
(10)
Find the personal best with the smallest fitness and use its location information as a hyperparameter to retrain the network.