January 2020
Intermediate to advanced
346 pages
9h 8m
English
The first change we will make is in the way statistics are being gathered. To this end, we will now take advantage of the tools.Statistics class provided by DEAP. This utility enables us to create a statistics object using a key argument, which is a function that will be applied to the data on which the statistics are computed:
stats = tools.Statistics(lambda ind: ind.fitness.values)
Read now
Unlock full access