SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Buenos Aires, junio de 2016
Eduardo Poggi
Temario
 Introduction
 Representing Hypotheses
 Operators
 Fitness Function
 Genetic Programming
 Models of Evolution and Learning
Introduction
 Genetic Algorithms (GA/AG) provide a learning method based on
principles of biological evolution.
 New hypotheses are generated by mutating and recombining current
hypotheses.
 At each step we have a population of hypotheses from which we
select the most fit.
 GA do a parallel search over different parts of the hypothesis space.
Introduction
 La evolución puede verse como un método robusto de adaptación,
sumamente utilizado como modelo en biología.
 Los AG pueden buscar en espacios de hipótesis que contienen elementos en
compleja interacción, de tal forma que la influencia de cada elemento sobre
la medida de adaptación global de la hipótesis sea difícil de modelar.
 Los AG son fácilmente paralelizables por lo que pueden sacar ventaja de la
reducción de costo de procesamiento e incremento de la performance.
Introduction
 A hypothesis is good if it has a high “fitness” value.
 In Classification: The accuracy of the hypothesis on test examples
 In Games: Number of games won against other hypotheses of
the same population.
Parameters
 A genetic algorithm has the following parameters:
 A fitness function that gives a score to every hypothesis.
 A fitness threshold above which we stop and take the hypothesis with
best fit.
 p: The number of hypothesis in the current population.
 r: the fraction of hypothesis replaced by cross-over.
 m: the mutation rate.
Algorithm
 Initialize population with p hypotheses at random
 For each hypothesis h compute its fitness
 While max fitness < threshold do
 Create a new generation Ps
 Return the hypothesis with highest fitness
Algorithm
New Population
 Select: (1-r)p members of P and add them to Ps.
 The probability of selecting a member is as follows: P(hi) = Fitness (hi) / Σj
Fitness (hj)
 Crossover:
 select rp/2 pairs of hypotheses from P according to P(hi).
 For each pair (h1,h2) produce two offspring by applying the crossover operator.
 Add all offspring to Ps.
 Mutate:
 Choose m members of Ps with uniform probability.
 Invert: one bit in the representation randomly.
 Update: P with Ps.
 Evaluate: for each h compute its fitness.
Representing Hypotheses
 Las hipótesis en general se representan con reglas if-then codificadas
como cadenas de bits.
 Por ejemplo:
 cielo: soleado, nublado, lluvia = 100, 010, 001
 viento: débil, fuerte = 10, 01
 Jugar_tenis = si, no = 10, 01
 SI (cielo=nublado v lluvia) ^ (viento=fuerte) then jugar_tenis = NO
 = 011 01 01
Representing Hypotheses
 Some combinations may be undesirable. In those cases
we can do one of the following:
 Use a different encoding.
 Modify the operators to avoid constructing that combination.
 Assign low fitness values to those strings.
Genetic Operators - Crossover
 The most common is called single-point crossover (sexual
recombination):
 Initial Strings:
 11101001000
 00001010101
 Crossover Mask:
 11111000000
 Offspring:
 11101010101
 00001001000
Genetic Operators - Mutation
 The idea is to produce small changes to a string at
random.
 Under a uniform distribution, we select one bit and switch its
value.
 Input string: 00001010101
 Output String: 01001010101
 Select and change the second bit
Fitness Function and Selection
 If we want to learn classification rules, possible functions
are accuracy or complexity.
 Sometimes the system is complex and it is hard to know
the fitness value of a rule.
 We may have a method to measure the overall
performance of a systems of rules.
Fitness Function and Selection
 Selection:
 The typical approach is the “fitness proportionate selection” or “roulette
wheel selection”:
 P(hi) = Fitness (hi) / Σj Fitness (hj)
 Other options are rank selection: Rank according to fitness but then
select based on rank only.
 Fitness Function:
 squared of the classification accuracy over the training data
 Fitness(h) = (Correct(h))^2
 Where Correct is de % of examples correctly classified by h
