-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ga fails to minimize functions with negative range #30
Comments
Looking at the code more, lots of stuff won't make sense with negative objective values. Is this just a standard assumption for genetic algorithms? (I'm no expert!) |
I guess it is because the selection methods need to sort the population basing on the fitness. So the ga method should take in input a max/min parameter to drive the sorting phases. |
You need to rewrite your problem to fit the package. |
This package performs an objective function minimization by maximizing its inverse. Shape your problem to fit the package behavior. |
OK sure that's fine. But I think it would be good to include the constraint that the objective function be positive in the documentation. Also, it's worth noting that taking the inverse has scaling effects that may be undesirable. In particular, for values near 0, very small differences in the objective function will lead to large differences in the inverse objective function, which could reduce population diversity if using selection functions such as roulette or SUS. |
Example:
I think this is because you maximize the inverse of the provided objective function. Is there a reason to do this rather than just directly minimizing the function? (Or I guess, maximizing the negation of the function)
The text was updated successfully, but these errors were encountered: