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

How to set equality constraints for bayesian optimization? #786

Closed
yuanquan010 opened this issue Jan 21, 2022 · 4 comments
Closed

How to set equality constraints for bayesian optimization? #786

yuanquan010 opened this issue Jan 21, 2022 · 4 comments
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@yuanquan010
Copy link

yuanquan010 commented Jan 21, 2022

Hello, thanks a lot for this excellent project, but when I use it to optimize the parameters of the simulation model, I run into some problems.
For the setting of SearchSpace, there are three types of inequality constraints---linear, order, and sum constraints. However, if I want to set some complex hierarchical equality parameter constraints, such as a * b+b * c = v*p, how can I achieve this? Here a, b, c, v, and p are RangeParameters.

@bernardbeckerman
Copy link
Contributor

Hi @yuanquan010, thanks for reporting this! This issue was previously reported and currently is being tracked in our wishlist issue, so I am closing this out. Apologies that our wishlist issue obfuscated that this was already being tracked, and again, thanks a lot for reporting!

@bernardbeckerman
Copy link
Contributor

I think though that there is an easier way to do this. Particularly, in your equation

a * b + b * c = v * p

you have 5 parameters, but really only 4 degrees of freedom (i.e., the value of p is fixed given a, b, c, and v). I think the proper way to tackle this problem is to have only 4 range parameters (say, a, b, c, and v), and then create the 5th in your workflow via

p = (a * b + b * c) / v

That way, the 5 values of these variables will always be satisfied. Does that make sense?

@lena-kashtelyan lena-kashtelyan added the duplicate This issue or pull request already exists label Jan 21, 2022
@yuanquan010
Copy link
Author

I think though that there is an easier way to do this. Particularly, in your equation

a * b + b * c = v * p

you have 5 parameters, but really only 4 degrees of freedom (i.e., the value of p is fixed given a, b, c, and v). I think the proper way to tackle this problem is to have only 4 range parameters (say, a, b, c, and v), and then create the 5th in your workflow via

p = (a * b + b * c) / v

That way, the 5 values of these variables will always be satisfied. Does that make sense?

Okay, I get it, thank you

@sgbaird
Copy link
Contributor

sgbaird commented Apr 21, 2023

xref: #786

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants