Page 176 - Data Science Algorithms in a Week
P. 176

160                     Djordje Cica and Davorin Kramar

                       of crossover is to exploit the current solution to find better ones, then mutation forces GA
                       to explore new areas of the search space. There are some mutation techniques: flipping,
                       interchanging and reversing. The basic parameter of mutation operator is the mutation
                       probability which decide how often a string will be mutated. If mutation probability is
                       0%, no mutation occurs, elsewise if it is 100%, the whole chromosome will be changed.
                          Termination criteria. The GA moves through generation to generation until some of
                       the termination criteria is fulfilled. The GA stops when: specified number of generations
                       has been reached, specified duration of time is elapsed, defined level of fitness is reached,
                       the diversity of the population goes down below a specified level, and the solutions of the
                       population are not improved during generations.
                          The  evaluation  function.  The  task  of  the  evaluation  function  is  to  determine  the
                       fitness of each solution string generated during the search. The fitness of each individual
                       solution not only represent a quantitative measure of how well the solution solves the
                       original problem, but also corresponds to how close the chromosome is to the optimal
                       one. The function does not need to have any special analytical properties.
                          GA has been also used in training ANN recently in order to improve precision and
                       efficiency of the network. The performance of an ANN depends mainly on the weights of
                       its connections, therefore training a given ANN generally means to determine an optimal
                       set  of  connection  weights.  The  weight  learning  of  ANN  is  usually  formulated  as
                       minimization of some error functions, over the training data set, by iteratively adjusting
                       connection weights. In this way, the optimization problem is transformed into finding a
                       set of fittest weight for minimize objective function which is mean square error between
                       the target and actual output. In this chapter, GA is used to optimize the weights and bias
                       (weight values associated with individual nodes) of the ANN model. The steps involved
                       in process of ANN training using a GA are shown in Table 3.

                                      Table 3. General framework of GA for ANN training

                        (i) Determine a fitness function to measure the performance of an individual chromosome in
                         the problem domain and algorithm parameters. Initialize a random population of
                         chromosomes.
                        (ii) Decode each individual in the current population into a set of connection weights and
                         construct a corresponding ANN.
                        (iii) Simulate ANN using current population and evaluate the ANN by computing its mean
                         square error between actual and target outputs.
                        (iv) Calculate the fitness value of each chromosome in the population.
                        (v) Select a pair of chromosomes for mating from the current population on the basis of their
                         fitness.
                        (vi) Apply genetic operators crossover and mutation to create new population.
                        (vii) Calculate fitness of chromosomes for new population.
                        (viii) Repeat steps (iv) to (vii) until the solution converge.
                        (ix) Extract optimized weights.
   171   172   173   174   175   176   177   178   179   180   181