SlideShare une entreprise Scribd logo
1  sur  17
GeneticioMake something of your big data
Use genetic algorithms to reach your business goals
Geneticio
• Autodidacte, passionné de développement
• Java, Cassandra, Spark, JPPF
• @jsebrien, julien.sebrien@genetic.io
• Développe et distribue des solutions IT (SaaS, On Premise)
permettant l’implémentation d'algorithmes génétiques,
permettant l’optimisation de processus métiers
• Architecture nativement distribuée
• Multi-plateforme (Windows, Unix, Mac), polyglotte (Java, Scala,
Python, Javascript, R)
Geneticio
Make something of your big data
Julien Sebrien
Paris Datageeks, 5 octobre 2016
Domaines d’applications
• Appartiennent à la famille des algorithmes évolutionnistes
• Permettent d'obtenir une solution approchée à un problème d'optimisation, lorsqu'il
n'existe pas de méthode exacte (ou que la solution est inconnue) pour le résoudre en un
temps raisonnable
Geneticio
Make something of your big data
Définition
Paris Datageeks, 5 octobre 2016
Marketing
Détermination des meilleures implantations de sites touristiques
https://goo.gl/aCc9SJ
Détection d’orbites de satellite
https://goo.gl/eauC32
Astronautique
Et bien d’autres : Bio-Informatique, Imagerie, Linguistique, etc.
https://en.wikipedia.org/wiki/List_of_genetic_algorithm_applications
Déroulement
Sélection
Croisement
Mutation
Evaluation
Terminé ?
Non
Génération de la population initiale
FIN
Oui
Geneticio
Make something of your big data
Paris Datageeks, 5 octobre 2016
Sélection
Geneticio
Make something of your big data
Paris Datageeks, 5 octobre 2016
Plusieurs manières de sélectionner des individus existent: proportion au score de fitness,
Tournoi, Classement, etc.
Exemple Tournoi :
• Sélectionne aléatoirement 2 individus de la population.
• Génère une valeur aléatoire afin de décider si l’on sélectionne l’individu le plus faible ou le
plus fort (selon leur score).
• Ajoute l’individu choisi à la sélection courante. Les 2 individus précédents sont ré-insérés
dans la population initiale afin de pouvoir être re-sélectionnés par la suite.
Croisement
Geneticio
Make something of your big data
Paris Datageeks, 5 octobre 2016
 
NE N E NE S W SW E
 
 
E NE N NW W E E NW
 
 
NE N E NE S E E NW
 
 
E NE N NW W W SW E
 
parent 1 parent 2
enfant 1 enfant 2
1 point de croisement 1 point de croisement
Mutation
Geneticio
Make something of your big data
Paris Datageeks, 5 octobre 2016
• Injecte de la diversité au sein de la population, permettant de
réduire le risque de stagner au sein d’un optimum local.
• Taux de mutation de l'ordre de 1%.
Graphique extrait de: http://www.codeproject.com/Articles/707505/Genetic-Algorithms-Demystified
… W …
… E …
enfant 2
Evaluation
Geneticio
Make something of your big data
Paris Datageeks, 5 octobre 2016
• Fonction de fitness, évaluant la qualité de chaque individu, son adaptation au contexte du
problème donné.
• Le score attribué est idéalement indépendant des autres individus de la population.
• Primordial afin d’accroître la probabilité de convergence de l'algorithme.
Terminaison
Geneticio
Make something of your big data
Paris Datageeks, 5 octobre 2016
L’algorithme se termine si l’une des conditions de terminaison suivantes est satisfaite:
• Un nombre maximum d’itérations de générations est atteint.
• Un candidat a un score de fitness supérieur ou égal à un seuil préalablement défini.
• L’algorithme s’exécute depuis une trop longue durée.
• Etc.
Exécutions
Geneticio
Make something of your big data
Paris Datageeks, 5 octobre 2016
Architecture
Geneticio
Make something of your big data
Paris Datageeks, 5 octobre 2016
Démarrage des jobs, récupération des résultats
Gestions des
comptes
utilisateur,
sources de
données, etc.
calcul des scores de fitness
C
hargem
entdes
candidats
(avec
data
localité)
C
hargem
ents
des
confs
des
jobs
Import de la population
Geneticio
Make something of your big data
Paris Datageeks, 5 octobre 2016
• Import de la population dans Cassandra 3.x, pilote Datastax 3.0.x
• Gestion de différentes sources (JDBC, fichier, upload, etc.)
• Conversion à la volée en types natifs Cassandra
• Utilisation de BoundStatement avec appels asynchrones
Chargement de la population (spark)
Geneticio
Make something of your big data
Paris Datageeks, 5 octobre 2016
• Utilisation du connecteur Datastax Spark/Cassandra
• Gestion de la data-localité
• Paramétrage :
 spark.serializer : KryoSerializer.class.getName())
 spark.io.compression.codec : "lzf"
 spark.executor.memory : configurable
 spark.cores.max : configurable
 spark.cassandra.input.split.size_in_mb : configurable (wiki : "... reflects the approximate
amount of Cassandra Data in any given Spark partition, défaut : 64mb)
Sélection des individus avec Spark
Geneticio
Make something of your big data
Paris Datageeks, 5 octobre 2016
Rappel des implémentations courantes :
 Tournoi
