Comments (2)
This should be a multi-objective optimization problem. PyGAD only supports single-objective problems.
To do it in PyGAD, you should do the following:
- Set the number of genes in PyGAD to 20 (because X shape is 5x4=20).
- In the fitness function, reshape the solution into a 5x4 array.
- Multiply the solution by X, row by row, sum the results of each row to get only 5 outputs.
- Compare the 5 outputs to the y array and calculate the error for each y.
- Based on the 5 errors calculated, you should return a single value that represents the fitness.
I hope this helps. Please get back if further clarification is needed.
from geneticalgorithmpython.
@oq-9 Hi, oq-9! Have you solved the problem? I've encountered the same problem with you. Could u share some experiences? Any help will be greatly appreciated!
from geneticalgorithmpython.
Related Issues (20)
- Save the instance of a GA during fitness evaluation HOT 1
- Error when run parallel_processing "process" HOT 3
- multi objective optimization - metric of quality HOT 1
- Force recalculation of fitness values for each new generation ? HOT 7
- Fitness value of a solution computed multiple times per generation? HOT 5
- The on_generation callback is not called at the end of generation 0 HOT 2
- GA
- Convergence issue: good solution appears to be forgotten, resulting best solution is not even valid HOT 1
- Error when running 3.2.0 vs. 3.1.0 for ga_instance.best_solutions
- ga_instance.save will not work with tqdm example HOT 1
- fitness function is being saved? HOT 2
- Cannot modify the attributes of the ga_instance when running multiple processes in parallel HOT 1
- Manipulate solution before saving it as parent HOT 5
- `pareto_fronts` is from previous generation HOT 1
- `initial_population` not effectively used/retained for multiobjective problems? HOT 4
- Training traffic sign recognition with faster rcnn using ga HOT 1
- ga_instance.best_solution() does not return the solution that minimizes my fitness function HOT 1
- delay_after_gen warning HOT 1
- Is NSGA-III supported? HOT 1
- Caching of Fitness Values for Elites/Kept Parents
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geneticalgorithmpython.