An Example - GABIL
 System GAIL by Kenneth De Jong et. al. 1993, uses
genetic algorithms to learn Boolean concepts represented
as a disjunction of rules.
 If condition1 then class = +
 If condition2 then class = -
 If condition3 then class = +
Representation - GABIL
 We represent the set of rules as a string of bits.
 Each rule contains a pre-condition and a consequent; if we assume
only two attributes, a1 and a2, then a hypothesis can be encoded
as follows:
 If a1 = T and a2 = F THEN c = T
 If a2 = T THEN c = F
 Corresponding string: a1 a2 c
 10 01 10
 11 10 01
Genetic Operators - GABIL
 Parameters:
 r: 0.6 (fraction of the parent population replaced by crossover)
 m: 0.001 (mutation rate)
 p: 100-1000 (population size)
 Mutation:
 The probability of choosing a bit is 0.001
 Fitness Function:
 Squared of the classification accuracy over the training data
Fitness(h) = (correct(h))2
 Experiments:
 Compared to C4.5 accuracy was 92.1% ; the performance of other systems
ranged from 91.2% to 96.6%
Extensiones - GABIL
 AddCondition: sobre algún atributo generaliza cambiando un bit en 0
por un 1.
 DropCondition: reemplaza todos los bits de una subcadena por 1s.
 Reportó resultados ambivalentes, mejoras en algunos problemas y
baja de desempeño en otros.
 Sugiere la posibilidad que el AG evolucione su propio método de
busca de hipótesis.
GP - Genetic Programming
 Genetic Programming is a form of evolutionary
computation in which the individuals in the population are
computer programs.
 Programs are normally represented by trees. A program
is executed by parsing the tree.
 Example:
+
Sin sqrt
x +
^ y
x 2
F = sin(x) + sqrt( x^2 + y)
GP - Vocabulary
 To apply genetic programming one has to define the
functions that can be applied:
 Example: sin, cos, sqrt, +, -, etc.
 A genetic programming algorithm explores the space of
combinations of these functions.
 The fitness of an individual is determined by executing
the program on a set of training data.
GP - Cross Over
The crossover operator is performed by replacing subtrees of
one program with subtrees of another program.
+
Sin ^
x +
x y
+
Sin sqrt
x +
^ y
x 2
2
GP - Result
+
Sin ^
x ^
x y
+
Sin sqrt
x +
+ y
x 2
2
Blocks
 Learning an algorithm for stacking blocks.
 Learn an algorithm to stack the blocks so that it reads
“UNIVERSAL”
V U L A I
N
E
S
R
Blocks
 The only valid operations are move a block from the stack
to the surface of the table move a block from the surface
of table to the stack
 The primitive functions are:
 CS (current stack) returns the name of the block on top of the
stack.
 TB (top current block) returns the name of the topmost block
where all blocks and itself are in correct order.
 NN (next necessary) name of the block needed above TB to read
the word “UNIVERSAL”.
Blocks
 Additional functions are:
 (MS x) move block x to stack if x is on table.
 (MT x) move block x to table if x is on the stack.
 (EQ x y) returns true if x = y.
 (NOT x) returns the complement of x.
 DO(x y) do x until expression y is true
Blocks
 What is the fitness value?
 In this experiment the author provided 166 different
examples having each different initial block
configurations. The fitness of a program is how many
problem were correctly solved by the program.
 Initial population = 100 programs
 After 10 generations the genetic programming strategy
found the following program:
 (EQ (DU (MT CS)(NOT CS)) (DU (MS NN)(NOT NN)) )
 which solved all 166 programs correctly.
Ejemplos:
Models of Evolution and Learning
 Jean-Baptiste Pierre Antoine de Monet, Caballero de
Lamarck; 1744-1829.
 Lamarckian Evolution:
 Propuso que la evolución sobre muchas generaciones
estaba directamente influenciada por las experiencias
de los organismos individuales durante su vida. En
particular propuso que las experiencias de un
organismo afectaban directamente el marcaje genético
de su prole.
 Esta conjetura es atractiva porque podría
