Skip to content

Commit

Permalink
Correction to the lines include in the symbreg example documentation.
Browse files Browse the repository at this point in the history
--HG--
branch : dev
  • Loading branch information
fmder committed May 14, 2013
1 parent a2aa90b commit 566900e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions doc/examples/gp_symbreg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ maximum of both the individuals fitness and size. For that we'll use a
:class:`~deap.tools.MultiStatistics` object.

.. literalinclude:: /code/examples/gp/gp_symbreg.py
:lines: 77-83
:lines: 77-86

Note that a simple :class:`~deap.tools.Statistics` object can be used, as in
previous examples when statistics over a single key are desired.
Expand All @@ -144,13 +144,13 @@ creating the population and then calling a complete algorithm. In this case,
we'll use :func:`~deap.algorithms.eaSimple`.

.. literalinclude:: /code/examples/gp/gp_symbreg.py
:lines: 61, 73-87
:lines: 71,74,75,88-91


The hall of fame is a specific structure which contains the *n* best
individuals (here, the best one only).

The complete example : [`source code <code/gp/gp_symbreg.py>`_].
The complete [`source code <code/gp/gp_symbreg.py>`_].


.. _refPapersSymbreg:
Expand Down
5 changes: 5 additions & 0 deletions doc/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ Here is a (incomplete) log of the changes made to DEAP over time.
To be released 1.0
==================

- Changed the way statistics are handled and printed. See the
:class:`~deap.tools.Statistics` and :class:`~deap.tools.MultiStatistics`
documentation for more details.
- Removed the EvolutionLogger, which functionalities are now handled by
by the ``__str__`` function of statistics objects.
- Added object oriented inheritance to strongly typed genetic programming.
- Added the possibility to name primitives added to a PrimitiveSet.
- Added the pset to GP mutation operators that require it.
Expand Down
3 changes: 2 additions & 1 deletion examples/gp/gp_symbreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def main():
stats_fit.setColumns("avg", "max", "min", "std")
stats_size.setColumns("avg", "max", "min", "std")

algorithms.eaSimple(pop, toolbox, 0.5, 0.1, 40, mstats, halloffame=hof, verbose=True)
algorithms.eaSimple(pop, toolbox, 0.5, 0.1, 40, stats=mstats,
halloffame=hof, verbose=True)

return pop, mstats, hof

Expand Down

0 comments on commit 566900e

Please sign in to comment.