Optimization Design based on BP Neural Network and GA Method

This study puts forward one kind optimization controlling solution method on complicated system. At first modeling using neural network then adopt the real data to structure the neural network model of pertinence, make the parameter to seek to the neural network model excellently by mixing GA finally, thus got intelligence to the complicated system to optimize and control. The method can identify network configuration and network training methods. By adopting the number coding and effectively reducing the network size and the network convergence time, increase the network training speed. The study provides this and optimizes relevant MATLAB procedure which controls the method, so long as adjust a little to the concrete problem, can believe this procedure well the optimization of the complicated system controls the problem in the reality of solving.


INTRODUCTION
BP neural network is a kind of multilayer feed forward neural networks.It is one of the broadest and maturest neural network models.But BP algorithm exists two main questions: multilayer perception algorithm is a non-linear optimization problem.As adopting traditional non-restraint minimum algorithm to realize error function minimize, exists the local minimum inevitably.Secondly, design of neural network mainly depends on designer's experience through repeated experiments in a big population space with no theoretical guide.So initial connection power and choice of network structure has very big randomness and it is difficult to select initial local point.And the possibility of getting the global optimum network is small (Goldberg, 1990).
GA is a robust self-adaptation optimum method based on biological evolution principle.GA select and crossover and variation through problem samples fitness function to initial group to guide and confirm searching direction.As organize and search adopting population way, it can find optimum solution in global solution space and it is fit for large-scale concurrent processing.The effect is superior to single GA or BP network to seeking global optimal solution combination of GA and BP network.But traditional GA exists slow convergence and long coding and large calculated amount using binary code.The study put forward an improved GA based on traditional GA through introducing real number code and selective inheritance and multipoint crossover and multipoint self-adaptation variation which proceeds self-adaptation dynamic modulation to BP neural network topological structure and network parameter in global solution space to get optimum new method.The study identifies the effective through tomato diseases diagnosis system (Fecit, 2003;Goldberg, 1989;Wang, 2002).
This study puts forward one kind optimization controlling solution method on complicated system.At first modeling using neural network then adopt the real data to structure the neural network model of pertinence, make the parameter to seek to the neural network model excellently by mixing GA finally, thus got intelligence to the complicated system to optimize and control.The method can identify network configuration and network training methods.By adopting the number coding and effectively reducing the network size and the network convergence time, increase the network training speed.The study provides this and optimizes relevant MATLAB procedure which controls the method, so long as adjust a little to the concrete problem, can believe this procedure well the optimization of the complicated system controls the problem in the reality of solving.

THE PROBLEM PROPOSE
As GA searching doesn't rely on gradient but solve function differentiably which only solve fitness function under restraint conditions.And GA has characteristic of global searching.GA optimize neural network connection weight and network structure may overcome BP neural network initial weight randomness and network structure to determine network vibration and local solution problem and may enhance generalization ability of neural network.So, look for the most suitable method of network connection weights and network structure to change BP algorithm to rely on gradient message to get the optimum allocation of network structure and initial connection weight and threshold value (Ng, 2002;Lin, 1992).
In this study, switch coefficient K is quoted to express connection relation of neural network code.And its value is 1or 0 which express the connection of two codes or not.Mathematical description of optimum problem of GA-neural network is: which is detection sample mean square error.It express estimation of network output data reliability E 2 is small which express the reliability of network output is big.Otherwise, the network output's reliability is low.
During the neural network application, for not knowing the approached samples characteristic accurately, even under network error is zero, it is not guaranteed that E 2 can achieve requirement.It can be occurred that E 1 is small while E 2 can't meet requirement which is so called "overfitting" phenomenon."overfitting" phenomenon influence generalization ability of network directly to make the network to lose value.So design of algorithm will make E 2 less than a given error ߝ to meet reliability of network output.
This study puts forward one kind optimization controlling solution method on complicated system.At first modeling using neural network then adopt the real data to structure the neural network model of pertinence, make the parameter to seek to the neural network model excellently by mixing GA finally, thus got intelligence to the complicated system to optimize and control.The method can identify network configuration and network training methods.By adopting the number coding and effectively reducing the network size and the network convergence time, increase the network training speed.The study provides this and optimizes relevant MATLAB procedure which controls the method, so long as adjust a little to the concrete problem, can believe this procedure well the optimization of the complicated system controls the problem in the reality of solving.

