Skip to content

Commit

Permalink
Merge pull request DEAP#716 from bje-/codespell-fixes
Browse files Browse the repository at this point in the history
Fix spelling errors found with codespell
  • Loading branch information
fmder authored Jul 28, 2023
2 parents 90b2765 + 3e852bd commit 8eff628
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions deap/cma.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ class StrategyActiveOnePlusLambda(object):
| ``d`` | ``1.0 + N / (2.0 * | Damping for step-size. |
| | lambda_)`` | |
+----------------+---------------------------+------------------------------+
| ``ptarg`` | ``1.0 / (5 + sqrt(lambda_)| Taget success rate |
| ``ptarg`` | ``1.0 / (5 + sqrt(lambda_)| Target success rate |
| | / 2.0)`` | (from 1 + lambda algorithm). |
+----------------+---------------------------+------------------------------+
| ``cp`` | ``ptarg * lambda_ / (2.0 +| Step size learning rate. |
Expand Down Expand Up @@ -695,7 +695,7 @@ def generate(self, ind_init):
def _integer_mutation(self):
n_I_R = self.i_I_R.shape[0]

# Mixed integer CMA-ES is developped for (mu/mu , lambda)
# Mixed integer CMA-ES is developed for (mu/mu , lambda)
# We have a (1 + lambda) setting, thus we make the integer mutation
# probabilistic. The integer mutation is lambda / 2 if all dimensions
# are integers or min(lambda / 2 - 1, lambda / 10 + n_I_R + 1). The minus
Expand Down Expand Up @@ -728,7 +728,7 @@ def _integer_mutation(self):
R_int = I_pm1 * (Rp + Rpp)

# Usually in mu/mu, lambda the last individual is set to the step taken.
# We don't use this sheme in the 1 + lambda scheme
# We don't use this scheme in the 1 + lambda scheme
# if self.update_count > 0:
# R_int[-1, :] = (numpy.floor(-self.S_int - self.last_best)
# - numpy.floor(-self.S_int - self.centroid))
Expand Down
2 changes: 1 addition & 1 deletion examples/es/cma_mo.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def main():
interactive = 0
if not interactive:
import matplotlib as mpl_tmp
mpl_tmp.use('Agg') # Force matplotlib to not use any Xwindows backend.
mpl_tmp.use('Agg') # Force matplotlib to not use any X backend.
import matplotlib.pyplot as plt

fig = plt.figure()
Expand Down
8 changes: 4 additions & 4 deletions examples/gp/parity.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
for i in range(PARITY_SIZE_M):
inputs[i] = [None] * PARITY_FANIN_M
value = i
dividor = PARITY_SIZE_M
divisor = PARITY_SIZE_M
parity = 1
for j in range(PARITY_FANIN_M):
dividor /= 2
if value >= dividor:
divisor /= 2
if value >= divisor:
inputs[i][j] = 1
parity = int(not parity)
value -= dividor
value -= divisor
else:
inputs[i][j] = 0
outputs[i] = parity
Expand Down

0 comments on commit 8eff628

Please sign in to comment.