Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Genetic Algorithms with Python

You're reading from   Hands-On Genetic Algorithms with Python Applying genetic algorithms to solve real-world deep learning and artificial intelligence problems

Arrow left icon
Product type Paperback
Published in Jan 2020
Publisher Packt
ISBN-13 9781838557744
Length 346 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Eyal Wirsansky Eyal Wirsansky
Author Profile Icon Eyal Wirsansky
Eyal Wirsansky
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Section 1: The Basics of Genetic Algorithms
2. An Introduction to Genetic Algorithms FREE CHAPTER 3. Understanding the Key Components of Genetic Algorithms 4. Section 2: Solving Problems with Genetic Algorithms
5. Using the DEAP Framework 6. Combinatorial Optimization 7. Constraint Satisfaction 8. Optimizing Continuous Functions 9. Section 3: Artificial Intelligence Applications of Genetic Algorithms
10. Enhancing Machine Learning Models Using Feature Selection 11. Hyperparameter Tuning of Machine Learning Models 12. Architecture Optimization of Deep Learning Networks 13. Reinforcement Learning with Genetic Algorithms 14. Section 4: Related Technologies
15. Genetic Image Reconstruction 16. Other Evolutionary and Bio-Inspired Computation Techniques 17. Other Books You May Enjoy

Using the creator module

The first powerful tool provided by the DEAP framework is the creator module. The creator module is used as a meta-factory, and it enables us to extend existing classes by augmenting them with new attributes.

For example, suppose we have a class called Employee. Using the creator tool, we can extend the Employee class by creating a Developer class as follows:

from deap import creator
creator.create("Developer", Employee, position = "Developer", programmingLanguages = set)

The first argument passed to the create() function is the desired name for the new class. The second argument is the existing class to be extended. Then, each additional argument defines an attribute for the new class. If the argument is assigned a class (such as a dict or a set), it will be added to the new class as an instant attribute initialized in the constructor...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime