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

[ML] Some corrections to ANOVA for Bayesian Optimisation #2259

Merged
merged 15 commits into from
Apr 30, 2022

Conversation

tveasey
Copy link
Contributor

@tveasey tveasey commented Apr 27, 2022

This corrects the handling of the shifting and scaling of the function values when computing various quantities related to the GP. In particular, we were not properly undoing the transform in evaluate, evaluate1D and various ANOVA related functionality. We could end up computing square roots of negative numbers in evaluate1D and anovaTotalVariance. At the same time I took the opportunity to ensure GP domain is [0, 1]^n rather than just scaling. This leads to more predictable numerics for ML and also simplifies the code.

I've added tests that the kernel parameters are invariant under operations to the function range which should preserve its value: changing level and scale. I also do the same for evaluate, evaluate1D and various ANOVA related functionality.

Copy link
Contributor

@valeriy42 valeriy42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work on catching the numerical issue and writing unit tests to verify the correct behaviour! 🚀

lib/maths/common/CBayesianOptimisation.cc Outdated Show resolved Hide resolved
lib/maths/common/CBayesianOptimisation.cc Show resolved Hide resolved
lib/maths/common/CBayesianOptimisation.cc Show resolved Hide resolved
lib/maths/common/CBayesianOptimisation.cc Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants