ML Unit-IV Chapter-I Genetic Algorithms
ML Unit-IV Chapter-I Genetic Algorithms
By
Mohammed Afzal
Assistant Professor
Artificial Intelligence and Machine Learning Department
Sphoorthy Engineering College
UNIT - IV
Chapter – I: Genetic Algorithms – Motivation, Genetic algorithms, an
illustrative example, hypothesis space search, genetic programming, models
of evolution and learning, parallelizing genetic algorithms.
INTRODUCTION:
Before getting into the working of a Genetic Algorithm let us dive into the
basic terminologies of Genetic Algorithms.
1. Chromosome/Individual
A chromosome is a collection of genes. For example, a chromosome can be
represented as a binary string where each bit is a gene.
2. Population
Since an individual is represented as a chromosome, a population is a
collection of such chromosomes.
3. Fitness Function
In every iteration, the individuals are evaluated based on their fitness
scores which are computed by the fitness function. Individuals who
achieve a better fitness score represent better solutions and are more likely
to be chosen to crossover and passed on to the next generation.
For example, if genetic algorithms are used for feature selection, then the
accuracy of the model with those selected features would be the fitness
function if it is a classification problem.
4. Selection
After calculating the fitness of every individual in the population, a
selection process is used to determine which of the individuals in the
population will get to reproduce and create the offspring that will form the
next generation.
Different types of selection methods are available:
a) Roulette wheel selection
b) Tournament selection
c) Rank-based selection
5. Crossover
Generally, two individuals are chosen from the current generation and
their genes are interchanged between two individuals to create a new
individual representing the offspring. This process is also called mating or
crossover.
Different types of selection methods are available:
a) One point crossover
b) Two-point crossover
c) Uniform crossover
6. Mutation
The mutation is a random change in a chromosome to introduce
new patterns to a chromosome.
For example, flipping a bit in a binary string.
Different types of mutation methods are available,
a) Flip bit mutation
b) Gaussian mutation
c) Swap mutation
General workflow of a
simple genetic algorithm
Advantages of Genetic Algorithm
Lamarckian Evolution