-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Enhancement Request, Display Int values in print statement, cast int values to GP process #13
Comments
I totally agree with that and the In theory I imagine that it should be possible to define an appropriate kernel for the GP while also constraining the acquisition function optimization (or at least its output) to natural numbers. There's definitely a way, I just need to come up with something straightforward to keep in line with this package's theme. In practice I find that adding a Let me see what I can do. |
Hi @fmfn , is there any update on this issue? I'm experiencing the same problem and it's causing unnecessary iterations to be run as @mpearmain outlined. Thanks for your code!! |
To be honest, I'm not sure how, or even whether, I want to tackle this. I can think of a couple of hacks to mitigate some of the issues, such as repeated sampling, however I am not aware of any simple and elegant solution that can scale to arbitrarily many integer parameters. Since users with a need of a more comprehensive and robust toolset will probably favour something like spearmint, I tend to avoid adding features to this package unless they add more value than overhead. I'll keep looking around though, see if I find any papers on this subject, maybe someone has figured out a nice solution and I just need to find it. |
Once constraints are implemented into the package, I might be able to make a go at this. The idea would be to keep a running count of how many times a point has been searched, and once that count has reached a certain threshold, you add a constraint that eliminates a precisely defined neighborhood around that point from the search space (something like It's possible that this would add too many constraints for SciPy's optimizer to handle. Not sure how its performance works, but we'll see. |
@fmfn How about just add callback for printing? |
That could be an option. |
This can now be accomplished by building a (or extending the existing) logging observer. In the upcoming 1.0 release this feature might be included by default. Worse case scenario instructions on how to do it will be available. |
* WIP * Add ML example * Save for merge * Update * Parameter types more (#13) * fix: import error from exception module (#525) * fix: replace list with sequence (#524) * Fix min window type check (#523) * fix: replace dict with Mapping * fix: replace list with Sequence * fix: add type hint * fix: does not accept None * Change docs badge (#527) * fix: parameter, target_space * fix: constraint, bayesian_optimization * fix: ParamsType --------- Co-authored-by: till-m <36440677+till-m@users.noreply.github.com> * Use `.masks` not `._masks` * User `super` to call kernel * Update logging for parameters * Disable SDR when non-float parameters are present * Add demo script for typed optimization * Update parameters, testing * Remove sorting, gradient optimize only continuous params * Go back to `wrap_kernel` * Update code * Remove `tqdm` dependency, use EI acq * Add more text to typed optimization notebook. * Save files while moving device * Update with custom parameter type example * Mention that parameters are not sorted * Change array reg warning * Update Citations, parameter notebook --------- Co-authored-by: phi-friday <phi.friday@gmail.com>
Is it possible to have a better method print to int values?
(Even better to be able to cast them to the GP as ints)
Simple example, with Random Forests:
When running it may print out:
n_estimators = 10.3456, min_samples_split = 2.35643, max_features=0.99
I would expect it to print out:
n_estimators = 10, min_samples_split = 2, max_features=0.99
Going deeper, because its floats that have been passed, it may search the 'same' space again:
It seems rather wasteful to search
int
spaces.I say this with no idea on how this affects the underlying GP process that is being called
The text was updated successfully, but these errors were encountered: