source:
framspy/evolalg/statistics/halloffame_stats.py
@
1113
Last change on this file since 1113 was 1113, checked in by , 4 years ago | |
---|---|
File size: 409 bytes |
Rev | Line | |
---|---|---|
[1113] | 1 | from evolalg.statistics.halloffame_custom import HallOfFameCustom |
2 | from evolalg.statistics.statistics import Statistics | |
3 | ||
4 | ||
5 | class HallOfFameStatistics(Statistics): | |
6 | def __init__(self, size, fields="fitness"): | |
7 | self.haloffame = HallOfFameCustom(size, fitness_field=fields) | |
8 | ||
9 | def init(self): | |
10 | self.haloffame.clear() | |
11 | ||
12 | def collect(self, population): | |
13 | self.haloffame.update(population) |
Note: See TracBrowser
for help on using the repository browser.