• Sélectionne aléatoirement 2 individus de la population, et choisi l’individu le plus faible ou le
plus fort (selon une variable aléatoire).
 Roulette
• chaque individu a d’autant plus de chances d’être sélectionné, pour la génération
suivante, que son score est élevé.
Spark ne propose pas d’opérations permettant d’implémenter ces
sélections efficacement !
Simulation en îles !
Geneticio
Make something of your big data
Paris Datageeks, 5 octobre 2016
Utilisation de mapPartitions :
• « Return a new distributed dataset formed by passing each element of the source through
a function func.»
• « Similar to map, but runs separately on each partition (block) of the RDD, so func must be
of type Iterator<T> => Iterator<U> when running on an RDD of type T. »
Implémentation :
• CassandraJavaRDD<CassandraRow> cassandraRowsRDD...
• List<...> orderedCandidates =
cassandraRowsRDD.mapPartitions(FlatMapFunction<java.util.Iterator<Individual>,Iter
ator<CassandraRow> rows> f).takeOrdered(max, <comparator>);
Source : "A Parallel Genetic Algorithm Based on Spark for Pairwise Test Suite Generation"
Rong-Zhi Qi 1 , Member, CCF, Zhi-Jian Wang 1 , Member, IEEE, and Shui-Yan Li 2
College of Computer and Information, Hohai University, Nanjing 211106, China
College of Science, Hohai University, Nanjing 211106, China
Received March 18, 2015; revised September 25, 2015.
http://jcst.ict.ac.cn:8080/jcst/EN/article/downloadArticleFile.do?attachType=PDF&id=9932
Avantages
Geneticio
Make something of your big data
Paris Datageeks, 5 octobre 2016
• Exécute l’algorithme sur des sous-ensembles de la population globale, avec taille
paramétrable
• Scalable horizontalement
• Permets une configuration fine de la simulation, avec sélections interchangeables
• Suivi des simulations via la console Spark
Demo ! genetic.io/fr/demo
Twitter : @geneticio
Mail : contact@genetic.io
Web : genetic.io/fr
GeneticioMake something of your big data

Contenu connexe

En vedette

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