presumiblemente permitir un progreso evolutivo más
eficiente que el proceso genera-prueba de los
algoritmos genéticos, que ignoran la experiencia
ganada durante el tiempo de vida de los individuos.
 A pesar de lo atractivo la evidencia científica actual
contradice el modelo de Lamarck. El punto de vista
aceptado actualmente es que el marcaje genético de
un individuo es de hecho, inalterable por la
experiencia de vida de sus padres biológicos.
 Sin embargo, y a pesar de esta contradicción,
algunos estudios computacionales han mostrado que
los procesos Lamarckianos pueden en algunos casos,
mejorar la efectividad de los algoritmos genéticos.
Baldwin Effect
 After J. M. Baldwin (1986).
 The Baldwin effect relies on the following:
 Si una especie está evolucionando en un
ambiente cambiante, habrá una presión
evolutiva a favor de los individuos con la
capacidad de aprender durante su tiempo de
vida.
 Aquellos individuos que son capaces de
aprender muchos rasgos, dependen menos
de su código genético. Estos individuos
pueden soportar un pool genético más
diverso, basándose en el aprendizaje
individual para resolver rasgos perdidos o no
optimizados de su código genético. Este pool
genético diverso puede a su vez, soportar
una adaptación por evolución más rápida.
Fitness
 Better individuals are preferred
 Best is not always picked
 Worst is not necessarily excluded
 Nothing is guaranteed
 Mixture of greedy exploitation and adventurous
exploration
 Similarities to simulated annealing (SA)
Crowding
 Individuos más aptos que otros comienzan a reproducirse
rápidamente de tal forma que copias o individuos muy
parecidos ocupan una fracción importante de P afectando
la diversidad de la población y reduce la velocidad.
 Algunas técnicas para evitar el crowding incluyen:
 Usar un criterio de selección por torneo o por rango, en lugar de
la selección basada en adaptación.
 Reducir el índice de adaptación de un individuo si se detecta la
presencia de individuos similares en la población (fitness sharing).
 Restringir que individuos pueden combinarse para producir prole,
mitigando la creación de especies o grupos de individuos
similares.
¿AG vs BH?
 Los algoritmos genéticos emplean una búsqueda al azar
por barrido para encontrar la mejor hipótesis.
 Esta forma de buscar es diferente de la BH más
tradicional debido que en este caso la búsqueda puede
moverse abruptamente en el espacio de hipótesis
posibles, por ejemplo, cuando la prole difiere totalmente
de sus padres.
 Es menos probable que el algoritmo caiga en máximos
locales.
Parallel Genetic Agorithms
 It seems very natural to produce a parallel version of genetic
algorithms.
 Some approaches divide the population into groups called demes
(“local population of closely related organisms”).
 Each deme resides on a computational node, and a standard search
is carried out on each node.
 There is communication and combination among demes but these
are rare compared to those occurring within demes.
Summary
 Genetic algorithm do a parallel, hill climbing search looking to
optimize a fitness function.
 The search resembles the mechanism of biological evolution.
 Genetic algorithms have many application outside machine learning.
In machine learning the goal is to evolve a population of hypotheses
to find the hypothesis with highest accuracy.
 Genetic programming is similar to genetic algorithms but what we
evolve is computer programs.
eduardopoggi@yahoo.com.ar
eduardo-poggi
http://ar.linkedin.com/in/eduardoapoggi
https://www.facebook.com/eduardo.poggi
@eduardoapoggi
Biblio
 Capítulo 9 de Mitchell
 Guerra, Algoritmos Genéticos

Weitere ähnliche Inhalte

Ähnlich wie Poggi analytics - geneticos - 1

Chapter09.ppt
Chapter09.pptChapter09.ppt
Chapter09.ppt
butest
 
AML_030607.ppt
AML_030607.pptAML_030607.ppt
AML_030607.ppt
butest
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
butest
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
butest
 
original
originaloriginal
original
butest
 
