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 EDA example references
  • Loading branch information
fmder committed Jul 24, 2023
commit 0f05b73e693b22f71daaf01b0aea6a966ed09ce4
16 changes: 8 additions & 8 deletions doc/examples/eda.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ The basic concept concept behind EDA is to sample :math:`\lambda` individuals
with a certain distribution and estimate the problem distribution from the
:math:`\mu` best individuals. This really simple concept adhere to the
generate-update logic. The strategy contains a random number generator which
is adapted from the population. The following :class:`EDA` class do just that.
is adapted from the population. The following :class:`EMNA` class do just that.

.. literalinclude:: /../examples/eda/fctmin.py
:pyobject: EDA
.. literalinclude:: /../examples/eda/emna.py
:pyobject: EMNA

A normal random number generator is initialized with a certain mean
(*centroid*) and standard deviation (*sigma*) for each
(*centroid*) and standard deviation (*sigma*) for each
dimension. The :meth:`generate` method uses numpy to generate *lambda_*
sequences in *dim* dimensions, then the sequences are used to initialize
individuals of class given in the *ind_init* argument. Finally, the
Expand All @@ -37,19 +37,19 @@ Two classes are needed, a minimization fitness and a individual that will
combine the fitness and the real values. Moreover, we will use
:class:`numpy.ndarray` as base class for our individuals.

.. literalinclude:: /../examples/eda/fctmin.py
.. literalinclude:: /../examples/eda/emna.py
:lines: 28-29

Operators
=========

The :func:`~deap.algorithms.eaGenerateUpdate` algorithm requires to set in a
toolbox an evaluation function, an generation method and an update method.
We will use the method of an initialized :class:`EDA`. For the generate
We will use the method of an initialized :class:`EMNA`. For the generate
method, we set the class that the individuals are transferred in to our
:class:`Individual` class containing a fitness.

.. literalinclude:: /../examples/eda/fctmin.py
.. literalinclude:: /../examples/eda/emna.py
:pyobject: main

The complete :example:`eda/fctmin`.
The complete :example:`eda/fctmin`.