Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitde8d5be

Browse files
committed
Merge branch 'github-actions' ofhttps://github.com/ahmedfgad/GeneticAlgorithmPython into github-actions
2 parentsfc842aa +ee434cb commitde8d5be

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

‎docs/source/pygad.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,10 +1037,11 @@ Let's discuss how to do each of these steps.
10371037
Preparing the ``fitness_func`` Parameter
10381038
-----------------------------------------
10391039

1040-
Even though some steps in the genetic algorithm pipeline can work the
1041-
same regardless of the problem being solved, one critical step is the
1042-
calculation of the fitness value. There is no unique way of calculating
1043-
the fitness value and it changes from one problem to another.
1040+
Even though some steps in the genetic algorithm pipeline can
1041+
work the same regardless of the problem being solved, one critical step
1042+
is the calculation of the fitness value. There is no unique way of
1043+
calculating the fitness value and it changes from one problem to
1044+
another.
10441045

10451046
PyGAD has a parameter called ``fitness_func`` that allows the user to
10461047
specify a custom function/method to use when calculating the fitness.

‎docs/source/pygad_more.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,6 @@ After running the code again, it will find the same result.
632632
0.04872203136549972
633633
634634
Continue without Losing Progress
635-
================================
636635

637636
In `PyGAD
638637
2.18.0 <https://pygad.readthedocs.io/en/latest/releases.html#pygad-2-18-0>`__,

‎pygad/pygad.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ def __init__(self,
726726
ifself.mutation_probabilityisNone:
727727
ifnotself.suppress_warnings:
728728
warnings.warn(
729-
f"The percentage of genes to mutate (mutation_percent_genes={mutation_percent_genes})resutled in selecting ({mutation_num_genes}) genes. The number of genes to mutate is set to 1 (mutation_num_genes=1).\nIf you do not want to mutate any gene, please set mutation_type=None.")
729+
f"The percentage of genes to mutate (mutation_percent_genes={mutation_percent_genes})resulted in selecting ({mutation_num_genes}) genes. The number of genes to mutate is set to 1 (mutation_num_genes=1).\nIf you do not want to mutate any gene, please set mutation_type=None.")
730730
mutation_num_genes=1
731731

732732
eliftype(mutation_percent_genes)inGA.supported_int_float_types:
@@ -745,7 +745,7 @@ def __init__(self,
745745
ifmutation_num_genes==0:
746746
ifself.mutation_probabilityisNone:
747747
ifnotself.suppress_warnings:
748-
warnings.warn(f"The percentage of genes to mutate (mutation_percent_genes={mutation_percent_genes})resutled in selecting ({mutation_num_genes}) genes. The number of genes to mutate is set to 1 (mutation_num_genes=1).\nIf you do not want to mutate any gene, please set mutation_type=None.")
748+
warnings.warn(f"The percentage of genes to mutate (mutation_percent_genes={mutation_percent_genes})resulted in selecting ({mutation_num_genes}) genes. The number of genes to mutate is set to 1 (mutation_num_genes=1).\nIf you do not want to mutate any gene, please set mutation_type=None.")
749749
mutation_num_genes=1
750750
else:
751751
self.valid_parameters=False
@@ -771,7 +771,7 @@ def __init__(self,
771771
# Based on the mutation percentage of genes, if the number of selected genes for mutation is less than the least possible value which is 1, then the number will be set to 1.
772772
ifmutation_num_genes[idx]==0:
773773
ifnotself.suppress_warnings:
774-
warnings.warn(f"The percentage of genes to mutate ({mutation_percent_genes[idx]})resutled in selecting ({mutation_num_genes[idx]}) genes. The number of genes to mutate is set to 1 (mutation_num_genes=1).\nIf you do not want to mutate any gene, please set mutation_type=None.")
774+
warnings.warn(f"The percentage of genes to mutate ({mutation_percent_genes[idx]})resulted in selecting ({mutation_num_genes[idx]}) genes. The number of genes to mutate is set to 1 (mutation_num_genes=1).\nIf you do not want to mutate any gene, please set mutation_type=None.")
775775
mutation_num_genes[idx]=1
776776
ifmutation_percent_genes[0]<mutation_percent_genes[1]:
777777
ifnotself.suppress_warnings:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp