You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-10
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
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.
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.
4
4
5
5
Check documentation of the [PyGAD](https://pygad.readthedocs.io/en/latest).
6
6
@@ -146,7 +146,7 @@ on_stop()
146
146
147
147
# Example
148
148
149
-
Check the [PyGAD's documentation](https://pygad.readthedocs.io/en/latest/pygad.html) for information about the implementation of this example.
149
+
Check the [PyGAD's documentation](https://pygad.readthedocs.io/en/latest/pygad.html) for information about the implementation of this example. It solves a single-objective problem.
print("Predicted output based on the best solution : {prediction}".format(prediction=prediction))
212
+
print(f"Predicted output based on the best solution : {prediction}")
213
213
214
214
if ga_instance.best_solution_generation !=-1:
215
-
print("Best fitness value reached after {best_solution_generation} generations.".format(best_solution_generation=ga_instance.best_solution_generation))
215
+
print(g"Best fitness value reached after {ga_instance.best_solution_generation} generations.")
216
216
217
217
# Saving the GA instance.
218
218
filename ='genetic'# The filename to which the instance is saved. The name is without extension.
print("Parameters of the best solution : {solution}".format(solution=solution))
646
-
print("Fitness value of the best solution = {solution_fitness}".format(solution_fitness=solution_fitness))
647
-
print("Index of the best solution : {solution_idx}".format(solution_idx=solution_idx))
645
+
print(f"Parameters of the best solution : {solution}")
646
+
print(f"Fitness value of the best solution = {solution_fitness}")
647
+
print(f"Index of the best solution : {solution_idx}")
648
648
649
649
if ga_instance.best_solution_generation !=-1:
650
-
print("Best fitness value reached after {best_solution_generation} generations.".format(best_solution_generation=ga_instance.best_solution_generation))
650
+
print(f"Best fitness value reached after {ga_instance.best_solution_generation} generations.")
651
651
652
652
# Predicting the outputs of the data using the best solution.
0 commit comments