-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
HallOfFame does not store the best when np.nan involved #440
Comments
I feel having |
In my case, some individual just didn't work out, and return nan. I am not sure if there is a more proper way to prune out these individuals. Now I just choose to neglect these nan value as long as the best one is fine. |
Since you didn't describe your concrete application, so it's hard to say what else better can be done. But, if you really want to do individual ranking, you are supposed to convert |
For temporary using, I change the code in HallOfFame::update() to prevent the nan from ruining my best results:
To
-np.inf is also a way to go, but the statistics may seem strange. |
I would leave that open, as it would be interesting to handle properly nans as invalid. |
my evaluate function may return nan occasionally. I found it's strange that the halloffame didn't store the best individal. So I tracked down, and found the problem is in Fitness'
It returns True where np.nan involved. So is it properly to change the code to:
Or there is other considerations?
The text was updated successfully, but these errors were encountered: