An Introduction to Genetic Algorithm (GA) By: Dola Pathak For: STAT 992:Computational Statistics SPRING 2015 1.

Slides:



Advertisements
Similar presentations
Algorithm Design Techniques
Advertisements

Genetic Algorithms (Evolutionary Computing) Genetic Algorithms are used to try to “evolve” the solution to a problem Generate prototype solutions called.
CS6800 Advanced Theory of Computation
1 An Adaptive GA for Multi Objective Flexible Manufacturing Systems A. Younes, H. Ghenniwa, S. Areibi uoguelph.ca.
Biologically Inspired AI (mostly GAs). Some Examples of Biologically Inspired Computation Neural networks Evolutionary computation (e.g., genetic algorithms)
Institute of Intelligent Power Electronics – IPE Page1 Introduction to Basics of Genetic Algorithms Docent Xiao-Zhi Gao Department of Electrical Engineering.
Non-Linear Problems General approach. Non-linear Optimization Many objective functions, tend to be non-linear. Design problems for which the objective.
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
A new crossover technique in Genetic Programming Janet Clegg Intelligent Systems Group Electronics Department.
Introduction to Genetic Algorithms Yonatan Shichel.
1 Genetic Algorithms. CS The Traditional Approach Ask an expert Adapt existing designs Trial and error.
Artificial Intelligence Genetic Algorithms and Applications of Genetic Algorithms in Compilers Prasad A. Kulkarni.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Genetic Algorithms Nehaya Tayseer 1.Introduction What is a Genetic algorithm? A search technique used in computer science to find approximate solutions.
7/2/2015Intelligent Systems and Soft Computing1 Lecture 9 Evolutionary Computation: Genetic algorithms Introduction, or can evolution be intelligent? Introduction,
D Nagesh Kumar, IIScOptimization Methods: M1L4 1 Introduction and Basic Concepts Classical and Advanced Techniques for Optimization.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Image Registration of Very Large Images via Genetic Programming Sarit Chicotay Omid E. David Nathan S. Netanyahu CVPR ‘14 Workshop on Registration of Very.
Genetic Algorithms Overview Genetic Algorithms: a gentle introduction –What are GAs –How do they work/ Why? –Critical issues Use in Data Mining –GAs.
Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.
Genetic Algorithms: A Tutorial
Genetic Algorithm.
Evolutionary Intelligence
© Negnevitsky, Pearson Education, CSC 4510 – Machine Learning Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University.
Introduction to Genetic Algorithms and Evolutionary Computation
Cristian Urs and Ben Riveira. Introduction The article we chose focuses on improving the performance of Genetic Algorithms by: Use of predictive models.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Intro. ANN & Fuzzy Systems Lecture 36 GENETIC ALGORITHM (1)
Genetic algorithms Prof Kang Li
Warm-up Activity 1. How many frames are in a Pixar animated movie such as The Incredibles?
Boltzmann Machine (BM) (§6.4) Hopfield model + hidden nodes + simulated annealing BM Architecture –a set of visible nodes: nodes can be accessed from outside.
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
Applying Genetic Algorithm to the Knapsack Problem Qi Su ECE 539 Spring 2001 Course Project.
Genetic Algorithms K.Ganesh Reasearch Scholar, Ph.D., Industrial Management Division, Humanities and Social Sciences Department, Indian Institute of Technology.
Genetic Algorithms Introduction Advanced. Simple Genetic Algorithms: Introduction What is it? In a Nutshell References The Pseudo Code Illustrations Applications.
Genetic Algorithms Siddhartha K. Shakya School of Computing. The Robert Gordon University Aberdeen, UK
Optimal Placement of Wind Turbines Using Genetic Algorithms
© Negnevitsky, Pearson Education, Lecture 9 Evolutionary Computation: Genetic algorithms Introduction, or can evolution be intelligent? Introduction,
 Negnevitsky, Pearson Education, Lecture 9 Evolutionary Computation: Genetic algorithms n Introduction, or can evolution be intelligent? n Simulation.
Genetic Algorithms CSCI-2300 Introduction to Algorithms
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
Evolutionary Algorithms K. Ganesh Research Scholar, Ph.D., Industrial Management Division, Humanities and Social Sciences Department, Indian Institute.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
Genetic Algorithms. The Basic Genetic Algorithm 1.[Start] Generate random population of n chromosomes (suitable solutions for the problem) 2.[Fitness]
Neural Networks And Its Applications By Dr. Surya Chitra.
1 Contents 1. Basic Concepts 2. Algorithm 3. Practical considerations Genetic Algorithm (GA)
Genetic Algorithms. Underlying Concept  Charles Darwin outlined the principle of natural selection.  Natural Selection is the process by which evolution.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
1 Comparative Study of two Genetic Algorithms Based Task Allocation Models in Distributed Computing System Oğuzhan TAŞ 2005.
Advanced AI – Session 6 Genetic Algorithm By: H.Nematzadeh.
Genetic Algorithms. Solution Search in Problem Space.
EVOLUTIONARY SYSTEMS AND GENETIC ALGORITHMS NAME: AKSHITKUMAR PATEL STUDENT ID: GRAD POSITION PAPER.
Genetic Algorithms An Evolutionary Approach to Problem Solving.
Genetic Algorithm(GA)
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
Genetic (Evolutionary) Algorithms CEE 6410 David Rosenberg “Natural Selection or the Survival of the Fittest.” -- Charles Darwin.
Genetic Algorithm (Knapsack Problem)
Using GA’s to Solve Problems
Genetic Algorithms.
Introduction to Genetic Algorithm (GA)
Intelligent Systems and Soft Computing
Basics of Genetic Algorithms (MidTerm – only in RED material)
Basics of Genetic Algorithms
EE368 Soft Computing Genetic Algorithms.
Boltzmann Machine (BM) (§6.4)
Genetic Algorithm Soft Computing: use of inexact t solution to compute hard task problems. Soft computing tolerant of imprecision, uncertainty, partial.
Presentation transcript:

An Introduction to Genetic Algorithm (GA) By: Dola Pathak For: STAT 992:Computational Statistics SPRING

Motivating Example The data were collected at Baystate Medical Center in Spring- field, Massachusetts, in 1986, on 189 births and the response variable was the birth weight of the baby. There were eight explanatory variables/factors which were considered. This data, called the low birth weight data, is in the Appendix I of Hosmer and Lemeshow’s book “Applied Logistic Regression”. What is the best fitted model? Are all the variables important? How many models are possible with main effects only – 256! Any alternatives? 2

What is Genetic Algorithm (GA)? A genetic algorithm is an optimization method based on natural selection. 3

The concept Inspired by Darwin’s Theory of evolution popularly termed as “Survival of the fittest” Fittest – ability to adapt to the environment which increases the likelihood of survival The fitness is maintained through the process of reproduction, crossover and mutation. 4

From the statistical point of view A GA is a stochastic technique with simple operations based on the theory of natural selection. The basic operations are : 1. Selecting population members for the next generation 2. Mating these members via crossover of “chromosomes” In statistical terms chromosomes will be the individual members of the population and the genes of the chromosomes are the variables. 3. Performing mutations on the chromosomes to preserve population diversity so as to avoid convergence to local optima. 4. Finally, determining the fitness of each member in the new generation using an evaluation (fitness) function. This fitness influences the selection process for the next generation. 5

Development Alan Turing -----“learning machine” evolution process In 1960s the idea of evolution strategy/programming was developed in Germany and in the USA. John Holland and his students in the early 1970s (book: "Adaption in Natural and Artificial Systems"(1975)). David Goldberg, who was a graduate student of Holland’s presented an award-winning doctoral thesis on his GA application to gas pipeline optimization. 6

Why Genetic Algorithm? Exhaustive search (where every possible combination is checked ) - accurate result - time consuming - inefficient when the numbers of variables are large - optimizers tend to : - limit the number of variables they use or - limit the number of values these variables can take. The genetic algorithm (does not try every possible combination ) - optimal solution by selecting variables intelligently. - far more variables can be utilized - all values of a variable can be checked - simultaneous searching - less likely to become stuck in "local minima" - less time - efficient 7

Where are Genetic Algorithms applied? There are at least three situations where genetic algorithms are applied: 1. The objective function is not smooth (i.e., not differentiable). 2. There are multiple local optima( often happens with non linear functions). 3. There are a large number of parameters (the meaning of “large” keeps changing). 8

Outline of the Basic Genetic Algorithm [Start] Generate random population of n chromosomes (suitable solutions for the problem) [Fitness] Evaluate the fitness f(x) of each chromosome x in the population [New population] Create a new population by repeating the following steps until the new population is complete [Selection] Select two parent chromosomes from a population according to their fitness (the better fitness, the bigger chance to be selected) 9