DESIGN OF ALGORITHM
The algorithm use EGA to initially determine basic solution space through BP network (value range of network connection weight and neuron weight).Through selecting to gene and crossover and variation, preferred evolution continually to sample until evolution K (total evolution time number is to be given initially) then select the biggest fitness of samples to determine structure and initial weight and threshold value of network.
Gene coding: Like genetic gene represent essential message of DNA, Gene code put problem parameter to be essential message.Intersymbol is made of two parts about switching coefficient code and weight coefficient code.The switching coefficient code indicates connection state of hidden layer neuron and inputoutput neuron.The switching coefficient code string length l 1 is determined by initial hidden layer neuron numbers and actual hidden layers neuron numbers are determined by numbers of 1 at switching coefficient.Weight coefficient codes indicate connection weight of network.Which adopt float code.The string length l 2 = m× l 1 + l 1 ×nl 2 (while m is input node number, n is output node number).Code is compounded a long string according to certain order which each string is corresponding to a group network structure and connection weight.

Determination of basic solution space:
Adopting three layers BP network to determine basic solution space initially (value range of network connection weight and neuron weight).At first, setting training time and training error ߝ ଵ of network, put into training sample to train and import testing sample to get error ߝ ଶ again.When error ߝ ଵ and ߝ ଶ are satisfied, notes the maximum and minimum of the connection weight as u max and u min , the basic solution space [u min +δ 1 , u max +δ 2 ](while, δ 1, 2 is regulating parameters) is conducted as the basic solution space of connection weight.

Initialize sample group:
The key is setting group scope that is gene coding combination number.Group scope is one of the main controlling parameters, the effect of GA is very large.The initial group is made of L entities.Each entity is made of two parts.The first part is 0-1 string that the string length is l 1 which expresses initial switch coefficient.The second part is l 2 uniform distribution random number which expresses initial weight coefficient of [u min +3/δ 1 , u max +δ 2 ].
Initialize gene coding group number that is initializing gene coding group.We first randomly generates gene entity then pick the best entity to add initial entity, this scope iterates continuously until initial group scopes can achieve the preestablished scope of network.

Fitness function computation:
At GA, the unique requirement to fitness function is to compute nonnegative result which may compare aiming at input.So adopting error function of network as fitness function and think big error entity as small fitness, that is: Compute each entity's fitness of group, get hidden node number of network from switch coefficient coding.And get connection weight of network from weight coefficient code and input training sample.According to formula (3) to compute each entity fitness.

Selection inherit of importing competition:
Objective of selecting inherit is to select excellent entity from current groups to make them have opportunities to produce entity of offspring as parent.The principle of judging entity excellent is its fitness.After computing fitness of each entity, select the big entity of fitness to inherit generation.So make the solution is more and more close the minimum solution space.The classic selection inherit is ensured by: where, n i = The multiple number of a i at (t+1) offspring f i = Fitness function value of a i ݂ = The sum of p's fitness function value But at the study, mortality on the selection inherit of classic is too low, especially when numbers of solution concentration is small, it is easy to shock.So for getting better inherit entity, rd is input that when inherit next generation, the worst numbers of fitness function are eliminated.Through the competition system, this problem can be solved preferably.The procedure of selection inheritance is showed: where,

