Giter VIP home page Giter VIP logo

Comments (2)

ahmedfgad avatar ahmedfgad commented on May 10, 2024 1

This should be a multi-objective optimization problem. PyGAD only supports single-objective problems.

To do it in PyGAD, you should do the following:

  1. Set the number of genes in PyGAD to 20 (because X shape is 5x4=20).
  2. In the fitness function, reshape the solution into a 5x4 array.
  3. Multiply the solution by X, row by row, sum the results of each row to get only 5 outputs.
  4. Compare the 5 outputs to the y array and calculate the error for each y.
  5. 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.

Fern-Parker avatar Fern-Parker commented on May 10, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.