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

Trajectory samplers now work with mean functions #556

Merged
merged 9 commits into from
May 17, 2022

Conversation

henrymoss
Copy link
Collaborator

@sebastianober noticed that I had been stupid and forgotten to take into account mean functions in my decoupled sampling implementation.

This is now fixed and I have added extra tests to make sure this cant happen again!

@henrymoss
Copy link
Collaborator Author

@uri-granta at the moment the high level FeatureDecompositionTrajectorySampler is defined for any probabilistic model. However, these samplers only really work for very specific models (i.e. FeatureDecompositionInternalDataModel and FeatureDecompositionInducingPointModel).

Is there a way to specify this requirement for the high level FeatureDecompositionTrajectorySampler rather than at the lower level RandomFourierFeatureTrajectorySampler and DecoupledTrajectorySampler. At the moment I had to do a slightly weird lazy init for the mean function in the init of FeatureDecompositionTrajectorySampler as general probabilistic models do not have mean functions.

Copy link
Collaborator

@uri-granta uri-granta left a comment

Choose a reason for hiding this comment

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

Looks good! (though I wouldn't trust me to catch any other omissions where the mean function needs to be accounted for but isn't)

@uri-granta
Copy link
Collaborator

Is there a way to specify this requirement for the high level FeatureDecompositionTrajectorySampler rather than at the lower level RandomFourierFeatureTrajectorySampler and DecoupledTrajectorySampler.

Not sure I fully understand. If FeatureDecompositionTrajectorySampler only supports the same model types as DecoupledTrajectorySampler then why can't you just define it in the same way:

class FeatureDecompositionTrajectorySampler(
    TrajectorySampler[
        Union[
            FeatureDecompositionInducingPointModel,
            FeatureDecompositionInternalDataModel,
        ]],
    ABC,
):

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.

Decoupled trajectory samplers for GPflow models do not use mean function
2 participants