Topic_6
Topic_6Topic_6
Topic_6
butest
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
butest
 

Ähnlich wie Poggi analytics - geneticos - 1 (20)

Chapter09.ppt
Chapter09.pptChapter09.ppt
Chapter09.ppt
 
G
GG
G
 
04 1 evolution
04 1 evolution04 1 evolution
04 1 evolution
 
Genetic Programming for Generating Prototypes in Classification Problems
Genetic Programming for Generating Prototypes in Classification ProblemsGenetic Programming for Generating Prototypes in Classification Problems
Genetic Programming for Generating Prototypes in Classification Problems
 
fitness function
fitness functionfitness function
fitness function
 
Fuzzy sets
Fuzzy sets Fuzzy sets
Fuzzy sets
 
AML_030607.ppt
AML_030607.pptAML_030607.ppt
AML_030607.ppt
 
An Efficient Genetic Algorithm for Solving Knapsack Problem.pdf
An Efficient Genetic Algorithm for Solving Knapsack Problem.pdfAn Efficient Genetic Algorithm for Solving Knapsack Problem.pdf
An Efficient Genetic Algorithm for Solving Knapsack Problem.pdf
 
New_ML_Lecture_9.ppt
New_ML_Lecture_9.pptNew_ML_Lecture_9.ppt
New_ML_Lecture_9.ppt
 
autoDock.ppt
autoDock.pptautoDock.ppt
autoDock.ppt
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
Essentials of machine learning algorithms
Essentials of machine learning algorithmsEssentials of machine learning algorithms
Essentials of machine learning algorithms
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
Pso notes
Pso notesPso notes
Pso notes
 
original
originaloriginal
original
 
A preliminary study of diversity in ELM ensembles (HAIS 2018)
A preliminary study of diversity in ELM ensembles (HAIS 2018)A preliminary study of diversity in ELM ensembles (HAIS 2018)
A preliminary study of diversity in ELM ensembles (HAIS 2018)
 
Topic_6
Topic_6Topic_6
Topic_6
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
GA.pptx
GA.pptxGA.pptx
GA.pptx
 

Mehr von Gaston Liberman

Mehr von Gaston Liberman (15)

Taller bd8
Taller bd8Taller bd8
Taller bd8
 
Poggi analytics - tm - 1b
Poggi   analytics - tm - 1bPoggi   analytics - tm - 1b
Poggi analytics - tm - 1b
 
Poggi analytics - distance - 1a
Poggi   analytics - distance - 1aPoggi   analytics - distance - 1a
Poggi analytics - distance - 1a
 
Poggi analytics - sentiment - 1
Poggi   analytics - sentiment - 1Poggi   analytics - sentiment - 1
Poggi analytics - sentiment - 1
 
Poggi analytics - ebl - 1
Poggi   analytics - ebl - 1Poggi   analytics - ebl - 1
Poggi analytics - ebl - 1
 
Poggi analytics - star - 1a
Poggi   analytics - star - 1aPoggi   analytics - star - 1a
Poggi analytics - star - 1a
 
Poggi analytics - inference - 1a
Poggi   analytics - inference - 1aPoggi   analytics - inference - 1a
Poggi analytics - inference - 1a
 
Poggi analytics - ensamble - 1b
Poggi   analytics - ensamble - 1bPoggi   analytics - ensamble - 1b
Poggi analytics - ensamble - 1b
 
Poggi analytics - trees - 1e
Poggi   analytics - trees - 1ePoggi   analytics - trees - 1e
Poggi analytics - trees - 1e
 
Poggi analytics - concepts - 1a
Poggi   analytics - concepts - 1aPoggi   analytics - concepts - 1a
Poggi analytics - concepts - 1a
 
Poggi analytics - ml - 1d
Poggi   analytics - ml - 1dPoggi   analytics - ml - 1d
Poggi analytics - ml - 1d
 
Poggi analytics - intro - 1c
Poggi   analytics - intro - 1cPoggi   analytics - intro - 1c
Poggi analytics - intro - 1c
 
