International Core Journal of Engineering 2020-26 | Page 168
method. Data normalization refers to mapping data to
intervals of [0,1] or [-1,1] or smaller. The specific formula is
=
(
)
(3)
Where X jmax , X jmin are the maximum and minimum values
in the training sample X j .
B. Error Analysis
In order to evaluate the accuracy of the prediction model,
it is necessary to analyze the error. This paper mainly uses
two indicators, prediction error and percentage error.
Prediction error: error=test_simu-output_test;
Fig.4. fitness curve
Percentage error: (test_simu-output_test)./output_test;
C. Genetic algorithm function
The parameter initialization of the genetic algorithm
includes:
TABLE.Ⅰ. T HE PARAMETER INITIALIZATION
Number
of
iterations
maxgen=50
Group size
sizepop=10
Cross
probability
pcross= [0,4]
Mutation
probability
pmutation= [0,2]
The flow of the main function of the genetic algorithm is
shown in Figure 3.
Develop a neural network
topology
Fig.5. network predictive output
Calculate fitness Encoding the neural network weights and
thresholds to obtain the initial population
Select high-complexity
chromosomes for replication Decoding to get weights
and thresholds
cross Train the network with
training samples
variation Test the network with test
samples
New group Calculate error
Meet the
termination
conditions?
N
Fig.6. Network prediction error
Decode to get the best weight
and threshold
Fig.3. Algorithm flow
V. S IMULATION A ND E XPERIMENT
Using the algorithmic process above, predictive training
and simulation of the urban power load of a city on June 16,
2019. By assigning the optimized initial weights and
thresholds to the neural network, the trained output is taken
as an output, and the predicted output and prediction error
and prediction error percentages are as shown in the
following figure.
Fig.7. Network prediction error percentage
146