Conversation
|
@phi-friday would you be interested in helping me with this PR? It implements optimizing over different parameter types, it's pretty much fully functional but I was hoping that it could be implemented in a cleaner way. I know this is not what you're usually interested in, so no worries if you're not interested. |
I can help, but I'm not sure how - I don't really understand how Bayesian optimization works. All I know is that if I specify a range, I can get an optimized value. |
|
I did a little digging.
|
That's understandable. I was hoping for a more big-picture review of the PR, but if you don't feel comfortable with that, no worries! Consider a
This doesn't sound so hard, but there are a few more implications. Sidenote: Tests currently fail because the kernel wrapping is not pickleable. That's fine, I think we need a better method for serialization anyways, no need to worry about this. |
I understand the idea: convert a value that was not represented by a real number to a real number, and convert it to the form you expect as a return value (whether it's an integer or a category value). I also understand the use of one-hot encoding to compute the category value, and how this necessitates a vector rather than a scalar. And if this is the implementation based on the paper, I have no reason to doubt it. To implement this, you've defined Am I correct that you want me to focus on the implementation of masking like |
|
I'm not sure I've checked it well enough, but everything looks good except for the two things I mentioned (serialization, not sure where the I think it would be better if the value returned by And this is off topic, but the mix of It also looks like we need to change to minimizing loop statements later on, See #13 for more information about typehints. |
* fix: import error from exception module (bayesian-optimization#525) * fix: replace list with sequence (bayesian-optimization#524) * Fix min window type check (bayesian-optimization#523) * fix: replace dict with Mapping * fix: replace list with Sequence * fix: add type hint * fix: does not accept None * Change docs badge (bayesian-optimization#527) * fix: parameter, target_space * fix: constraint, bayesian_optimization * fix: ParamsType --------- Co-authored-by: till-m <36440677+till-m@users.noreply.github.com>
| Bounds = Union[FloatBounds, IntBounds, CategoricalBounds] | ||
| BoundsMapping = Mapping[str, Bounds] | ||
|
|
||
| # FIXME: categorical parameters can be of any type. |
There was a problem hiding this comment.
@phi-friday Do you have a better idea on how to handle this?
I think there should be a separate PR at some point that overhauls the Observer pattern, the ScreenLogger and replaces the JSON logger with some other way to serialize things. I would suggest to not worry about that now.
so 2-dim of shape
should be fixed -- you're right of course!
This is what I called the method that defines how a parameter value is printed, e.g. for use by the |
What I was concerned about was the
Currently, the mask is organized like this {
"a": [True, False, False, False],
"b": [False, True, False, False],
"c": [False, False, True, True]
}If so, we could probably construct it as something like this [[True, False, False]
[False, True, False]
[False, False, True]
[False, False, True]]This is just a matter of preference, so you don't need to worry about it.
The modification I made was to call the magic method PS: There is absolutely nothing wrong with defining a |
|
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #12 +/- ##
==========================================
- Coverage 96.18% 96.04% -0.14%
==========================================
Files 10 12 +2
Lines 865 1139 +274
==========================================
+ Hits 832 1094 +262
- Misses 33 45 +12 ☔ View full report in Codecov by Sentry. |
No description provided.