-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add parameter typing (only float and integer) #131
base: master
Are you sure you want to change the base?
Conversation
…nf including types into pbounds
Codecov Report
@@ Coverage Diff @@
## master #131 +/- ##
==========================================
+ Coverage 70.92% 71.52% +0.59%
==========================================
Files 6 6
Lines 399 446 +47
Branches 44 61 +17
==========================================
+ Hits 283 319 +36
- Misses 112 118 +6
- Partials 4 9 +5
Continue to review full report at Codecov.
|
author updated this? |
I am using the updates for my own works. Improvement might be done, but I am waiting for first comments about the proposed solution. I don't know if it should be merged at the end. |
May I suggest an alternative indication method. In order to make it so that indicating the type of one parameter should not mean doing a whole dictionary, something like this?
where a 3 element to the tupple is added with the type, otherwise float is considered. |
I very much like the added value for BO with typing of the parameters! However, this could be still improved so that the parameters would get returned casted in their corresponding type. I mean, even if I define, e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks fine.
Nice idea here, till now, in the 'black_box_function' I was converting that float to int, it isn't the best but happened to be a convenient solution. |
Add optional parameter "ptypes" in the BayesianOptimization class in order to indicate le type of each parameter to optimize into a dictionary. For now, every parameters should be typed. The goal is mainly to validate the method.
If a parameter type is declared as integer, then the extremal position is chosen as follow. The outcome (float) of the minimization function is transformed into two positions (lower and upper integer). The minimum is the minimal value took by the acquisition function among the lower and upper positions.
In the case of multiple integer parameters, the current implementation do not combine every lower and upper integer values. The only combinations tested are all lowers versus all uppers.
Wait for comments !