2
我已经使用Pyevolve进行了优化,并且在查看结果后,我想添加几代以获得更好的收敛性。由于评估时间很长,我想知道是否可以继续优化到最后一代,并增加20代。一切都必须在DB中设定,我希望他可以做到。使用pyevolve恢复优化
这里是我的GA性能(类似于第一个例子,但有一个更复杂的评价函数):
# Genome instance, 1D List of 6 elements
genome = G1DList.G1DList(6)
# Sets the range max and min of the 1D List
genome.setParams(rangemin=1, rangemax=15)
# The evaluator function (evaluation function)
genome.evaluator.set(eval_func)
# Genetic Algorithm Instance
ga=GSimpleGA.GSimpleGA(genome)
# Set the Roulette Wheel selector method, the number of generations and
# the termination criteria
ga.selector.set(Selectors.GRouletteWheel)
ga.setGenerations(50)
ga.setPopulationSize(10)
ga.terminationCriteria.set(GSimpleGA.ConvergenceCriteria)
# Sets the DB Adapter, the resetDB flag will make the Adapter recreate
# the database and erase all data every run, you should use this flag
# just in the first time, after the pyevolve.db was created, you can
# omit it.
sqlite_adapter = DBAdapters.DBSQLite(identify="F-Beam-Optimization", resetDB=True)
ga.setDBAdapter(sqlite_adapter)
# Do the evolution, with stats dump
# frequency of 5 generations
ga.evolve(freq_stats=2)
任何人的想法?
谢谢你的回答。我将对DEAP的进化能力有一个清晰的认识。评估功能相当长时,恢复一些优化是非常有帮助的。 – TazgerO
任何想法如何随着你一起去泡菜?这将是非常有帮助 – Anake
泡菜和DEAP?如果您有关于DEAP的特定问题,请使用用户组。 – mitch