Open jbboin opened 3 years ago
Thanks for the fix! I'm wondering if it would be more intuitive to have Discrete
be values from a (included) to b (included) and update RandomSearch
Yeah honestly I don't have a strong opinion either way. I initially thought that BO was the one breaking the pattern so it would be easier to change it, but now I'm looking at GridSearch
and I realize that it also includes the upper bound of the range. So yeah, there's definitely some consistency issue we need to resolve here. The convention we end up settling on is up to you, but I'm starting to lean towards including the upper bound as well.
If that's the convention choice we decide on, would modifying RandomSearch
be enough?
When using a
Discrete
parameter with the range [a, b] inRandomSearch
, the values are from a (included) to b (excluded). However the same parameter used inGpyOpt
will result in values from a (included) to b (included). This PR fixed this inconsistency by modifying the behavior inGpyOpt
. It also adds a test that ensures that the produced values in a toy example are in the correct range.The steps to reproduce this issue are as follows (we also look at the values obtained with
RandomSearch
for reference):