Crossover operator and variation operator:
Crossover is to select randomly 2 entities from bigger probability groups and exchange some bits of these two entities.The purpose is to produce new gene combinations to restrict the loss of genetic material.Variation is to change as smaller probability to bit of some entities groups In binary system, "1"becomes "0" while "0" becomes"1".And in real number coding, produces a random number at (0, 9) on some entities' bit to replace bit of original entity.The purpose of variation is to protect some excellent gene of some low fitness entities and prevent convergent prematurely during searching optimum.
• Crossover to switch coefficient coding and variation manipulation: Crossover and variation to switch coefficient coding adopts single point crossover and uniform variation method.During crossover and variation computing, when some neuron was deleted, corresponding weight coefficient coding and threshold value coding are set 0, that the network connection are deleted while add some neuron, random initialized weight coefficient coding and neuron weight coding.As weight coefficient coding and neuron threshold value coding adopt floating coding, new crossover operator and variation operator will be designed.Proceed crossover to selected entity as probability p c .Assume proceed crossover between i and i+1entity, the crossover operator is as: is a pair of pre-crossover entity, ܺ ௧ାଵ , ܺ ାଵ ௧ାଵ is a pair of back crossover entity, c i is the uniform distribution random number on region [0,1].Proceed variation to entities after crossover as probability p m .Assume variation to i entities, the variation operator is ܺ ௧ାଵ , ܺ ௧ + ܿ .
While ܺ ௧ is the entity before variation, ܺ ାଵ is entity after variation.If variation point is on weight coefficient coding, c i is uniform distributed random number of [u min -δ 1 -ܺ ௧ , ‫ݑ‬ ௫ + ߜ ଶ + ܺ ௧ ] to guarantee entities in the searching space.
• Crossover and variation manipulation to weight coefficient coding and neuron threshold value coding: Crossover manipulation to weight coefficient coding and neuron threshold coding may adopt multipoint crossover genetic manipulation not conventional single crossover which may add genetic searching dispersibility to faster converge precision.The crossover point of multipoint crossover generates randomly according to given probability.The position of crossover point is too.
Variation manipulation to weight coefficient coding and neuron threshold coding adopt multipoint self-adaptation variation that make big fitness entity variation in small scope while make small fitness entity variation in big scope.Based on this consideration, conception of variation temperature was input.This conception is similar to temperature to SA algorithm.The variation temperature of solution is as follow: While, f(s) indicate entity s fitness, f max is the biggest fitness of undetermined problem.To many problems, f max is difficult to confirm.A rough upper limit is given.The biggest fitness value as f max of current groups to input variation temperature conception, this variation method may adopt.Select randomly an entity v k from entities v, entities v k after variation obey N(v k , δ 2 (T)) normal distribution.Generate new generation group Repeated 5-7 procedure, when proceed once, the group may evolve a generation.Generate continuously K generation(total generations) Code the highest fitness K to get corresponding network connection weight and hidden codes numbers and input measurement samples to detect model's generalization ability.

TOMATO COMMON DISEASE DIAGNOSE APPLICATION EXAMPLE AND ITS RESULT ANALYSIS
Selecting 7 disease characteristic parameter data (pass essential coding) to conduct neural network input, the output of network is conducted to disease of diagnose.Seven parameters is as network input: Solution of connection weight is set as [-12,16].Solution space is set initially of weight is set [-11,13], layer nodes number searching scope is 3-16, initial group of GA generation procedures L = 30, total generation number K = 100 ,crossover probability p c = 0.85, mortality r d = 0.15, the biggest fitness of current groups f max = 10, variation probability p m = 0.006.

CONCLUSION
The study adopts GA to proceed self-adaptation dynamic modulation to network topology structure and network parameter in global solution space to get the optimum design of network.This method overcome network oscillation as randomness of neural network initial weight and network structure deterministic process and local solution problem and can highlight neural network generalization ability.This method can avoid the difficulty depending on experience to determine network structure and put into use tomato common disease forecast and achieve better result.
Other charactersFour network output Y 1 , Y 2 , Y 3 , Y 4 are two-value output and its 16 output status represent 16 tomato common disease respectively (stalk rot, southern blight, septoria blight).When build BP neural network modeling based on GA, at first adopt three layers BP neural network to estimate basic solution space of network connection weight, input training samples and detection samples, according to procedure1 get: