30 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
1
answer
181
views
How to automatically convert objective expression from pyomo model to use as fitness_func for pygad?
I use pyomo to formulate optimization problems and tyically use solvers like for example IPOPT. Now I would like to apply metaheuristic solvers to those optimization problems. I have already heared of ...
1
vote
1
answer
174
views
How to specify range of genes in PyGAD for genetic algorithms?
I have an optimization problem with a lot of variables. Let suppose there is just three: car speed (km/h), car weight (tons) and car price ($). Obviously, the range of each variable is different: car ...
2
votes
0
answers
69
views
Can a genetic algorithm give an variable sized solution?
I'm trying to use an simple genetic algorithm with only one goal, however my problem is kinda of complex. So, I have an initial chromosome that will have to be made up of 2 or more groups that also ...
1
vote
1
answer
124
views
firness function of multi output pygad
I am not understanding what will be my fitness function for regression problem.basically i have 1000 datasets with input shape (72,2) and 1000 output dataset (72,4).I want my model to be trained with ...
1
vote
1
answer
102
views
pyGad RAM usage
I am using pygad for a neural network and I am wondering why its using RAM after each generation? The issue is that I leave it to run and then as it starts to use more and more RAM, then RAM usage ...
1
vote
1
answer
366
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 ...
2
votes
1
answer
155
views
How to make mutation which is inversion of one of the solution's genes when solutions are bit arrays
That's what I have so far. As I see from the output, my parameters are not enough to constraint mutation to my needs. Sometimes no one gene is changed, sometimes more than one.
import pygad
import ...
1
vote
1
answer
468
views
PyGad GA calling the fitness function too often
I am using PyGad’s GA function to optimise a neural network. As part of the testing and de-bugging I added some code to the fitness function that would save each solution and its accuracy. I’ve set ...
1
vote
1
answer
156
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 ...
1
vote
1
answer
502
views
Multi-objective optimization with PyGAD - maximin algorithm
I have a multi-objective optimization problem for which I would like to use the PyGAD library. I would like to use the maximin algorithm for multi-objective optimization, but in order to do so I need ...
2
votes
1
answer
657
views
Using PyGAD for feature selection
I'm trying to create a Python script for feature selection using PyGAD
My code is shown below, nonetheless, it is returning that all the features are the best subset. How can I be sure it is correct?
...
1
vote
0
answers
1k
views
PYGAD issue with Parallel Processing
I am using PYGAD for optimizing parameters for a backtrading strategy. It switches from using multiple threads to single threads every generation. I am confused as to why. It was working perfectly ...
1
vote
1
answer
159
views
Why am I getting NaN returned from the categorical_crossentropy which causes an index error when using pyGAD for optimizing a keras ANN parameters?
I've been trying to implement a GA to optimize the parameters of my ANN. I'm new to both of these libraries and I've used this as help to implement it https://blog.paperspace.com/train-keras-models-...
2
votes
2
answers
135
views
TypeError: can't multiply sequence by non-int of type 'GA'
I am making a Genetic Algorithm(GA) in python with pygad, but I keep getting this error:
TypeError: can't multiply sequence by non-int of type 'GA'
here is my whole code:
import pygad
import numpy
...
-1
votes
1
answer
531
views
pygad guarantee unique points within constraints
For a project on a HPC I want to use pygad to produce sets of points that can then be passed to jobs on the cluster:
Therefore, I would like all points within a population to be unique (time on the ...