Skip to content

Multioutput gp.Latent #4764

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

Closed
wants to merge 7 commits into from
Closed

Conversation

bwengals
Copy link
Contributor

This PR adds support for multi-output GPs, or matrix instead of just vector y inputs. There have been a few requests for this on discourse, most recently this one.

Not sure yet, but I think that for some GP implementations, vector y will need have shape (n, 1) instead of (n, ), in the same way the X inputs do, which would be a breaking change (if there's no way to broadcast it automatically in aesara?).

At this point, the very basics of gp.Marginal work with matrix Y, but none of the other implementations do.

  • Would it be better to have separate PRs to add this functionality to each type of GP, or to have one large PR that addresses all implementations at the same time?
  • Should this point towards main or v3 or v4?

@fonnesbeck
Copy link
Member

fonnesbeck commented Jun 12, 2021

v4 has been merged, so definitely for main

Nothing wrong with doing marginal GP first, and then latent in a separate PR, but this isnt core functionality, so it can certainly wait if you'd prefer.

@@ -36,7 +36,7 @@ def __call__(self, x):


identity = Identity()
logit = at.nnet.sigmoid
logit = at.sigmoid
Copy link
Member

Choose a reason for hiding this comment

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

Confused why this file is here after #4682.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

weird, I'll double check where exactly my main is at

pymc3/gp/gp.py Outdated
@@ -15,7 +15,7 @@
import functools
import warnings

import aesara.tensor as at
import aesara.tensor as aet
Copy link
Member

Choose a reason for hiding this comment

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

at is correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

gotcha, happy to flip it back

@bwengals
Copy link
Contributor Author

bwengals commented Jun 14, 2021

@fonnesbeck sounds good. I think I'll try and keep them separate then if that's alright so the PRs are smaller (fixed the PR title).

@bwengals bwengals changed the title Multioutput GPs Multioutput gp.Latent Jun 14, 2021
@michaelosthege
Copy link
Member

Looking through some old PRs... @bwengals do you want to get back to this one?
The GP module needs a some refactoring (#5053) as part of the 4.0.0-beta2 milestone and any help there would be greatly appreciated!

@bwengals
Copy link
Contributor Author

bwengals commented Oct 4, 2021

@michaelosthege thanks for the nudge. Yes, I'll prioritize #5035 and this for 4.0. It's important to get this in

@codecov
Copy link

codecov bot commented Nov 23, 2021

Codecov Report

Merging #4764 (7a2d3e7) into main (b8522dc) will decrease coverage by 10.62%.
The diff coverage is 13.33%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #4764       +/-   ##
===========================================
- Coverage   78.96%   68.33%   -10.63%     
===========================================
  Files          88       88               
  Lines       14248    14254        +6     
===========================================
- Hits        11251     9741     -1510     
- Misses       2997     4513     +1516     
Impacted Files Coverage Δ
pymc/gp/util.py 35.10% <0.00%> (-59.58%) ⬇️
pymc/gp/gp.py 17.88% <16.66%> (-75.73%) ⬇️
pymc/ode/utils.py 17.85% <0.00%> (-82.15%) ⬇️
pymc/gp/cov.py 29.20% <0.00%> (-68.88%) ⬇️
pymc/ode/ode.py 24.24% <0.00%> (-60.61%) ⬇️
pymc/tests/models.py 40.28% <0.00%> (-47.49%) ⬇️
pymc/gp/mean.py 51.28% <0.00%> (-46.16%) ⬇️
pymc/distributions/shape_utils.py 52.84% <0.00%> (-46.03%) ⬇️
... and 21 more

@ricardoV94
Copy link
Member

@bwengals Is this PR still relevant / being pursued?

@bwengals
Copy link
Contributor Author

Ah thanks for the nudge @ricardoV94, yes I need to finish this up. Can we keep it open? It shouldn't be too much work either I just need to do it

@ricardoV94
Copy link
Member

Ah thanks for the nudge @ricardoV94, yes I need to finish this up. Can we keep it open? It shouldn't be too much work either I just need to do it

Of course :)

@bwengals
Copy link
Contributor Author

bwengals commented Jul 6, 2022

Gonna close, @danhphan is working on improvements to this

@bwengals bwengals closed this Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants