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

Two potential "bugs" #42

Closed
warmth88 opened this issue Jul 31, 2017 · 1 comment
Closed

Two potential "bugs" #42

warmth88 opened this issue Jul 31, 2017 · 1 comment
Labels
Milestone

Comments

@warmth88
Copy link

Hi Trevor,

Thanks for developing this tool. It has been really helpful for my research. As I'm using the "greater_is_better" feature of the code, I detected something abnormal originated from "genetic.py".

(1) if isinstance(self, RegressorMixin):
# Find the best individual in the final generation
self._program = self._programs[-1][np.argmin(fitness)]

This is only True when the best program we are seeking is the one that has lowest fitness, which is not the case for "greater_is_better".

(2) Similarly
if isinstance(self, TransformerMixin):
# Find the best individuals in the final generation
fitness = np.array(fitness)
hall_of_fame = fitness.argsort()[:self.hall_of_fame]

This would select top several programs that have lowest fitness instead of the highest.

@trevorstephens
Copy link
Owner

Yep, looks like a rather glaring bug, thank you for reporting. Looks like #40 addresses your first point. The second one might be implemented in the same PR. I'll ask @eggachecat if they can expand the PR to cover this as well.

trevorstephens added a commit that referenced this issue Nov 11, 2017
trevorstephens added a commit that referenced this issue Nov 16, 2017
* fix issues with metric evaluation in transformer
* improve transformer selection algorithm to maintain fittest program
* update documentation for new updates
* update changelog with changes in random sampling
@trevorstephens trevorstephens added this to the 0.3.0 milestone Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants