Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
39 views

DEAP eaSimple in python crashes becouse of too many laggs

Error I get SyntaxError: too many nested parentheses. File /home/tilen/genetic_programming/.venv/lib/python3.10/site-packages/IPython/core/interactiveshell.py:3577 in run_code exec(code_obj, self....
tilen5's user avatar
  • 1
0 votes
1 answer
39 views

what does verbose = __debug__ mean in following code?

from deap import tools from deap import algorithms def eaSimpleWithElitism(population, toolbox, cxpb, mutpb, ngen, stats=None, halloffame=None, verbose=__debug__): """...
Ehsan's user avatar
  • 21
0 votes
0 answers
96 views

Why is it showing 'invalid syntax' when I am trying to run a genetic programming code using deap library?

After calling all required modules, I assined all the operators and created Fitness and Individual. After that Evaluation function was defined and toolbox was registered as follows: # Define the ...
Shreya Swarnaker's user avatar
1 vote
0 answers
187 views

How can I access all feasible solutions from Genetic Algorthm with DEAP library?

I am trying to apply GA for generating a set of solutions that fulfil a list of constraints. I would like to find solutions (individuals) of diets that fulfill nutritional constraints, for which I ...
Caroline Herlev Gebara's user avatar
0 votes
1 answer
113 views

Genetic programming: Can we get multiple bit output from each individual(tree) if we provide 5 bit input?

I want to create population of trees using genetic programming. I am using deap python framework. My trees are based on combination of different logic gates and some terminals. I want to provide each ...
Mujtaba Hassan Saddozai's user avatar
3 votes
2 answers
449 views

How can I select features for Symbolic Regression

How can I select features for Symbolic Regression ? I have 30 features, I want to use only the most sensitive features for Symbolic Regression. As an example, this dataset can be used which is similar ...
Roman's user avatar
  • 3,241
1 vote
1 answer
946 views

Visualizing nested function calls in python

I need a way to visualize nested function calls in python, preferably in a tree-like structure. So, if I have a string that contains f(g(x,h(y))), I'd like to create a tree that makes the levels more ...
Burnt Umber's user avatar
1 vote
2 answers
673 views

DEAP genetic program - crossover failed (incomplete tree)

I use deep to do the genetic programming. My individual is expression tree. I add some customized operator with arity 1 and 2. pset = gp.PrimitiveSet("MAIN", 7) pset.addPrimitive(operator.add, 2) ...
jingting's user avatar
2 votes
2 answers
2k views

Using multiprocessing in DEAP for genetic programming

I'm using DEAP library to implement genetic programming and I have used eaMuCommaLambda algorithm for this purpose. In order to run the program in parallel, I followed the instructions in the DEAP ...
Farnoosh's user avatar
1 vote
1 answer
533 views

Is it normal to have a decrease in average fitness of populations in genetic programming (maximization problem) using DEAP?

I'm using DEAP library in python for a genetic programming maximization problem. I have used eaSimple algorithm to create populations with 60% probability of crossover and 30% probability of ...
Farnoosh's user avatar
0 votes
0 answers
435 views

Evaluation stuck at local optima in genetic programing DEAP. How to prevent GP from converging on local optima?

I'm trying to do a symbolic regression of a geometric model. And it gets stuck at most of the time with a fitness score that is not near 0. So I did a couple of research and find out it is the problem ...
SnigJi's user avatar
  • 1,420
0 votes
1 answer
624 views

How to strongly type zero argument primitives

I'm trying to write a genetic program in Python using DEAP and have several zero argument functions as terminals. I want to be able to combine them using, for example, an if_then_else primitive but ...
Davidson's user avatar
2 votes
1 answer
1k views

How to set upper and lower bounds to a gene in an individual in DEAP?

I am employing genetic algorithm through DEAP package in python. In this process, I would like to set different upper and lower bounds to each gene in the individual. I would like to know how can one ...
linearprogrammer's user avatar
1 vote
1 answer
869 views

Custom representation of population with Python package deap

I am using Python package deap. My problem is to get my population from dataset insted of generate it from genes. For example: I have [[1,2,0,0,...],[1,3,4,0,...],...] as data set and I want to select ...
احمد ناجي's user avatar
1 vote
2 answers
1k views

Solving TSP with DEAP - How to freez first and last town?

I have large dataset with flights prices CITY_ORIGIN, CITY_DESTINATION, PRICE I want to solve TSP problem of finding the cheapest trip starting in CITY_START ending in CITY_END and going, through ...
Alex T's user avatar
  • 4,669

15 30 50 per page