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

Rff sampler #195

Merged
merged 4 commits into from
Apr 10, 2023
Merged

Rff sampler #195

merged 4 commits into from
Apr 10, 2023

Conversation

henrymoss
Copy link
Contributor

I have added a method to the GP prior so that we can get approximate samples from the GP. I use the standard RFF approach to get samples with functional forms that can be cheaply queried as many times as we like.

henrymoss added 2 commits March 21, 2023 14:23
@thomaspinder thomaspinder self-requested a review March 21, 2023 15:06
Copy link
Collaborator

@thomaspinder thomaspinder left a comment

Choose a reason for hiding this comment

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

Good PR. Documentation and testing is excellent. Few minor comments to address and then we can merge.

gpjax/gps.py Outdated Show resolved Hide resolved
seed: KeyArray,
num_features: Optional[int] = 100,
) -> FunctionalSample:
"""Build an approximate sample from the Gaussian process prior. This method
Copy link
Collaborator

Choose a reason for hiding this comment

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

Think you'll need a raw string or double backslashes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

where?

Copy link
Collaborator

Choose a reason for hiding this comment

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

"""Build should be r"""Build

gpjax/gps.py Outdated Show resolved Hide resolved
@thomaspinder thomaspinder changed the base branch from main to v0.6 March 23, 2023 08:41
gpjax/gps.py Outdated Show resolved Hide resolved
seed: KeyArray,
num_features: Optional[int] = 100,
) -> FunctionalSample:
"""Build an approximate sample from the Gaussian process prior. This method
Copy link
Collaborator

Choose a reason for hiding this comment

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

"""Build should be r"""Build

gpjax/gps.py Show resolved Hide resolved
params: Dict,
train_data: Dataset,
key: KeyArray,
num_features: Optional[int] = 100,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is 100 sensible here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah actually, you dont need very many for the decoupled sampling!

@thomaspinder thomaspinder changed the base branch from v0.6_old to v0.6 April 10, 2023 19:34
@thomaspinder thomaspinder merged commit 46b7253 into v0.6 Apr 10, 2023
@daniel-dodd daniel-dodd deleted the rff_sampler branch May 12, 2023 19:12
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.

None yet

2 participants