Poggi analytics - bayes - 1a
Poggi   analytics - bayes - 1aPoggi   analytics - bayes - 1a
Poggi analytics - bayes - 1a
 
Poggi analytics - clustering - 1
Poggi   analytics - clustering - 1Poggi   analytics - clustering - 1
Poggi analytics - clustering - 1
 
Henrion poggi analytics - ann - 1
Henrion poggi   analytics - ann - 1Henrion poggi   analytics - ann - 1
Henrion poggi analytics - ann - 1
 

Kürzlich hochgeladen

Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
daisycvs
 
Mckinsey foundation level Handbook for Viewing
Mckinsey foundation level Handbook for ViewingMckinsey foundation level Handbook for Viewing
Mckinsey foundation level Handbook for Viewing
Nauman Safdar
 

Kürzlich hochgeladen (20)

Falcon Invoice Discounting: Aviate Your Cash Flow Challenges
Falcon Invoice Discounting: Aviate Your Cash Flow ChallengesFalcon Invoice Discounting: Aviate Your Cash Flow Challenges
Falcon Invoice Discounting: Aviate Your Cash Flow Challenges
 
Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1
 
Cannabis Legalization World Map: 2024 Updated
Cannabis Legalization World Map: 2024 UpdatedCannabis Legalization World Map: 2024 Updated
Cannabis Legalization World Map: 2024 Updated
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
 
Mckinsey foundation level Handbook for Viewing
Mckinsey foundation level Handbook for ViewingMckinsey foundation level Handbook for Viewing
Mckinsey foundation level Handbook for Viewing
 
Lucknow Housewife Escorts by Sexy Bhabhi Service 8250092165
Lucknow Housewife Escorts  by Sexy Bhabhi Service 8250092165Lucknow Housewife Escorts  by Sexy Bhabhi Service 8250092165
Lucknow Housewife Escorts by Sexy Bhabhi Service 8250092165
 
Falcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investorsFalcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investors
 
Cracking the 'Career Pathing' Slideshare
Cracking the 'Career Pathing' SlideshareCracking the 'Career Pathing' Slideshare
Cracking the 'Career Pathing' Slideshare
 
New 2024 Cannabis Edibles Investor Pitch Deck Template
New 2024 Cannabis Edibles Investor Pitch Deck TemplateNew 2024 Cannabis Edibles Investor Pitch Deck Template
New 2024 Cannabis Edibles Investor Pitch Deck Template
 
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 MonthsSEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 Months
 
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGParadip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
PHX May 2024 Corporate Presentation Final
PHX May 2024 Corporate Presentation FinalPHX May 2024 Corporate Presentation Final
PHX May 2024 Corporate Presentation Final
 
joint cost.pptx COST ACCOUNTING Sixteenth Edition ...
joint cost.pptx  COST ACCOUNTING  Sixteenth Edition                          ...joint cost.pptx  COST ACCOUNTING  Sixteenth Edition                          ...
joint cost.pptx COST ACCOUNTING Sixteenth Edition ...
 
Phases of Negotiation .pptx
 Phases of Negotiation .pptx Phases of Negotiation .pptx
Phases of Negotiation .pptx
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All TimeCall 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
 
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAIGetting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
 
TVB_The Vietnam Believer Newsletter_May 6th, 2024_ENVol. 006.pdf
TVB_The Vietnam Believer Newsletter_May 6th, 2024_ENVol. 006.pdfTVB_The Vietnam Believer Newsletter_May 6th, 2024_ENVol. 006.pdf
TVB_The Vietnam Believer Newsletter_May 6th, 2024_ENVol. 006.pdf
 
HomeRoots Pitch Deck | Investor Insights | April 2024
HomeRoots Pitch Deck | Investor Insights | April 2024HomeRoots Pitch Deck | Investor Insights | April 2024
HomeRoots Pitch Deck | Investor Insights | April 2024
 

