pymc-devs / pymc

Bayesian Modeling and Probabilistic Programming in Python
https://docs.pymc.io/
Other
8.47k stars 1.97k forks source link

HSGP improvements #7335

Closed AlexAndorra closed 1 month ago

AlexAndorra commented 1 month ago

Closes #7240

Working on this in concert with @bwengals for this example

Type of change


📚 Documentation preview 📚: https://pymc--7335.org.readthedocs.build/en/7335/

AlexAndorra commented 1 month ago

The failing test on Windows isn't related to these changes 🤷‍♂️ All the tests are passing

AlexAndorra commented 1 month ago

Thanks @juanitorduz ! I just pushed all the changes.

is there a test where we verify the mean sustraction works as expected in the out-of-sample case?

Good point. Added it

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 73.68421% with 15 lines in your changes are missing coverage. Please review.

Project coverage is 92.37%. Comparing base (fd11cf0) to head (3ca2c2b). Report is 22 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/pymc-devs/pymc/pull/7335/graphs/tree.svg?width=650&height=150&src=pr&token=JFuXtOJ4Cb&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs)](https://app.codecov.io/gh/pymc-devs/pymc/pull/7335?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs) ```diff @@ Coverage Diff @@ ## main #7335 +/- ## ========================================== - Coverage 92.49% 92.37% -0.13% ========================================== Files 102 102 Lines 17173 17208 +35 ========================================== + Hits 15885 15896 +11 - Misses 1288 1312 +24 ``` | [Files](https://app.codecov.io/gh/pymc-devs/pymc/pull/7335?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs) | Coverage Δ | | |---|---|---| | [pymc/gp/hsgp\_approx.py](https://app.codecov.io/gh/pymc-devs/pymc/pull/7335?src=pr&el=tree&filepath=pymc%2Fgp%2Fhsgp_approx.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs#diff-cHltYy9ncC9oc2dwX2FwcHJveC5weQ==) | `88.52% <73.68%> (-7.08%)` | :arrow_down: | ... and [25 files with indirect coverage changes](https://app.codecov.io/gh/pymc-devs/pymc/pull/7335/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs)
bwengals commented 1 month ago

Looks like there's one failing test mentioning _X_mean,

         assert np.allclose(
            gp._X_mean, original_mean
>       ), "gp._X_mean should not change after updating data for out-of-sample predictions."
E       AttributeError: 'HSGP' object has no attribute '_X_mean'