|
1 | 1 | # PyGAD: Genetic Algorithm in Python |
2 | 2 |
|
3 | | -[PyGAD](https://pypi.org/project/pygad) is an open-source easy-to-use Python 3 library for building the genetic algorithm and optimizing machine learning algorithms. It supports Keras and PyTorch. PyGAD supports optimizing both single-objective and multi-objective problems. |
| 3 | +[PyGAD](https://pypi.org/project/pygad) is an open-source, easy-to-use Python 3 library for building the genetic algorithm and optimizing machine learning algorithms. It supports Keras and PyTorch, and it can optimize both single-objective and multi-objective problems. |
4 | 4 |
|
5 | 5 | > Try [Vilvik](https://vilvik.com), a free cloud-based tool powered by PyGAD. It makes optimization easier by reducing or removing the need for coding, and it shows helpful visualizations. |
6 | 6 |
|
7 | 7 | Read the [PyGAD documentation](https://pygad.readthedocs.io/en/latest). |
8 | 8 |
|
9 | 9 | [](https://pepy.tech/project/pygad) []( |
10 | | -https://anaconda.org/conda-forge/PyGAD) [](https://badge.fury.io/py/pygad)[](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/main.yml) [](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/release.yml) [](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/scorecard.yml) [](https://opensource.org/licenses/BSD-3-Clause) [](https://hosted.weblate.org/engage/weblate/) [](https://api.reuse.software/info/github.com/WeblateOrg/weblate) []( |
| 10 | +https://anaconda.org/conda-forge/PyGAD) [](https://badge.fury.io/py/pygad)[](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/main.yml) [](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/release.yml) [](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/scorecard.yml) [](https://opensource.org/licenses/BSD-3-Clause) [](https://hosted.weblate.org/engage/weblate/) [](https://api.reuse.software/info/github.com/WeblateOrg/weblate) []( |
11 | 11 | https://stackoverflow.com/questions/tagged/pygad) [](https://securityscorecards.dev/viewer/?uri=github.com/ahmedfgad/GeneticAlgorithmPython) [](https://doi.org/10.1007/s11042-023-17167-y) |
12 | 12 |
|
13 | 13 |  |
@@ -60,11 +60,11 @@ Please check the **Contact Us** section for more contact details. |
60 | 60 |
|
61 | 61 | # Life Cycle of PyGAD |
62 | 62 |
|
63 | | -The next figure shows the main stages in the life cycle of a `pygad.GA` instance. PyGAD stops when all generations are completed or when the function passed to the `on_generation` parameter returns the string `stop`. |
| 63 | +The following figure shows the main stages in the life cycle of a `pygad.GA` instance. PyGAD stops when all generations are completed or when the function passed to the `on_generation` parameter returns the string `stop`. |
64 | 64 |
|
65 | 65 |  |
66 | 66 |
|
67 | | -The next code implements all the callback functions to trace the execution of the genetic algorithm. Each callback function prints its name. |
| 67 | +The following code implements all the callback functions to trace the execution of the genetic algorithm. Each callback function prints its name. |
68 | 68 |
|
69 | 69 | ```python |
70 | 70 | import pygad |
@@ -175,7 +175,7 @@ num_parents_mating = 7 # Number of solutions to be selected as parents in the ma |
175 | 175 |
|
176 | 176 | # To prepare the initial population, there are 2 ways: |
177 | 177 | # 1) Prepare it yourself and pass it to the initial_population parameter. This way is useful when the user wants to start the genetic algorithm with a custom initial population. |
178 | | -# 2) Assign valid integer values to the sol_per_pop and num_genes parameters. If the initial_population parameter exists, then the sol_per_pop and num_genes parameters are useless. |
| 178 | +# 2) Assign valid integer values to the sol_per_pop and num_genes parameters. If the initial_population parameter is used, then the sol_per_pop and num_genes parameters are ignored. |
179 | 179 | sol_per_pop = 50 # Number of solutions in the population. |
180 | 180 | num_genes = len(function_inputs) |
181 | 181 |
|
@@ -260,7 +260,7 @@ Read about training neural networks using the genetic algorithm through the tuto |
260 | 260 |
|
261 | 261 | ## Book: Practical Computer Vision Applications Using Deep Learning with CNNs |
262 | 262 |
|
263 | | -You can also check my book cited as [**Ahmed Fawzy Gad 'Practical Computer Vision Applications Using Deep Learning with CNNs'. Dec. 2018, Apress, 978-1-4842-4167-7**](https://www.amazon.com/Practical-Computer-Vision-Applications-Learning/dp/1484241665) which discusses neural networks, convolutional neural networks, deep learning, genetic algorithm, and more. |
| 263 | +You can also check my book cited as [**Ahmed Fawzy Gad 'Practical Computer Vision Applications Using Deep Learning with CNNs'. Dec. 2018, Apress, 978-1-4842-4167-7**](https://www.amazon.com/Practical-Computer-Vision-Applications-Learning/dp/1484241665) which discusses neural networks, convolutional neural networks, deep learning, genetic algorithms, and more. |
264 | 264 |
|
265 | 265 | Find the book at these links: |
266 | 266 |
|
|
0 commit comments