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

GPLVM implementation #1

Merged
merged 2 commits into from
Aug 19, 2022
Merged

GPLVM implementation #1

merged 2 commits into from
Aug 19, 2022

Conversation

thomaspinder
Copy link
Collaborator

This PR provides an implementation of the basic GPLVM with an application notebook.

Pull request type

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):



@dataclass
class _MultioutputData:
Copy link
Member

Choose a reason for hiding this comment

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

Are you envisioning this as a mixin class for HeterotopicDataset, HeterotopicDataset?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Less a mixin, more a superclass. A mixin could also work, but the existing code would need some refactoring.

Comment on lines +22 to +24
def _add_input(self, X):
self.X = X
return self
Copy link
Member

Choose a reason for hiding this comment

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

There might be a nicer way to add this functionality in future.


@property
def params(self) -> dict:
default_key = get_defaults()["key"]
Copy link
Member

Choose a reason for hiding this comment

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

This is nice for initialisation. It might be nice if the user can override this locally.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes - gpx.initialise really needs to accept a GPJax/MOGPJax object and a PRNGKey

@daniel-dodd
Copy link
Member

@thomaspinder Nice implementation! Just added some comments for some points to discuss in future. Happy to write some tests and get this merged.


@dataclass
class UnsupervisedDataset:
y: jnp.DeviceArray
Copy link
Member

Choose a reason for hiding this comment

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

We need to think of typing conventions, e.g., X: f64["N D"], y:f64["N Q"] if D is the dimension of X, and Q is the dimension of y.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes - very open to thoughts here. Also unsure of notational conventions within multi-output GPs.

@thomaspinder
Copy link
Collaborator Author

@thomaspinder Nice implementation! Just added some comments for some points to discuss in future. Happy to write some tests and get this merged.

Wonderful, thanks Dan. Have opened issues where relevant. I'll write some tests next week now that you're happy with the general structure.

@thomaspinder
Copy link
Collaborator Author

Unit tests are now in @daniel-dodd

@codecov
Copy link

codecov bot commented Aug 19, 2022

Codecov Report

❗ No coverage uploaded for pull request base (master@cef5d28). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master       #1   +/-   ##
=========================================
  Coverage          ?   93.84%           
=========================================
  Files             ?        3           
  Lines             ?       65           
  Branches          ?        0           
=========================================
  Hits              ?       61           
  Misses            ?        4           
  Partials          ?        0           
Flag Coverage Δ
unittests 93.84% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@daniel-dodd daniel-dodd merged commit bb5ce01 into master Aug 19, 2022
@daniel-dodd daniel-dodd deleted the gplvm branch December 16, 2022 14:36
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.

2 participants