Information Technology Reference
In-Depth Information
network has three layers: input layer (
I
), hidden layer (
H
) and output layer (
O
). Among
them
I
i
is the output of
ith
node at input layer,
H
j
is the output of
jth
node at hidden layer,
O
k
is the output of
kth
node at output layer.
WIH
ij
is the weight between the
ith
node of
input layer and the
jth
node of hidden layer,
WHO
jk
is the weight between the
jth
node
of hidden layer and the
kth
node of output layer,
h
j
is the threshold value of
jth
node at
hidden layer,
O
k
is the threshold value of
kth
node at output layer. Where
1
≤≤
i
1 0
1
≤≤
≤≤
.
The structure of BP neural network is shown in the
Figure 2
.
8
1
3
Fig. 2.
BP neural network
4 Optimizing the BP Neural Network by Genetic Algorithm
4.1 Optimization
1. Parameters initialization. Setting some parameters: initial population
G
is 30,
maximum genetic algebra
T
is 100, crossover rate
P
crossover
is 0.6, mutation rate
P
mutation
is 0.09. The fitness function
f
i
is realized by the software MATLAB.
2. Coding and generating initial population. We code any weight and threshold value
with real. Then construct a code chain. Every chain is a collection of weight and
threshold value in the BP neural network. Finally an initial population which contains
30 individuals is generated randomly.
3. Computing the Adapter value of every individual according to the fitness
function. Judging whether it meets the requirements or not. If not, conducting the
genetic operation and comes out the new individuals. Then we compute the sun of error
squares of the artificial neural network. If the result does not reach the expectation,
where the expectation value
ε
GA
is 5.0, the genetic operation went on. If it satisfies
certain condition within 100 times operation, we will finally get the optimal solution.
4. Decomposing the optimal solution into the weight and threshold value of BP neural
network.
The flowchart of genetic algorithm is shown in Figure 3.
We use genetic algorithm to optimize neural network weight and threshold value.
Then conduct the neural network learning with
BP
algorithm. The software MATLAB
is used for programming in the design. After 2571 times training, the neural network
will reach the expected precision, where expected precision
ε
BP
is 0.005.
Search WWH ::
Custom Search