Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building of docs with the lastest numpy and sphinx #709

Merged
merged 14 commits into from
Jul 24, 2023
Prev Previous commit
Next Next commit
Fix CMA tanle miss align and conf modules
  • Loading branch information
fmder committed Jul 23, 2023
commit 8320b2aa390240069614a4a895205f0559b0e7ac
3 changes: 1 addition & 2 deletions deap/benchmarks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@ def ackley(individual):
* - Global optima
- :math:`x_i = 0, \forall i \in \lbrace 1 \ldots N\rbrace`, :math:`f(\mathbf{x}) = 0`
* - Function
- :math:`f(\mathbf{x}) = 20 - 20\exp\left(-0.2\sqrt{\frac{1}{N} \
\sum_{i=1}^N x_i^2} \right) + e - \exp\left(\frac{1}{N}\sum_{i=1}^N \cos(2\pi x_i) \right)`
- :math:`f(\mathbf{x}) = 20 - 20\exp\left(-0.2\sqrt{\frac{1}{N} \ \sum_{i=1}^N x_i^2} \right) + e - \exp\left(\frac{1}{N}\sum_{i=1}^N \cos(2\pi x_i) \right)`

.. plot:: code/benchmarks/ackley.py
:width: 67 %
Expand Down
6 changes: 3 additions & 3 deletions deap/cma.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class StrategyOnePlusLambda(object):
| ``d`` | ``1.0 + N / (2.0 * | Damping for step-size. |
| | lambda_)`` | |
+----------------+---------------------------+----------------------------+
| ``ptarg`` | ``1.0 / (5 + sqrt(lambda_)| Target success rate. |
| ``ptarg`` | ``1.0 / (5 + sqrt(lambda_)| Target success rate. |
| | / 2.0)`` | |
+----------------+---------------------------+----------------------------+
| ``cp`` | ``ptarg * lambda_ / (2.0 +| Step size learning rate. |
Expand All @@ -240,7 +240,7 @@ class StrategyOnePlusLambda(object):
+----------------+---------------------------+----------------------------+

.. [Igel2007] Igel, Hansen, Roth, 2007. Covariance matrix adaptation for
multi-objective optimization. *Evolutionary Computation* Spring;15(1):1-28
multi-objective optimization. *Evolutionary Computation* Spring;15(1):1-28

"""
def __init__(self, parent, sigma, **kargs):
Expand Down Expand Up @@ -346,7 +346,7 @@ class StrategyMultiObjective(object):
+================+===========================+============================+
| ``d`` | ``1.0 + N / 2.0`` | Damping for step-size. |
+----------------+---------------------------+----------------------------+
| ``ptarg`` | ``1.0 / (5 + 1.0 / 2.0)`` | Target success rate. |
| ``ptarg`` | ``1.0 / (5 + 1.0 / 2.0)`` | Target success rate. |
+----------------+---------------------------+----------------------------+
| ``cp`` | ``ptarg / (2.0 + ptarg)`` | Step size learning rate. |
+----------------+---------------------------+----------------------------+
Expand Down
3 changes: 1 addition & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
except ImportError:
pass
else:
extensions += ['matplotlib.sphinxext.only_directives',
'matplotlib.sphinxext.plot_directive']
extensions += ['matplotlib.sphinxext.plot_directive']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down