Poggi analytics - geneticos - 1

  • 1. Buenos Aires, junio de 2016 Eduardo Poggi
  • 2. Temario  Introduction  Representing Hypotheses  Operators  Fitness Function  Genetic Programming  Models of Evolution and Learning
  • 3. Introduction  Genetic Algorithms (GA/AG) provide a learning method based on principles of biological evolution.  New hypotheses are generated by mutating and recombining current hypotheses.  At each step we have a population of hypotheses from which we select the most fit.  GA do a parallel search over different parts of the hypothesis space.
  • 4. Introduction  La evolución puede verse como un método robusto de adaptación, sumamente utilizado como modelo en biología.  Los AG pueden buscar en espacios de hipótesis que contienen elementos en compleja interacción, de tal forma que la influencia de cada elemento sobre la medida de adaptación global de la hipótesis sea difícil de modelar.  Los AG son fácilmente paralelizables por lo que pueden sacar ventaja de la reducción de costo de procesamiento e incremento de la performance.
  • 5. Introduction  A hypothesis is good if it has a high “fitness” value.  In Classification: The accuracy of the hypothesis on test examples  In Games: Number of games won against other hypotheses of the same population.
  • 6. Parameters  A genetic algorithm has the following parameters:  A fitness function that gives a score to every hypothesis.  A fitness threshold above which we stop and take the hypothesis with best fit.  p: The number of hypothesis in the current population.  r: the fraction of hypothesis replaced by cross-over.  m: the mutation rate.
  • 7. Algorithm  Initialize population with p hypotheses at random  For each hypothesis h compute its fitness  While max fitness < threshold do  Create a new generation Ps  Return the hypothesis with highest fitness
  • 9. New Population  Select: (1-r)p members of P and add them to Ps.  The probability of selecting a member is as follows: P(hi) = Fitness (hi) / Σj Fitness (hj)  Crossover:  select rp/2 pairs of hypotheses from P according to P(hi).  For each pair (h1,h2) produce two offspring by applying the crossover operator.  Add all offspring to Ps.  Mutate:  Choose m members of Ps with uniform probability.  Invert: one bit in the representation randomly.  Update: P with Ps.  Evaluate: for each h compute its fitness.
  • 10. Representing Hypotheses  Las hipótesis en general se representan con reglas if-then codificadas como cadenas de bits.  Por ejemplo:  cielo: soleado, nublado, lluvia = 100, 010, 001  viento: débil, fuerte = 10, 01  Jugar_tenis = si, no = 10, 01  SI (cielo=nublado v lluvia) ^ (viento=fuerte) then jugar_tenis = NO  = 011 01 01
  • 11. Representing Hypotheses  Some combinations may be undesirable. In those cases we can do one of the following:  Use a different encoding.  Modify the operators to avoid constructing that combination.  Assign low fitness values to those strings.
  • 12. Genetic Operators - Crossover  The most common is called single-point crossover (sexual recombination):  Initial Strings:  11101001000  00001010101  Crossover Mask:  11111000000  Offspring:  11101010101  00001001000
  • 13. Genetic Operators - Mutation  The idea is to produce small changes to a string at random.  Under a uniform distribution, we select one bit and switch its value.  Input string: 00001010101  Output String: 01001010101  Select and change the second bit
  • 14. Fitness Function and Selection  If we want to learn classification rules, possible functions are accuracy or complexity.  Sometimes the system is complex and it is hard to know the fitness value of a rule.  We may have a method to measure the overall performance of a systems of rules.
  • 15. Fitness Function and Selection  Selection:  The typical approach is the “fitness proportionate selection” or “roulette wheel selection”:  P(hi) = Fitness (hi) / Σj Fitness (hj)  Other options are rank selection: Rank according to fitness but then select based on rank only.  Fitness Function:  squared of the classification accuracy over the training data  Fitness(h) = (Correct(h))^2  Where Correct is de % of examples correctly classified by h
  • 16. An Example - GABIL  System GAIL by Kenneth De Jong et. al. 1993, uses genetic algorithms to learn Boolean concepts represented as a disjunction of rules.  If condition1 then class = +  If condition2 then class = -  If condition3 then class = +
  • 17. Representation - GABIL  We represent the set of rules as a string of bits.  Each rule contains a pre-condition and a consequent; if we assume only two attributes, a1 and a2, then a hypothesis can be encoded as follows:  If a1 = T and a2 = F THEN c = T  If a2 = T THEN c = F  Corresponding string: a1 a2 c  10 01 10  11 10 01
  • 18. Genetic Operators - GABIL  Parameters:  r: 0.6 (fraction of the parent population replaced by crossover)  m: 0.001 (mutation rate)  p: 100-1000 (population size)  Mutation:  The probability of choosing a bit is 0.001  Fitness Function:  Squared of the classification accuracy over the training data Fitness(h) = (correct(h))2  Experiments:  Compared to C4.5 accuracy was 92.1% ; the performance of other systems ranged from 91.2% to 96.6%
  • 19. Extensiones - GABIL  AddCondition: sobre algún atributo generaliza cambiando un bit en 0 por un 1.  DropCondition: reemplaza todos los bits de una subcadena por 1s.  Reportó resultados ambivalentes, mejoras en algunos problemas y baja de desempeño en otros.  Sugiere la posibilidad que el AG evolucione su propio método de busca de hipótesis.
  • 20. GP - Genetic Programming  Genetic Programming is a form of evolutionary computation in which the individuals in the population are computer programs.  Programs are normally represented by trees. A program is executed by parsing the tree.  Example: + Sin sqrt x + ^ y x 2 F = sin(x) + sqrt( x^2 + y)
  • 21. GP - Vocabulary  To apply genetic programming one has to define the functions that can be applied:  Example: sin, cos, sqrt, +, -, etc.  A genetic programming algorithm explores the space of combinations of these functions.  The fitness of an individual is determined by executing the program on a set of training data.
  • 22. GP - Cross Over The crossover operator is performed by replacing subtrees of one program with subtrees of another program. + Sin ^ x + x y + Sin sqrt x + ^ y x 2 2
  • 23. GP - Result + Sin ^ x ^ x y + Sin sqrt x + + y x 2 2
  • 24. Blocks  Learning an algorithm for stacking blocks.  Learn an algorithm to stack the blocks so that it reads “UNIVERSAL” V U L A I N E S R
  • 25. Blocks  The only valid operations are move a block from the stack to the surface of the table move a block from the surface of table to the stack  The primitive functions are:  CS (current stack) returns the name of the block on top of the stack.  TB (top current block) returns the name of the topmost block where all blocks and itself are in correct order.  NN (next necessary) name of the block needed above TB to read the word “UNIVERSAL”.
  • 26. Blocks  Additional functions are:  (MS x) move block x to stack if x is on table.  (MT x) move block x to table if x is on the stack.  (EQ x y) returns true if x = y.  (NOT x) returns the complement of x.  DO(x y) do x until expression y is true
  • 27. Blocks  What is the fitness value?  In this experiment the author provided 166 different examples having each different initial block configurations. The fitness of a program is how many problem were correctly solved by the program.  Initial population = 100 programs  After 10 generations the genetic programming strategy found the following program:  (EQ (DU (MT CS)(NOT CS)) (DU (MS NN)(NOT NN)) )  which solved all 166 programs correctly.
  • 29. Models of Evolution and Learning  Jean-Baptiste Pierre Antoine de Monet, Caballero de Lamarck; 1744-1829.  Lamarckian Evolution:  Propuso que la evolución sobre muchas generaciones estaba directamente influenciada por las experiencias de los organismos individuales durante su vida. En particular propuso que las experiencias de un organismo afectaban directamente el marcaje genético de su prole.  Esta conjetura es atractiva porque podría presumiblemente permitir un progreso evolutivo más eficiente que el proceso genera-prueba de los algoritmos genéticos, que ignoran la experiencia ganada durante el tiempo de vida de los individuos.  A pesar de lo atractivo la evidencia científica actual contradice el modelo de Lamarck. El punto de vista aceptado actualmente es que el marcaje genético de un individuo es de hecho, inalterable por la experiencia de vida de sus padres biológicos.  Sin embargo, y a pesar de esta contradicción, algunos estudios computacionales han mostrado que los procesos Lamarckianos pueden en algunos casos, mejorar la efectividad de los algoritmos genéticos.
  • 30. Baldwin Effect  After J. M. Baldwin (1986).  The Baldwin effect relies on the following:  Si una especie está evolucionando en un ambiente cambiante, habrá una presión evolutiva a favor de los individuos con la capacidad de aprender durante su tiempo de vida.  Aquellos individuos que son capaces de aprender muchos rasgos, dependen menos de su código genético. Estos individuos pueden soportar un pool genético más diverso, basándose en el aprendizaje individual para resolver rasgos perdidos o no optimizados de su código genético. Este pool genético diverso puede a su vez, soportar una adaptación por evolución más rápida.
  • 31. Fitness  Better individuals are preferred  Best is not always picked  Worst is not necessarily excluded  Nothing is guaranteed  Mixture of greedy exploitation and adventurous exploration  Similarities to simulated annealing (SA)
  • 32. Crowding  Individuos más aptos que otros comienzan a reproducirse rápidamente de tal forma que copias o individuos muy parecidos ocupan una fracción importante de P afectando la diversidad de la población y reduce la velocidad.  Algunas técnicas para evitar el crowding incluyen:  Usar un criterio de selección por torneo o por rango, en lugar de la selección basada en adaptación.  Reducir el índice de adaptación de un individuo si se detecta la presencia de individuos similares en la población (fitness sharing).  Restringir que individuos pueden combinarse para producir prole, mitigando la creación de especies o grupos de individuos similares.
  • 33. ¿AG vs BH?  Los algoritmos genéticos emplean una búsqueda al azar por barrido para encontrar la mejor hipótesis.  Esta forma de buscar es diferente de la BH más tradicional debido que en este caso la búsqueda puede moverse abruptamente en el espacio de hipótesis posibles, por ejemplo, cuando la prole difiere totalmente de sus padres.  Es menos probable que el algoritmo caiga en máximos locales.
  • 34. Parallel Genetic Agorithms  It seems very natural to produce a parallel version of genetic algorithms.  Some approaches divide the population into groups called demes (“local population of closely related organisms”).  Each deme resides on a computational node, and a standard search is carried out on each node.  There is communication and combination among demes but these are rare compared to those occurring within demes.
  • 35. Summary  Genetic algorithm do a parallel, hill climbing search looking to optimize a fitness function.  The search resembles the mechanism of biological evolution.  Genetic algorithms have many application outside machine learning. In machine learning the goal is to evolve a population of hypotheses to find the hypothesis with highest accuracy.  Genetic programming is similar to genetic algorithms but what we evolve is computer programs.
  • 37. Biblio  Capítulo 9 de Mitchell  Guerra, Algoritmos Genéticos

Hinweis der Redaktion

  1. What is machine learning?
  2. What is machine learning?
  3. What is machine learning?
  4. What is machine learning?
  5. What is machine learning?
  6. What is machine learning?
  7. What is machine learning?
  8. What is machine learning?
  9. What is machine learning?
  10. What is machine learning?
  11. What is machine learning?
  12. What is machine learning?
  13. What is machine learning?
  14. What is machine learning?
  15. What is machine learning?
  16. What is machine learning?
  17. What is machine learning?
  18. What is machine learning?
  19. What is machine learning?
  20. What is machine learning?
  21. What is machine learning?
  22. What is machine learning?
  23. What is machine learning?
  24. What is machine learning?
  25. What is machine learning?
  26. What is machine learning?
  27. What is machine learning?
  28. What is machine learning?
  29. What is machine learning?
  30. What is machine learning?
  31. What is machine learning?
  32. What is machine learning?
  33. What is machine learning?
  34. 36
  35. What is machine learning?