My Account Log in

1 option

Hands-On Genetic Algorithms with Python : Apply Genetic Algorithms to Solve Real-World AI and Machine Learning Problems / Eyal Wirsansky.

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Wirsansky, Eyal, author.
Language:
English
Subjects (All):
Genetic algorithms.
Genetic programming (Computer science).
Python (Computer program language).
Physical Description:
1 online resource (419 pages)
Edition:
Second edition.
Place of Publication:
Birmingham, England : Packt Publishing, 2024.
System Details:
Mode of access: World Wide Web.
Biography/History:
Wirsansky Eyal: Eyal Wirsansky is a senior data scientist, an experienced software engineer, a technology community leader, and an artificial intelligence researcher. Eyal began his software engineering career over twenty-five years ago as a pioneer in the field of Voice over IP. He currently works as a member of the data platform team at Gradle, Inc. During his graduate studies, he focused his research on genetic algorithms and neural networks. A notable result of this research is a novel supervised machine learning algorithm that integrates both approaches. In addition to his professional roles, Eyal serves as an adjunct professor at Jacksonville University, where he teaches a class on artificial intelligence. He also leads both the Jacksonville, Florida Java User Group and the Artificial Intelligence for Enterprise virtual user group, and authors the developer-focused artificial intelligence blog, ai4java.
Summary:
Written by Eyal Wirsansky, a senior data scientist and AI researcher with over 25 years of experience and a research background in genetic algorithms and neural networks, Hands-On Genetic Algorithms with Python offers expert insights and practical knowledge to master genetic algorithms. After an introduction to genetic algorithms and their principles of operation, you’ll find out how they differ from traditional algorithms and the types of problems they can solve, followed by applying them to search and optimization tasks such as planning, scheduling, gaming, and analytics. As you progress, you’ll delve into explainable AI and apply genetic algorithms to AI to improve machine learning and deep learning models, as well as tackle reinforcement learning and NLP tasks. This updated second edition further expands on applying genetic algorithms to NLP and XAI and speeding up genetic algorithms with concurrency and cloud computing. You’ll also get to grips with the NEAT algorithm. The book concludes with an image reconstruction project and other related technologies for future applications. By the end of this book, you’ll have gained hands-on experience in applying genetic algorithms across a variety of fields, with emphasis on artificial intelligence with Python.
Contents:
Cover
Title page
Copyright and credits
Contributors
Table of Contents
Preface
Part 1: The Basics of Genetic Algorithms
Chapter 1: An Introduction to Genetic Algorithms
What are genetic algorithms?
Darwinian evolution
The genetic algorithms analogy
The theory behind genetic algorithms
The schema theorem
Differences from traditional algorithms
Population-based
Genetic representation
Fitness function
Probabilistic behavior
Advantages of genetic algorithms
Global optimization
Handling complex problems
Handling a lack of mathematical representation
Resilience to noise
Parallelism
Continuous learning
Limitations of genetic algorithms
Special definitions
Hyperparameter tuning
Computationally intensive
Premature convergence
No guaranteed solution
Use cases for genetic algorithms
Summary
Further reading
Chapter 2: Understanding the Key Components of Genetic Algorithms
The basic flow of a genetic algorithm
Creating the initial population
Calculating the fitness
Applying selection, crossover, and mutation
Checking the stopping conditions
Selection methods
Roulette wheel selection
Stochastic universal sampling
Rank-based selection
Fitness scaling
Tournament selection
Crossover methods
Single-point crossover
Two-point and k-point crossover
Uniform crossover
Crossover for ordered lists
Mutation methods
Flip-bit mutation
Swap mutation
Inversion mutation
Scramble mutation
Real-coded genetic algorithms
Blend crossover
Simulated binary crossover
Real mutation
Understanding elitism
Niching and sharing
Serial niching versus parallel niching
The art of solving problems using genetic algorithms
Part 2: Solving Problems with Genetic Algorithms.
Chapter 3: Using the DEAP Framework
Technical requirements
Python version
Using a virtual environment
Installing the necessary libraries
Introduction to DEAP
Using the creator module
Creating the Fitness class
Creating the Individual class
Using the Toolbox class
Creating genetic operators
Creating the population
The OneMax problem
Solving the OneMax problem with DEAP
Choosing the chromosome
Choosing the genetic operators
Setting the stopping condition
Implementing with DEAP
Using built-in algorithms
The Statistics object
The algorithm
The logbook
Running the program
Adding the hall of fame feature
Experimenting with the algorithm's settings
Population size and number of generations
Crossover operator
Mutation operator
Selection operator
Chapter 4: Combinatorial Optimization
Search problems and combinatorial optimization
Solving the knapsack problem
The Rosetta Code knapsack 0-1 problem
Solution representation
Python problem representation
Genetic algorithm solution
Solving the TSP
TSPLIB benchmark files
Improving the results with enhanced exploration and elitism
Solving the VRP
Chapter 5: Constraint Satisfaction
Constraint satisfaction in search problems
Solving the N-Queens problem
Genetic algorithms solution
Solving the nurse scheduling problem
Hard constraints versus soft constraints.
Python problem representation
Solving the graph coloring problem
Using hard and soft constraints for the graph coloring problem
Chapter 6: Optimizing Continuous Functions
Chromosomes and genetic operators for real numbers
Using DEAP with continuous functions
Optimizing the Eggholder function
Optimizing the Eggholder function with genetic algorithms
Improving the speed with an increased mutation rate
Optimizing Himmelblau's function
Optimizing Himmelblau's function with genetic algorithms
Using niching and sharing to find multiple solutions
Simionescu's function and constrained optimization
Constrained optimization with genetic algorithms
Optimizing Simionescu's function using genetic algorithms
Using constraints to find multiple solutions
Part 3: Artificial Intelligence Applications of Genetic Algorithms
Chapter 7: Enhancing Machine Learning Models Using Feature Selection
Supervised machine learning
Classification
Regression
Supervised learning algorithms
Feature selection in supervised learning
Selecting the features for the Friedman-1 regression problem
Selecting the features for classifying the Zoo dataset
Chapter 8: Hyperparameter Tuning of Machine Learning Models
Hyperparameters in machine learning
The Wine dataset
The adaptive boosting classifier.
Tuning the hyperparameters using conventional versus genetic grid search
Testing the classifier's default performance
Running the conventional grid search
Running the genetic-algorithm-driven grid search
Tuning the hyperparameters using a direct genetic approach
Hyperparameter representation
Evaluating the classifier accuracy
Tuning the hyperparameters using genetic algorithms
Dedicated libraries
Chapter 9: Architecture Optimization of Deep Learning Networks
ANNs and DL
MLP
DL and convolutional NNs
Optimizing the architecture of a DL classifier
The Iris flower dataset
Representing the hidden layer configuration
Evaluating the classifier's accuracy
Optimizing the MLP architecture using genetic algorithms
Combining architecture optimization with hyperparameter tuning
Optimizing the MLP's combined configuration using genetic algorithms
Chapter 10: Reinforcement Learning with Genetic Algorithms
Reinforcement learning
Genetic algorithms and reinforcement learning
Gymnasium
The env interface
Solving the MountainCar environment
Evaluating the solution
The Python problem representation
Solving the CartPole environment
Controlling the CartPole with a neural network
Solution representation and evaluation
A genetic algorithm solution
Chapter 11: Natural Language Processing
Understanding NLP
Word embeddings
Word embeddings and genetic algorithms
Finding the mystery word using genetic algorithms
Python implementation.
Document classification
N-grams
Selecting a subset of n-grams
Using genetic algorithms to search for a fixed-size subset
Python implementation
Chapter 12: Explainable AI, Causality, and Counterfactuals with Genetic Algorithms
Unlocking the black box - XAI
Unraveling cause and effect - causality in AI
What-if scenarios - counterfactuals
Genetic algorithms in counterfactual analysis - navigating alternative scenarios
The German Credit Risk dataset
Exploring counterfactual scenarios for credit risk prediction
The Applicant class
The CreditRiskData class
Counterfactuals with genetic algorithms
The genetic algorithm solution
More "what-if" scenarios
Extending to other datasets
Part 4: Enhancing Performance with Concurrency and Cloud Strategies
Chapter 13: Accelerating Genetic Algorithms - the Power of Concurrency
Long runtimes in real-world genetic algorithms
Parallelizing genetic algorithms
Multithreading
Multiprocessing
Back to the OneMax problem
A baseline benchmark program
Simulating computational intensity
Multiprocessing using the Pool class
Increasing the number of processes
Multiprocessing using the SCOOP library
Distributed computing with SCOOP
Chapter 14: Beyond Local Resources - Scaling Genetic Algorithms in the Cloud
The next level in genetic algorithm performance -embracing a client-server architecture
Implementing a client-server model
Using a separate environment
Revisiting the One-Max problem, yet again
Creating the server component
Creating the client component
Running the asynchronous client
Using a production-grade app server.
Using the Gunicorn server.
Notes:
Includes index.
Includes bibliographical references and index.
Description based on publisher supplied metadata and other sources.
Description based on print version record.
ISBN:
9781805121572
180512157X
OCLC:
1449569980

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account