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

Statistics in Logger only use fitness in built-in algorithms #10

Closed
saxarona opened this issue Jan 22, 2023 · 3 comments · Fixed by #66
Closed

Statistics in Logger only use fitness in built-in algorithms #10

saxarona opened this issue Jan 22, 2023 · 3 comments · Fixed by #66
Assignees
Labels
enhancement New feature or request

Comments

@saxarona
Copy link
Collaborator

saxarona commented Jan 22, 2023

So far, the built-in algorithms only calculate the statistics passed using the fitnesses (which is useful most of the cases). However, one may want to calculate stuff on other vectors, e.g. entropy (as a mean of monitoring diversity) considers probability of bit values and for that it needs the population vector.

There are several ways to fix this. These are, from the top of my head, some of the ideas:

  • Temporal solution, hack/patch: use two Logbooks, one for each data vector.

  • Long-term solution 1, moderately complex: modify the built-ins such that they receive a parameter that handles this situation.

  • Long-term solution 2, moderately complex: modify the logger so that it creates a mapping between a string X tuple, instead of string X callable.

  • Long-term solution 3, highly complex: add a callback module to the end of the built-in algorithms.

Edit 10.07.23: Now we add a new function that uses the new compute method in the rest of the Algorithms

10.07.23: We will move algorithms to a sub-module, and only provide blocks in a general form.
We need the tools and blocks. If you want to use algorithms, feel free; but one should not have to do that!

@saxarona saxarona added the enhancement New feature or request label Jan 22, 2023
@saxarona saxarona self-assigned this Jan 22, 2023
@saxarona
Copy link
Collaborator Author

I'm thinking of doing the Long-term solution 2:

Add another constructor to the logbook struct such that it can handle a vector of dictionaries instead. I'm not entirely sure what it all means, but it is a possibility.

@saxarona saxarona added this to the v1.0 milestone Feb 28, 2023
@saxarona saxarona removed this from the v1.0 milestone Apr 4, 2023
@saxarona
Copy link
Collaborator Author

saxarona commented Apr 4, 2023

Removing the milestone and marking as unplanned. We can live with this :)

@saxarona saxarona closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2023
@saxarona
Copy link
Collaborator Author

saxarona commented Jul 7, 2023

Hey guess what, I am implementing the quick fix but as a permanent solution—you just add another algorithm which takes a vector of Logbooks,and another compute! which iterates through a list of data sources.

Is it elegant? Perhaps. I am not so sure :^)

@saxarona saxarona reopened this Jul 7, 2023
@saxarona saxarona mentioned this issue Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant