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

Suggestions override min and max #12

Closed
JasonCEC opened this issue Mar 23, 2018 · 2 comments
Closed

Suggestions override min and max #12

JasonCEC opened this issue Mar 23, 2018 · 2 comments

Comments

@JasonCEC
Copy link

When suggestions us used in ga, the results of ga can be outside the bounds set in min and max.
This could be considered a bug, as many users expect the results to be within the set boundaries.

After looking at the code, it is clear that when a suggestion is made, it is included in the initial population, and when a suggestion outside the bounds has high value, that value can be "inherited" by future generations.

Considering that this may be expected behavior, we could produce a warning instead of forcing the results to be within the min/max bounds.

@luca-scr
Copy link
Owner

If a user specifies min and max (please note that these have been renamed lowerand upper, but old nomenclature is still accepted with a warning) and then provides a suggestions matrix that do not satisfy the boundary conditions specified, then there is something wrong on the user's side.
That said, I can try to include a check. It is not clear to me what you propose.
From my point of view, setting lowerand upper should have priority because they are mandatory arguments. So, if suggestions contradict the specified boundaries then I can 1) remove the offending suggestion, 2) force the suggestions to fulfil the boundaries. In any case a warning should be issued.

@JasonCEC
Copy link
Author

JasonCEC commented Mar 24, 2018

I agree that passing suggestions outside the bounds of upper and lower is a user error,
but, for example, while applying complex transformations to a original data set, such as word2vec,
it is easy to accidentally do so, resulting in return values from ga outside of those limits.

I suggest:

  1. lower and upper have priority
  2. ga warn when suggestions are outside the boundaries
  3. an option to deal with suggestions outside the boundaries - perhaps: drop, stop, and truncate?

drop would drop the observations outside of the boundaries,
stop would error instead of warn when any suggestion is outside of the boundaries,
and truncate would overwrite suggestion variables less than lower with lower and greater than upper with upper.

I think this is in line with what you wrote above, and I would be happy to help if there's a section of this I could write?

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

No branches or pull requests

2 participants