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? |
AlexAndorra
left a comment
There was a problem hiding this comment.
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.
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 :) |
AlexAndorra
left a comment
There was a problem hiding this comment.
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_rangeinstead ofxinapprox_hsgp_hyperparams. I don't think the fullxis needed anymore, could be missing something though.approx_hsgp_hyperparamsabout usage.XstoX. 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 theXssyntax for a while?Also, didn't make this change, but what do people think about not returning
Sfromapprox_hsgp_hyperparams, so it would just returnmandc? 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/