En vedette (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Les algorithmes génétiques avec Geneticio - Paris Datageeks / Microsoft Experiences 2016

  • 1. GeneticioMake something of your big data Use genetic algorithms to reach your business goals
  • 2. Geneticio • Autodidacte, passionné de développement • Java, Cassandra, Spark, JPPF • @jsebrien, julien.sebrien@genetic.io • Développe et distribue des solutions IT (SaaS, On Premise) permettant l’implémentation d'algorithmes génétiques, permettant l’optimisation de processus métiers • Architecture nativement distribuée • Multi-plateforme (Windows, Unix, Mac), polyglotte (Java, Scala, Python, Javascript, R) Geneticio Make something of your big data Julien Sebrien Paris Datageeks, 5 octobre 2016
  • 3. Domaines d’applications • Appartiennent à la famille des algorithmes évolutionnistes • Permettent d'obtenir une solution approchée à un problème d'optimisation, lorsqu'il n'existe pas de méthode exacte (ou que la solution est inconnue) pour le résoudre en un temps raisonnable Geneticio Make something of your big data Définition Paris Datageeks, 5 octobre 2016 Marketing Détermination des meilleures implantations de sites touristiques https://goo.gl/aCc9SJ Détection d’orbites de satellite https://goo.gl/eauC32 Astronautique Et bien d’autres : Bio-Informatique, Imagerie, Linguistique, etc. https://en.wikipedia.org/wiki/List_of_genetic_algorithm_applications
  • 4. Déroulement Sélection Croisement Mutation Evaluation Terminé ? Non Génération de la population initiale FIN Oui Geneticio Make something of your big data Paris Datageeks, 5 octobre 2016
  • 5. Sélection Geneticio Make something of your big data Paris Datageeks, 5 octobre 2016 Plusieurs manières de sélectionner des individus existent: proportion au score de fitness, Tournoi, Classement, etc. Exemple Tournoi : • Sélectionne aléatoirement 2 individus de la population. • Génère une valeur aléatoire afin de décider si l’on sélectionne l’individu le plus faible ou le plus fort (selon leur score). • Ajoute l’individu choisi à la sélection courante. Les 2 individus précédents sont ré-insérés dans la population initiale afin de pouvoir être re-sélectionnés par la suite.
  • 6. Croisement Geneticio Make something of your big data Paris Datageeks, 5 octobre 2016   NE N E NE S W SW E     E NE N NW W E E NW     NE N E NE S E E NW     E NE N NW W W SW E   parent 1 parent 2 enfant 1 enfant 2 1 point de croisement 1 point de croisement
  • 7. Mutation Geneticio Make something of your big data Paris Datageeks, 5 octobre 2016 • Injecte de la diversité au sein de la population, permettant de réduire le risque de stagner au sein d’un optimum local. • Taux de mutation de l'ordre de 1%. Graphique extrait de: http://www.codeproject.com/Articles/707505/Genetic-Algorithms-Demystified … W … … E … enfant 2
  • 8. Evaluation Geneticio Make something of your big data Paris Datageeks, 5 octobre 2016 • Fonction de fitness, évaluant la qualité de chaque individu, son adaptation au contexte du problème donné. • Le score attribué est idéalement indépendant des autres individus de la population. • Primordial afin d’accroître la probabilité de convergence de l'algorithme.
  • 9. Terminaison Geneticio Make something of your big data Paris Datageeks, 5 octobre 2016 L’algorithme se termine si l’une des conditions de terminaison suivantes est satisfaite: • Un nombre maximum d’itérations de générations est atteint. • Un candidat a un score de fitness supérieur ou égal à un seuil préalablement défini. • L’algorithme s’exécute depuis une trop longue durée. • Etc.
  • 10. Exécutions Geneticio Make something of your big data Paris Datageeks, 5 octobre 2016
  • 11. Architecture Geneticio Make something of your big data Paris Datageeks, 5 octobre 2016 Démarrage des jobs, récupération des résultats Gestions des comptes utilisateur, sources de données, etc. calcul des scores de fitness C hargem entdes candidats (avec data localité) C hargem ents des confs des jobs
  • 12. Import de la population Geneticio Make something of your big data Paris Datageeks, 5 octobre 2016 • Import de la population dans Cassandra 3.x, pilote Datastax 3.0.x • Gestion de différentes sources (JDBC, fichier, upload, etc.) • Conversion à la volée en types natifs Cassandra • Utilisation de BoundStatement avec appels asynchrones
  • 13. Chargement de la population (spark) Geneticio Make something of your big data Paris Datageeks, 5 octobre 2016 • Utilisation du connecteur Datastax Spark/Cassandra • Gestion de la data-localité • Paramétrage :  spark.serializer : KryoSerializer.class.getName())  spark.io.compression.codec : "lzf"  spark.executor.memory : configurable  spark.cores.max : configurable  spark.cassandra.input.split.size_in_mb : configurable (wiki : "... reflects the approximate amount of Cassandra Data in any given Spark partition, défaut : 64mb)
  • 14. Sélection des individus avec Spark Geneticio Make something of your big data Paris Datageeks, 5 octobre 2016 Rappel des implémentations courantes :  Tournoi • Sélectionne aléatoirement 2 individus de la population, et choisi l’individu le plus faible ou le plus fort (selon une variable aléatoire).  Roulette • chaque individu a d’autant plus de chances d’être sélectionné, pour la génération suivante, que son score est élevé. Spark ne propose pas d’opérations permettant d’implémenter ces sélections efficacement !
  • 15. Simulation en îles ! Geneticio Make something of your big data Paris Datageeks, 5 octobre 2016 Utilisation de mapPartitions : • « Return a new distributed dataset formed by passing each element of the source through a function func.» • « Similar to map, but runs separately on each partition (block) of the RDD, so func must be of type Iterator<T> => Iterator<U> when running on an RDD of type T. » Implémentation : • CassandraJavaRDD<CassandraRow> cassandraRowsRDD... • List<...> orderedCandidates = cassandraRowsRDD.mapPartitions(FlatMapFunction<java.util.Iterator<Individual>,Iter ator<CassandraRow> rows> f).takeOrdered(max, <comparator>); Source : "A Parallel Genetic Algorithm Based on Spark for Pairwise Test Suite Generation" Rong-Zhi Qi 1 , Member, CCF, Zhi-Jian Wang 1 , Member, IEEE, and Shui-Yan Li 2 College of Computer and Information, Hohai University, Nanjing 211106, China College of Science, Hohai University, Nanjing 211106, China Received March 18, 2015; revised September 25, 2015. http://jcst.ict.ac.cn:8080/jcst/EN/article/downloadArticleFile.do?attachType=PDF&id=9932
  • 16. Avantages Geneticio Make something of your big data Paris Datageeks, 5 octobre 2016 • Exécute l’algorithme sur des sous-ensembles de la population globale, avec taille paramétrable • Scalable horizontalement • Permets une configuration fine de la simulation, avec sélections interchangeables • Suivi des simulations via la console Spark
  • 17. Demo ! genetic.io/fr/demo Twitter : @geneticio Mail : contact@genetic.io Web : genetic.io/fr GeneticioMake something of your big data