Presentation is loading. Please wait.

Presentation is loading. Please wait.

Neuro-Computing Lecture 6

Similar presentations


Presentation on theme: "Neuro-Computing Lecture 6"— Presentation transcript:

1 Neuro-Computing Lecture 6
Genetic Algorithm

2 Suggested Reading Konar,A.A., ” Computational Intelligence Principles, Techniques and Applications”, Springer, [Chapter 12] Metaheristic Procedures for Training Neural Networks, Springer, 2006:Ch 6 Introduction to Genetic Algorithms, S.N. Sivanandam and S.N. Deepa, Springer, 2008 : Ch 2,3,4,6,8

3 The Genetic Algorithm Directed search algorithms based on the mechanics of biological evolution Developed by John Holland, University of Michigan (1970’s) Provide efficient, effective techniques for optimization and Machine Learning applications

4 The Genetic Algorithm (cont.)
Problem Solving by Search Global Search Heuristic Among Meta-heuristic algorithms To find: Genetic Representation (Problem Dependent) A Fitness Function (Problem Dependent) Applications in bioinformatics, computer science, engineering, economics, chemistry, mathematics, etc.

5 Search Techniques Categorization

6 Components of a GA A complex problem to solve and:
Encoding technique (gene, chromosome) Initialization procedure (creation) Evaluation function (environment) Selection of parents (reproduction) Genetic operators (mutation, recombination) Parameter settings (practice and art)

7 Simple GA Pseudo-Code Initialize Population;
{ Initialize Population; Evaluate each Individual in Population; While (!Termination_Criteria_Satisfied) Select Parents for Reproduction; Perform Recombination and Mutation; Evaluate Population; }

8 GA Evolution Accuracy in Percent Generations 100 50 10
Example of monitoring/diagnostic 10 Generations

9 Genetic Algorithm Learning
Fitness criteria Example of diagnostic (2) Generations

10 Schematic Convergence
Fitness value (scaled) GA variability across replications should be noted! iteration

11 The GA Cycle of Reproduction
children reproduction modification modified children parents population evaluation evaluated children deleted members discard

12 Population/Selection (1)
Chromosomes could be: Bit strings ( ) Real numbers ( ) Permutations of element (E11 E3 E7 ... E1 E15) Lists of rules (R1 R2 R3 ... R22 R23) Program elements (genetic programming) Weights of NNs!! (Metaheuristic NN Training) Etc.

13 Population/Selection (2): Holland’s Roulette Selection
Individuals are selected with the probability proportional to their relative fitness

14 ©

15 Population/Selection (3): Elitist Strategy
Individuals with the highest fitness is always copied into the next generation. Unlike the generation gap technique, the individual in the elitist strategy is not changed after each generation.

16 Reproduction children reproduction parents population Parents are selected at random with selection chances biased in relation to chromosome evaluations.

17 Chromosome Modification
Modifications are stochastically triggered Operator types are: Mutation Crossover (recombination) children modification modified children

18 Mutation: Local Modification
Before: ( ) After: ( ) Before: ( ) After: ( ) Causes movement in the search space (local or global) Restores lost information to the population

19 Crossover: Recombination
Definition: To combine two or more individuals to form new ones (main operator for local search) Recombination Operators on Binary Representation: Single-Point Crossover (SPX) Double-Point Crossover (DPX) Uniform Crossover (UX)

20 Initial Strings Offspring Single-Point Double-Point Uniform
Double-Point Uniform

21 Evaluation The evaluator decodes a chromosome and assigns it a fitness measure The evaluator is the only link between a classical GA and the problem it is solving modified children evaluated children evaluation

22 Deletion Generational GA: entire populations replaced with each iteration Steady-state GA: a few members replaced each generation population discarded members discard

23 An Abstract Example Distribution of Individuals in Generation 0
Distribution of Individuals in Generation N

24 A Simple Example The Traveling Salesman Problem:
Find a tour of a given set of cities so that each city is visited only once the total distance traveled is minimized

25 TSP

26 Representation Representation is an ordered list of city
numbers known as an order-based GA. 1) London 3) Dunedin ) Beijing 7) Tokyo 2) Venice ) Singapore 6) Phoenix 8) Victoria CityList1 ( ) CityList2 ( )

27 Crossover Crossover combines inversion and recombination:
* * Parent ( ) Parent ( ) Child ( ) This operator is called the Order1 crossover.

28 Mutation Mutation involves reordering of the list:
* * Before: ( ) After: ( ) Flips each bit in the string with the probability

29 TSP Example: 30 Cities

30 Solution i (Distance = 941)

31 Solution j(Distance = 800)

32 Solution k(Distance = 652)

33 Best Solution (Distance = 420)

34 Hybridization: GA-XX for Training NNs
Representation Pseudo Code

35 Hybridization: GA-XX for Training NNs (2)
Distribution of the variables Group together the input weights and biases for each unit (as a block) Weak Hybridization V.S. Strong Hybridization: Specific Operator versus combination of different algorithms XX : Replace the mutation operator with the XX algorithm (with probability pt)

36 Sample Hybridization Candidates
Back Propagation Levenberg-Marquardt

37 Common Fitness Functions

38 Benefits of Genetic Algorithms
Concept is easy to understand Modular, separate from application Supports multi-objective optimization Good for “noisy” environments Always an answer; answer gets better with time Inherently parallel; easily distributed

39 Benefits of Genetic Algorithms (cont.)
Many ways to speed up and improve a GA-based application as knowledge about problem domain is gained Easy to exploit previous or alternate solutions Flexible building blocks for hybrid applications

40 When to Use a GA Alternate solutions are too slow or overly complicated Need an exploratory tool to examine new approaches Problem is similar to one that has already been successfully solved by using a GA Want to hybridize with an existing solution

41 Some GA Application Types

42 Remarks for GA Practitioners
Choosing basic implementation issues: representation population size, mutation rate, ... selection, deletion policies crossover, mutation operators Termination Criteria Performance, scalability Solution is only as good as the evaluation function (often the hardest part)

43 Discussion (1) Global Optimum V.S. Local optimum : How to sacrifice short-term fitness to gain longer-term fitness? How to maintain diversity? We may impose a "niche penalty“ i.e. any group of individuals of sufficient similarity have a penalty added, which will reduce the representation of that group in subsequent generations, permitting other (less similar) individuals to be maintained in the population.

44 Discussion (2) How to operating on dynamic data ? genomes begin to converge early and may no longer be valid for later data. Increasing genetic diversity and preventing early convergence, either by increasing the probability of mutation when the solution quality drops (triggered hypermutation), or by occasionally introducing entirely new, randomly generated elements into the gene pool (random immigrants). Use "comma strategy" in which parents are not maintained and new parents are selected only from offspring.

45 Discussion (3) GAs cannot effectively solve problems in which the only fitness measure is right/wrong: no way to converge on the solution. (No hill to climb) In these cases, a random search may find a solution as quickly as a GA! As all ML problems it is worth tuning the parameters such as mutation probability, recombination probability and population size to find reasonable settings for the problem class. A very small mutation rate may lead to genetic drift. A recombination rate that is too high may lead to premature convergence of the genetic algorithm. A mutation rate that is too high may lead to loss of good solutions unless there is elitist selection. There are theoretical but not yet practical upper and lower bounds for these parameters that can help guide selection.


Download ppt "Neuro-Computing Lecture 6"

Similar presentations


Ads by Google