[Crossover] With a crossover probability cross over the parents to form a new offspring (children). If no crossover was performed, offspring is an exact copy of parents. [Mutation] With a mutation probability mutate new offspring at each locus (position in chromosome). [Accepting] Place new offspring in a new population [Replace] Use new generated population for a further run of algorithm [Test] If the end condition is satisfied, stop, and return the best solution in current population [Loop] Go to step 2 10

11 Scrucca (April, 2013)

Example 1 Going back to the example that was presented at the beginning of the presentation, let us see how a first generation of optimum variable values are calculated using a Genetic Algorithm. 12

13

STEP1: Generate random population of 4 chromosomes (individuals) > set.seed(7777) > x y z population_chrom<-matrix(c(x,y,z),byrow = TRUE,nrow=3,ncol=4) #population units PARENT POPULATION population_chrom [,1] [,2] [,3] [,4] [1,] [2,] [3,] STEP2 Evaluate the fitness f(x) of each chromosome x in the population > fitness<-fit(population_chrom) > fitness [,1] [,2] [,3] [,4] [1,]

STEP 3: Select two parent chromosomes from a population according to their fitness (the better fitness, the bigger chance to be selected) Determining the new ordering > prob<-objective/total #probabilities associated with each chromosome > set.seed(9001) > gen_prob<-runif(4, min=0, max=1) > data.frame(t(prob), gen_prob) t.prob. gen_prob #generating the new order of the parent population (chromosomes) for the 1st generation > Chrom_reordered [,1] [,2] [,3] [,4] [1,] [2,] [3,]

16

Crossover: After Crossover: > Chromosome_cross [,1] [,2] [,3] [,4] [1,] [2,] [3,] > Chromosome_cross [,1] [,2] [,3] [,4] [1,] [2,] [3,]

18

1 st Generation: > first_gen<-Chromosome_cross > first_gen [,1] [,2] [,3] [,4] [1,] [2,] [3,] Comparing the fitness function: > fitness_new<-fit(first_gen) > data.frame(t(fitness),t(fitness_new)) t.fitness. t.fitness_new

20

CASE 2: GA Search Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) < 2e-16 *** race.catBlack ** race.catOther ** preterm lwt * sm ** ht ** ui *** COMPARISON: 21

With pairwise interaction: CASE 1:Exhaustive Search For the Exhaustive case the iterations went on for a long time and it failed to give the best fitted model. The program ran for approximately 710 minutes before it was terminated. 22

CASE 2: GA Search Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) e-13 *** race.catBlack * race.catOther preterm age ** lwt sm age:sm * age:ht * lwt:ht age:ui e-05 *** preterm1+:lwt age:ftv.catNone ** age:ftv.catMany * lwt:ftv.catNone ** lwt:ftv.catMany Signif. codes: 0 ‘***’ ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 23

Comparison of time taken for the methods to converge: Conclusion: It is seen that for models with pairwise interactions, GA gets to the best fitted model much faster than the exhaustive search. MethodExhaustive SearchGenetic Algorithm Time taken to find the best fit model minutes (failed to give the optimum solution) minutes (260 generations) 24

GAs are used for Building Double Threshold Auto Regressive Conditional Heteroscedastic (DTARCH) models Multilayer neural network Optimal Component Selection for component based systems Robotics VLSI layout optimization Modelling the behavior of economic agents in macroeconomic models, etc. 25

Computers and GA: With the advent of different packages and softwares the use of GA has definitely gained popularity. Apart from glmulti, some of the packages which I came across while researching for this presentation were:  GA  genalg  PROC GA  PROC CONNECT ( uses Parallel Genetic Algorithm)  Genetic Algorithm Toolbox in MATLAB  GAlib (available for the UNIX system) 26

References and further readings: Denny Hermawanto. Genetic Algorithm for Solving Simple Mathematical Equality Problem. Hillier and Lieberman. Introduction to Operations Research (9 th Ed.) Hosmer, D.W. and Lemeshow, S. Applied Logistic Regression. New York: Wiley Givens & Hoeting.Computational Statistics (2 nd Ed.) K.F Man, et all. Genetic Algorithms: Concepts and Applications. IEEE Transactions on Industrial Electronics, Vol.43 No 5, Oct 1996 Luca Scrucca. GA: A Package for Genetic Algorithms in R. Journal of Statistical Software, Vol 23, Issue 4, April 2013 V. Calcagno, et all. glmulti: An R Package for Easy Automated Model Selection with (Generalized) Linear Models. Journal of Statistical Software, Vol 24 Issue 12, May / 27

Thank you 28