""" Static Limit for GP Tree """ MAX_HEIGHT = 17 # Koza 1999 self.toolbox.decorate("mate", deap.gp.staticLimit(operator.attrgetter('height'), MAX_HEIGHT)) self.toolbox.decorate("mutate", deap.gp.staticLimit(operator.attrgetter('height'), MAX_HEIGHT))
Traceback (most recent call last): File "mysoftware.py", line 209, in <module> offspring, log = engine.run(options.ngen) File "/home/hpc3019/development/myproject/engine.py", line 133, in run timelimit=self.options.timelimit File "/home/hpc3019/development/myproject/evoalgo.py", line 96, in eaFortin fitnesses = toolbox.map(toolbox.evaluate, invalid_ind) File "/home/hpc3019/development/myproject/stgpfitness.py", line 160, in fitnessfunction pattern = self.toolbox.compile(expr=program) File "/home/hpc3019/.local/lib/python2.6/site-packages/deap/gp.py", line 464, in compile return eval(code, pset.context, {})
--
You received this message because you are subscribed to the Google Groups "deap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deap-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
MemoryError: DEAP : Error in tree evaluation : Python cannot evaluate a tree higher than 90. To avoid this problem, you should use bloat control on your operators. See the DEAP documentation for more information. DEAP will now abort. try:
return eval(code, pset.context, {})
except MemoryError:
_, _, traceback = sys.exc_info()real 900m32.246suser 899m26.060ssys 0m32.833s1757 50 0.977758 1 0.926626 0.0199056 -3618.73 -687.94 -5565.8 1418.561758 50 0.977758 1 0.926626 0.0199056 -3618.73 -687.94 -5565.8 1418.561759 50 0.977758 1 0.926626 0.0199056 -3618.73 -687.94 -5565.8 1418.561760 50 0.977758 1 0.926626 0.0199056 -3618.73 -687.94 -5565.8 1418.56Traceback (most recent call last):
...(same trace as before)...MemoryError: DEAP : Error in tree evaluation : Python cannot evaluate a tree higher than 90. To avoid this problem, you should use bloat control on your operators. See the DEAP documentation for more information. DEAP will now abort.
real 725m42.452suser 724m14.344ssys 1m22.018s1806 50 0.964538 1 0.882966 0.0318138 -3942.1 -498.117 -6169.68 1786.991807 50 0.964538 1 0.882966 0.0318138 -3942.1 -498.117 -6169.68 1786.991808 50 0.964538 1 0.882966 0.0318138 -3942.1 -498.117 -6169.68 1786.991809 50 0.964538 1 0.882966 0.0318138 -3942.1 -498.117 -6169.68 1786.99Traceback (most recent call last): ...(same trace as before)...MemoryError: DEAP : Error in tree evaluation : Python cannot evaluate a tree higher than 90. To avoid this problem, you should use bloat control on your operators. See the DEAP documentation for more information. DEAP will now abort.maxdepth=numpy.max([x.height for x in population])
assert (expr.height <= 17), "Static limit not respected. expr "+str(expr)+" has height "+str(expr.height)
gen evals new maxdepth avg max min std avg max min std 0 0 0 4 0.489572 0.517073 0 0.0700974 -0.607054 1 -1.10812 0.2672610 50 55 7 0.501637 0.523923 0.5 0.00495394 -0.770868 -0.648516 -3.14516 0.402548Writing gen 0 at path ./OUT/default/FORTIN/42/0.checkpoint1 50 81 7 0.505192 0.582418 0.5 0.0143706 -0.945452 -0.650123 -3.14516 0.6035962 50 113 10 0.516542 0.583815 0.5 0.025932 -1.63016 -0.652377 -11.7192 1.7722 3 50 149 10 0.531343 0.583815 0.501933 0.0269473 -2.29389 -0.777242 -11.7192 1.78354 4 50 182 12 0.546434 0.619048 0.50678 0.0267584 -2.79703 -0.930487 -11.7192 1.72253 5 50 206 11 0.569386 0.666667 0.529491 0.0319262 -3.66291 -1.01325 -11.7192 1.86898 6 50 238 13 0.607038 1 0.53255 0.0874244 -3.85223 -0.693147 -11.7192 2.38831 7 50 263 13 0.69657 1 0.560764 0.157543 -3.23488 -0.693147 -11.7192 2.93072 8 50 292 11 0.765498 1 0.560764 0.187721 -3.66894 -0.693147 -11.7192 3.63597 9 50 321 11 0.800616 1 0.560764 0.19084 -4.08592 -0.693147 -11.7192 3.84219 10 50 345 14 0.816608 1 0.583815 0.169276 -4.02753 -0.693147 -15.1533 3.62791 11 50 376 14 0.839427 1 0.588235 0.151574 -4.07066 -0.693147 -15.1533 4.07989 12 50 409 15 0.863144 1 0.596916 0.141477 -4.13747 -0.693147 -15.1533 4.30664 13 50 432 15 0.76096 1 0.596916 0.128621 -6.07579 -1.38674 -15.1533 4.01724 Traceback (most recent call last): File "mysoftware.py", line 213, in <module> offspring, log = engine.run(options.ngen) File "/home/y/development/myproject/engine.py", line 134, in run CLUTCH=self.options.clutch File "/home/y/development/myproject/evoalgo.py", line 111, in eaFortin fitnesses = toolbox.map(toolbox.evaluate, invalid_ind) File "/home/y/development/myproject/stgpfitness.py", line 157, in fitness_function pattern = self.toolbox.compile(expr=program) File "build/bdist.linux-x86_64/egg/deap/gp.py", line 467, in compileAssertionError: Static limit not respected. expr add(primitive_charclass(False, True, True, or_(False, True)), add(add(add(add('C', primitive_charclass(and_(or_(True, False), or_(True, True)), not_(not_(True)), and_(or_(True, not_(not_(or_(True, True)))), not_(True)), or_(True, True))), add(primitive_charclass(False, False, True, False), primitive_charclass(not_(False), or_(False, False), and_(True, False), and_(and_(or_(not_(not_(True)), not_(and_(False, False))), not_(and_(not_(or_(not_(True), or_(False, and_(or_(and_(or_(True, True), or_(False, False)), and_(not_(not_(True)), not_(True))), not_(or_(not_(False), or_(False, True))))))), and_(True, False)))), True)))), primitive_charclass(not_(and_(or_(True, and_(and_(and_(or_(True, False), not_(True)), not_(not_(True))), not_(and_(or_(False, False), and_(True, True))))), not_(True))), or_(False, False), and_(True, True), and_(False, not_(not_(or_(and_(not_(and_(not_(True), and_(False, True))), and_(not_(not_(True)), not_(not_(True)))), True)))))), add('G', 'A'))) has height 18
offspring = toolbox.preselect(population, len(population)) offspring = [toolbox.clone(ind) for ind in offspring]
for ind1, ind2 in zip(offspring[::2], offspring[1::2]): if random.random() <= cxpb: toolbox.mate(ind1, ind2) if random.random() > mutpb: toolbox.mutate(ind1) if random.random() > mutpb: toolbox.mutate(ind2) del ind1.fitness.values, ind2.fitness.values offspring = toolbox.preselect(population, len(population)) offspring = [toolbox.clone(ind) for ind in offspring] offspring = varAnd(offspring, toolbox, mu, cxpb, mutpb)
--
You received this message because you are subscribed to a topic in the Google Groups "deap-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/deap-users/g2oV4wH3Tps/unsubscribe.
To unsubscribe from this group and all its topics, send an email to deap-users+...@googlegroups.com.