Skip to content
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

Roulette: Fix how negatives fitness are handled #140

Merged

Conversation

lucianolorenti
Copy link

@lucianolorenti lucianolorenti commented Feb 20, 2024

Closes #139

📑 Description

When handling negative values in optmizer.get_index_roulette_wheel_selection, probably due to a typo, the boolean value is being compared to be less than zero np.any(list_fitness) < 0, instead of np.any(list_fitness < 0)

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

@thieu1995 thieu1995 merged commit 2fa4d56 into thieu1995:master Feb 20, 2024
6 checks passed
@thieu1995
Copy link
Owner

@lucianolorenti,
Thank you for pointing out and fixing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Problem with negative fitness
2 participants