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

Fix WhiteNoise Covariance bug #6674

Merged
merged 3 commits into from
Apr 26, 2023
Merged

Fix WhiteNoise Covariance bug #6674

merged 3 commits into from
Apr 26, 2023

Conversation

dehorsley
Copy link
Contributor

@dehorsley dehorsley commented Apr 14, 2023

Since #6458, Covariance is now the base class for kernels/covariance functions with input_dim and active_dims, which does not include WhiteNoise and Constant kernels. While #6458 introduced the BaseCovariance class to make this distinction, it looks like WhiteNoise was inadvertently not updated to use the new base class.

Combination kernels, which use instance of Covariance to test for the presents of input_dim and active_dims, fail with a WhiteNoise kernel input.

Bugfixes


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

@ricardoV94 ricardoV94 added GP Gaussian Process bug labels Apr 18, 2023
@codecov
Copy link

codecov bot commented Apr 18, 2023

Codecov Report

Merging #6674 (345895e) into main (1ed4475) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6674      +/-   ##
==========================================
- Coverage   91.99%   91.97%   -0.02%     
==========================================
  Files          94       94              
  Lines       15944    15944              
==========================================
- Hits        14667    14664       -3     
- Misses       1277     1280       +3     
Impacted Files Coverage Δ
pymc/gp/cov.py 97.84% <100.00%> (ø)
pymc/gp/gp.py 93.82% <100.00%> (ø)

... and 1 file with indirect coverage changes

Since pymc-devs#6458, Covariance is now the base class for kernels/covariance
functions with input_dim and active_dims, which does not include
WhiteNoise and Constant kernels.
@ricardoV94 ricardoV94 changed the title fix WhiteNoise subclassing from Covariance (#6673) Fix WhiteNoise subclassing from Covariance Apr 19, 2023
@bwengals
Copy link
Contributor

Hey @dehorsley, looks like tests are passing. Ready for review+merge, or is there more you were planning on doing?

@dehorsley
Copy link
Contributor Author

Hi @bwengals, yup ready to merge!

Copy link
Contributor

@bwengals bwengals left a comment

Choose a reason for hiding this comment

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

Looks great, thank you for this fix!

@ricardoV94 ricardoV94 merged commit a86fe7c into pymc-devs:main Apr 26, 2023
@welcome
Copy link

welcome bot commented Apr 26, 2023

Congratulations Banner
Congrats on merging your first pull request! 🎉 We here at PyMC are proud of you! 💖 Thank you so much for your contribution 🎁

@ricardoV94 ricardoV94 changed the title Fix WhiteNoise subclassing from Covariance Fix WhiteNoise Covariance bug Apr 26, 2023
@ricardoV94 ricardoV94 changed the title Fix WhiteNoise Covariance bug Fix WhiteNoise Covariance bug Apr 26, 2023
@dehorsley dehorsley deleted the fix6673 branch May 22, 2023 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug GP Gaussian Process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants