-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
HSGP misc fixes #7342
HSGP misc fixes #7342
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7342 +/- ##
==========================================
- Coverage 92.37% 92.37% -0.01%
==========================================
Files 102 102
Lines 17208 17206 -2
==========================================
- Hits 15896 15894 -2
Misses 1312 1312
|
Thannks @bwengals !
I think it's fine because it's gonna get used more now that we have examples and tutorials up, so better do the change now than later.
Agreed, we can get rid of that, as it makes the API simpler. Then we can probably get rid of the NamedTuple? |
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.
Almost all good @bwengals !
Just one change I highlighted, plus getting rid of returning S
in the approx function (as well as updating the NB on pymc-examples)
self._X_center = (pt.max(X, axis=0) + pt.min(X, axis=0)).eval() / 2 | ||
Xs = X - self._X_center # center for accurate computation |
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.
Small suggestion: Could a unit test be added to check this so that we are sure future changes won't break the signs? We could just wrap this little logic into a small axillary function so that we can easily test it.
This looks great! Thanks! I agree with Alex's comments. I just left a small suggestion above :) |
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.
Just have a last question @bwengals
Sounds good, I can make these changes on Friday |
I got some time, so I just pushed the change to the formula for S @bwengals 🍾 |
Description
x_range
instead ofx
inapprox_hsgp_hyperparams
. I don't think the fullx
is needed anymore, could be missing something though.approx_hsgp_hyperparams
about usage.Xs
toX
. The "s" stood for "scaled", for when the user had to center or mean subtract the incomingX
. Now this is done automatically, so it can just be calledX
. Though minor, it is a breaking change. Would it be good to add a deprecation warning and keep theXs
syntax for a while?Also, didn't make this change, but what do people think about not returning
S
fromapprox_hsgp_hyperparams
, so it would just returnm
andc
? The idea was that returning S here would be helpful for the user when centering things, but that's not really necessary anymore.📚 Documentation preview 📚: https://pymc--7342.org.readthedocs.build/en/7342/