Genetic algorithms for neural networks - PowerPoint PPT Presentation

About This Presentation
Title:

Genetic algorithms for neural networks

Description:

Using genetic algorithms with neural networks. Why use genetic algorithms? ... Roulette wheel algorithm. Genes are crossed over between parents [x11, x12, x13, x14] ... – PowerPoint PPT presentation

Number of Views:111
Avg rating:3.0/5.0
Slides: 31
Provided by: richar403
Category:

less

Transcript and Presenter's Notes

Title: Genetic algorithms for neural networks


1
Genetic algorithms for neural networks
  • An introduction

2
Genetic algorithms
  • Why use genetic algorithms?
  • What arent genetic algorithms?
  • What are genetic algorithms?
  • What to avoid
  • Using genetic algorithms with neural networks

3
Why use genetic algorithms?
4
What arent genetic algorithms?
  • Hill-climbing algorithms
  • Enumerative algorithms
  • Random searches
  • Guesses
  • Ask an expert
  • Educated guesses

5
Hill-climbing
  • Calculus based approach

6
But
?
?
7
But
?
?
?
?
?
?
8
More realistically?
?
?
?
?
?
?
?
?
?
?
  • Noisy?
  • Discontinuous?

?
?
9
Robust scheme
10
Genetic algorithms
  • Cope with non-linear functions
  • Cope with large numbers of variables efficiently
  • Cope with modelling uncertainties
  • Do not require knowledge of the function

11
What are genetic algorithms?
12
Circle of life
13
Chromosome
  • A collection of genes
  • xi1, xi2, xi3, xi4,

14
Fitness
  • Ranked by a fitness factor
  • Proportional to the likelihood of breeding
  • Action of the algorithm is to maximise fitness

15
Breeding and crossover
  • Parents selected randomly with a probability
    proportional to fitness
  • Roulette wheel algorithm
  • Genes are crossed over between parents
  • x11, x12, x13, x14
  • x21, x22, x23, x24

16
Mutation
  • Small (random) variation in a gene
  • xi1, xi2, xi3, xi4 --gt xi1, xi2, xi3?, xi4

17
Circle of life
Good
Bad
18
Genetic algorithms
  • Work on populations, not single points
  • Use an objective function (fitness) only, rather
    than derivatives or other information
  • Use probabilistic rules rather than deterministic
    rules
  • Operate on an encoded set of values (a
    chromosome) rather than the values themselves

19
Potential problems
  • GA deceptive functions
  • Premature and postmature convergence
  • Excessive mutation
  • Application to constrained problems
  • Neural networks, particularly
  • The meaning of fitness

20
Deceptive functions and premature convergence
  • A function which selects for one gene when a
    combination would be better
  • Can eliminate better genes
  • Avoided by
  • Elitism
  • Multiple populations
  • Mutation (which reintroduces genes)
  • Fitness scaling

21
Postmature convergence
  • When all of a population performs well, selection
    pressures wane
  • Avoided by fitness scaling (be careful!)

22
Excessive mutation
  • Too little mutation loss of genes
  • Too much mutation random walk

23
Application to constrained problems
  • Neural networks and genetic algorithms are by
    nature unconstrained
  • i.e they can take any value
  • Must avoid unphysical values
  • Restrict mutation
  • Punish through fitness function

24
The meaning of fitness
  • Genetic algorithms maximise fitness
  • Therefore fitness must be carefully defined
  • What are you actually trying to do?

25
When to stop?
  • How long do we run the algorithm for?
  • Until we find a solution
  • Until a fixed number of generations has been
    produced
  • Until there is no further improvement
  • Until we run out of time or money?

26
Genetic algorithms for Bayesian neural networks
  • Generally want to find an optimised input set for
    a particular defined output

27
Define fitness
  • Need a function that includes target and
    uncertainty

28
Define the chromosome
  • Set of inputs to the network except
  • Derived inputs must be removed
  • e.g. if you have both t and ln(t), or T and
    exp(-1/T), only one can be included
  • Prevents unphysical input sets being found

29
Create the populations
  • Chromosomes are randomly generated
  • (avoid non-physical values)
  • Population size must be considered
  • 20 is a good start
  • Best to use more than one population
  • Trade-off between coverage and time
  • Three is good

30
Run the algorithm!
  • Decode chromosomes to NN inputs (i.e. calculate
    any other inputs)
  • Make predictions for each chromosome
  • if the target is met or enough generations have
    happened, stop
  • Calculate fitness for each chromosome
  • Preserve the best chromosome (elitism)
  • Breed 18 new chromosomes by crossbreeding
  • Mutate one (non-elite) gene at random
  • Create new chromosome at random
  • Go back to 1
Write a Comment
User Comments (0)
About PowerShow.com