Giter VIP home page Giter VIP logo

nsga-ii's People

Contributors

baopng avatar javiersgjavi avatar purvidas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nsga-ii's Issues

Is it possible to create a new release in pypi?

Is it possible to create another version of the repository in PyPI with the addition of the new progress bar? This will be useful to use the package in a project I am currently working on.

a question about problems.py

hey guys,i meet a problem as follows:
when i run kur.py,i set objectives=[f1, f2] and expand = False,it can runs.
however, if i set objectives=(f1, f2) and now i think expand should be True,right? Now it cant run.If i change [f(*individual.features)] to [f([*individual.features]) in problem.py,it finally gets well.So i just want to know if my modification is right.Looking forward to reply as soon as possible

Doing crossover with a certain probability

Hi!

I'm trying to use your code as my experiment in Test Case Prioritization (TCP). I studied several methods of Genetic Algorithm (GA) and found that your code doesn't implement a certain crossover and mutation rate, or does it? I also did some changes to your code in my local to simulate the crossover rate, which roughly looks like this:

x = random.random()
if x < crossover_rate:
    child1, child2 = self.crossover(parent1, parent2)
else:
    child1, child2 = parent1, parent2

When doing so, it seems the sorting algorithm seems broken. The total front size decreases and is not the same as the length of the population that passed to the fast_nondominated_sort method. This happens in the second generation (after merging with children) and the following next generation. Here is an example:

INITIAL PORPULATION PREP
pop size 100                            # length of the population that passed to fast_nondominated sorting method (OK)
front size after sort 100           # total number of individuals from all fronts. This one is OK, since total = len(population)
GENERATION NUMBER:  2
pop size 200                            # length of the population that passed after merging with children (OK)
front size after sort 19             # shouldn't it be the same as the len(population), which is 200?

The decreasing front size lead the program to raise the index out of range issue when executing this line of code, since there is no element on a certain front_num and the total length of it never reach the same value as self.num_of_individuals:

front_num = 0
while len(new_population) + len(self.population.fronts[front_num]) <= self.num_of_individuals:
    self.utils.calculate_crowding_distance(
        self.population.fronts[front_num])
    new_population.extend(self.population.fronts[front_num])
    front_num += 1

I looked at the original paper (Deb, 2003) and found nothing wrong with the algorithm itself and it's precisely the same as mentioned in the paper. Can you tell me what part of this program affects this? Or is it okay for me to use 1 as the crossover and the mutation probability (which means we do crossover and mutate every time we synthesize children)? If so, can I have the reference that mentions it?

Thanks in advance.

how to get individuals in the last generation?

Hi, thanks for your wonderful work! During the use, I want to know the input values of the problems in the last generation, the x in the example. How can I get these individuals? Thanks!

Creating population for the next generation

Hi,

Hope all is well with you. Would you please explain to me what is the purpose of the code block from line 33 to 37 in the evolution.py file? I see you are returning "returned_population.fronts[0]" at the end of the generations. So, if the algorithm is going through its final generation then the lines 33 to 37 seem to be useless because, I guess it is creating the population for the next generation and has nothing to do with the final output at the last generation, right?

Thanks,

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.