-
Notifications
You must be signed in to change notification settings - Fork 46
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
Conversation
@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. |
There was a problem hiding this 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)
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,
): |
@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!