Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
24 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
0 answers
179 views

Fetching Gene Ontology Terms for a List of Genes Using Python

I have a CSV file containing gene information with 600 data entries. Each entry includes ENTREZ_GENE_ID, Gene Name, Species, and Ensembl ID. I need to find the Gene Ontology (GO) terms associated with ...
arshad's user avatar
  • 158
0 votes
0 answers
33 views

Schemata Theorem, Crossover Probability and Mutation Probability in different techniques

For the mutation probability, the definition I found is "Mutation probability (or ratio) is basically a measure of the likeness that random elements of your chromosome will be flipped into ...
laikaka's user avatar
  • 39
0 votes
0 answers
133 views

Why do I get an error message when I install pybigwig?

I have a problem that I have tried to solve but I have not found how to do it, when I try to install pyBigWig to be able to read .bb files with pip install pyBigWig I get the following error and I ...
Maria Perez Martinez's user avatar
0 votes
1 answer
19 views

Neataptic Machine-Learning - Flatten inputs or nested & based on features or samples

I am learning ML NEAT with Neataptic within NodeJS. I am making a basic weather prediction model. Essentially predict the next temperature. I have this type of data, where I want to give samples of ...
Random Stuff's user avatar
0 votes
1 answer
34 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
119 views

MPI coding error : program exiting without completing execution

I am doing small coding on Genetic Algorithm and the below is my main function : #include <stdio.h> #include <stdlib.h> #include <time.h> #include <mpi.h> #include <limits.h&...
toughcoding's user avatar
1 vote
1 answer
221 views

Pygad create new population if fitness is saturated

I am using Pygad to compute an optimization problem, however the algorithm is reaching local minima (not the ideal solution) before all the generations have run. I would like to be able to check ...
Glen Eaton's user avatar
0 votes
1 answer
294 views

Couldn't get more than two solutions in pymoo

I have a problem with two objectives. The problem is minimized by NSGA-2 algorithm. I run minimize with different population sizes and different termination criterias, but every time the algorithm ...
iammetehan's user avatar
0 votes
1 answer
53 views

Allocate letters to an NxM grid to minimize the distance between letter pairs that show up frequently in a given list of words

Given a input of a lot of words and an NxM dimension I have to create an algorithm that designs the best (if possible, or one of the bests) single-finger NxM keyboard layout for mobile. Which means ...
Joel Sanfeliu's user avatar
1 vote
1 answer
112 views

PYGAD how to debug the built-in parent selection method

I am using PYGAD GA module to write a genetic programming, I want to use the tournament selection for my parent matching, I do not known how to use print() to debug the parent selection method, here ...
Cn Hu's user avatar
  • 59
0 votes
1 answer
64 views

How to use linear regression B/SE estimates into a new formula to calculate Wald Ratio method statistic?

In Stata how to perform one-sample Mendelian randomization using the Wald ratio method for causal estimates, SE and P value? Is there a package or special command? Essentially I want to perform ...
Beryl  's user avatar
0 votes
0 answers
85 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
0 votes
0 answers
97 views

Genetic Programming with Numpy, Pandas and Swifter, how to speed up tree evaluation/fitness calculation?

I'm trying to implement a GP algorithm. This is my first time using numpy/pandas/swifter, so perhaps that explains a lot. I have a tree class (only relevant methods shown): FUNCTIONS = [np.add, np....
Arul Agrawal's user avatar
-1 votes
1 answer
82 views

Large Datsample: failing to better visualize data point using matplotlib plot

The size of the data samples is very large, making it difficult to visualise the data points using a matplotlib plot. Sample Code: import matplotlib.pyplot as plt plt.plot(myList_timestamps, ...
user avatar
0 votes
0 answers
43 views

How to create Chromosomes and Fitness function for this NP-Hard Genetic algorithm problem

Hi i am very new to genetic algorithm and i am stuck with this problem: A move is provided for a student. He has to store his things in small plastic boxes in a cardboard box with a capacity of 2 ...
QTARO's user avatar
  • 1
0 votes
1 answer
1k views

overlapping in matplotlib plot

I am comparing the execution time of an exhaustive search and genetic algorithm along with sample solutions. In the graph below, I am trying to improve the readability of my graph. However, they ...
user avatar
1 vote
3 answers
129 views

finding a minimum value with all header values

I am trying to find a minimum value in a dataframe with all column values. Sample data: **Fitness Value MSU Locations MSU Range** 1.180694 {17, 38, 15} 2.017782 1.202132 {10, ...
user avatar
0 votes
1 answer
35 views

Iterating a list: getting values as[set(), set(), set(), set(), set()]

I have a list (df_pop_initial_list), and it looks like this: [['000000000000000000000000000001011000000'], ['000000001000000000000001000000000010000'], ['000000000000000000000000000000010011000'], [...
user avatar
0 votes
1 answer
267 views

finding indexes of 1's in a bit string and storing these indexes in a list -- Index should be started from 1 not 0

I am finding indexes of 1's in a bit string successfully. However, these indexes start from 0. Sample Data: initial_pop 000000000000000000000000000001011000000 000000001000000000000001000000000010000 ...
user avatar
0 votes
1 answer
34 views

counting 1's in a bit string to keep positions in a variable and then accessing each value

I am finding 1's in a bit string and then storing them. Sample Data: Sample code: def indices(chromosome): return {i for i,c in enumerate(chromosome) if c=='1'} for ind in df_initial_pop['...
user avatar
0 votes
0 answers
2k views

IndexError: Boolean index has wrong length: 14 instead of 15

I was trying implement a project from GitHub about genetic algorithm and particle swarm algorithm. But I face the next error: Knowing that I use the same dataset in the project file. Can anyone help ...
mohdsh334's user avatar
0 votes
1 answer
50 views

Not able to understand random.sample(range(1,40),3)) with sum(1<<i for i in random.sample(range(1,40),3))

I am trying to debug this piece of code and learn a little. I learn that it generates 3 unique values for i but how come the values of sum become this much big? If I run it and debug it, it goes ...
user avatar
1 vote
1 answer
87 views

Cross-over is failing binary encoded string

I am implementing Genetic Algorithm (GA). There are 43 numbers [Ambulance Locations] to choose from (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, ...
user avatar
0 votes
1 answer
102 views

Controlling Mutation in 39bit string as a candidate solution in genetic algorithm

I am working on an optimization problem. I have X number of ambulance locations, where X ranges from 1-39. There are 43 numbers [Ambulance Locations] to choose from (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,...
ExploringAI's user avatar
0 votes
0 answers
143 views

Controlling multiple bits flipping to represent chromosomes mutation

I am working on an optimization problem. I have X number of ambulance locations, where X ranges from 1-39. There are 43 numbers [Ambulance Locations] to choose from (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,...
ExploringAI's user avatar
0 votes
0 answers
354 views

Best way to define a fitness function which can be optimized by GA making multiple properties be close to specified values

Recently, I met such a questions, which require to optimize multiple properties of a designed material make them close to specified values. For example, I have 3 reference property values (pv for ...
DavidK's user avatar
  • 3
0 votes
1 answer
374 views

How to change a function code during the execution in java

I'm trying to make some kind of AI that will have acess to his own code and can modify it during the execution to be able to evolve for example, during the runtime I want it to be able to change it's ...
Marcocorico's user avatar
1 vote
0 answers
162 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
0 answers
99 views

Genetic algorithm producing irregular result in finding the maxima of a multivariable function

I'm trying to implement a genetic algorithm in order to find the maxima of this function f(x,y,z) = x^2 + y^3 + z^4 + xyz on [0,10] [0,20] [0,30] for x,y,z respectively my objective function is the ...
ATMISMA ETHNOS's user avatar
2 votes
1 answer
201 views

Python Genetic Algorithm by using PyGAD library

I have a function that I want to maximize its value. But I don't know much how to use PyGad library. What I see on some sites is that they always use default functions like w1x1 + w2x2 + w3x3 + w4x4 + ...
Walrus's user avatar
  • 21
0 votes
2 answers
2k views

How can I convert Affymetrix probes into gene Symbols?

I have carried out Affymetrix data analysis with oligo and limma. Now I need to perform the gene enrichment analysis on the upregulated and downregulated genes (on EnrichR, by searching the gene ...
Martina M's user avatar
0 votes
1 answer
100 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
0 votes
3 answers
417 views

How do I replace part of a tree with another tree at the specified index in OCaml?

I have the following tree structure: type 'a tree = | Function of string * 'a tree list (* function name and arguments *) | Terminal of 'a I use this tree structure to construct an abstract ...
Flux's user avatar
  • 10.8k
0 votes
1 answer
289 views

How to represent multiple-output logic circuits in tree-based genetic programming

Consider the following digital logic circuit, which has multiple inputs and one output: The logic circuit above can be represented in tree form: This tree representation could then be used in a tree-...
Flux's user avatar
  • 10.8k
0 votes
0 answers
245 views

Struggling with netcore GC and Large Small Lived Arrays

I'm developing an Grammatical Evolution Engine that does the following: Parse a file with the BNF rules. <letter> ::= a|b|c|d Generates random solutions based in some specific rules. (...
Ubler's user avatar
  • 61
-2 votes
1 answer
174 views

genetic algorithm improvement

1-probability that an individual Route will mutate 2-Population size of 1 generation (RoutePop) 3-Size of the tournament selection. In the genetic algorithm, how can I select these three elements (2-2-...
khairalah adhalat's user avatar
0 votes
0 answers
69 views

What would be the time complexity of following Genetic Mutation

def mutation(domain, step, solution) -> list: gene = random.randint(0, len(domain)-1) mutant = solution if random.random() < 0.5: if solution[gene] != domain[gene][0]: mutant = ...
Agrover112's user avatar
0 votes
0 answers
159 views

When I import the Matlab data table, the numbers do not appear, instead it writes NaN

I am making a project using Genetic Algorithm in Matlab, but I am getting errors in some parts of the code and therefore I cannot reach the result. When I import the data table, the numbers do not ...
Ferid Akşahin's user avatar
1 vote
2 answers
617 views

GNU parallel --block and -L clarification

Given that I have a file of N size. For the sake of example 30GB file. Facts about the file content is that it has proprotional amount of lines. This is interleaved FastQ file. (not important for the ...
titus's user avatar
  • 404
1 vote
1 answer
468 views

A query regarding NSGA 2: Tournament selection

In NSGA 2 algorithm, we employ binary tournament selection as the selection procedure to generate mating parents from a population. The offspring data set's size is the same as the size of the parents....
Akhilnandh Ramesh's user avatar
1 vote
1 answer
300 views

How can I get my value for generations to work for my genetic algorithm (Python)

I have created a genetic algorithm to solve the problem of watching shows in what order to maximise surplus by using a code inspired by Kie Codes by following the code within this video https://www....
Kyaki's user avatar
  • 11
3 votes
2 answers
382 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,231
0 votes
1 answer
212 views

Genetic Programming, On-line Learning, gplearn

I recently discovered the GP and find it fascinating. To explicitly learn the mathematical expression is quite different from the implicit learning neural networks do! I'm interested in how GP works ...
user1723196's user avatar
1 vote
0 answers
1k views

Error in cor(exprs(gse), use = "c") : no complete element pairs

I'm trying to plot a heat map for a "GSE133399", I retrieved the GSE using GEOquery package and then assigned to an object and then tried to plot a heatmap, but I was not successful, I used ...
user432797's user avatar
0 votes
2 answers
452 views

Can I get the index of an object in an instance array by knowing a value of the object?

Is there a way of getting the index of an instance in an instance array by only knowing a property of that object? I have something like this: class NodeGene: def __init__(self): self....
Jaime Etxebarria's user avatar
4 votes
3 answers
2k views

Modified version of Student Project Allocation algorithm

I am working on a project for a non-profit organization where they are trying to help students with special needs to match to different project topics. Each student will have four preferences and a ...
Fawzan's user avatar
  • 4,848
1 vote
2 answers
203 views

How to deal with unfeasible individuals in Genetic Algorithm?

I'm trying to optimize a thermal power plant in a thermoeconomic way using Genetic Algorithms. Creating population gets me with a lot of unfeasible Individuals (e.g: ValueErros, TypeError etc.). I ...
guiprado's user avatar
1 vote
1 answer
817 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
0 votes
1 answer
130 views

Genetic Programming Prolog Implementation

My task is to write a rule in SWI Prolog, which takes two strings as input. It should then divide and merge them at a random point and generate two new lists. Example: ?- crossover([a,r,s,u,p],[b,t,...
Sophie H.'s user avatar

1
2 3 4 5
7