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

Robust Gaussian Processes via Relevance Pursuit #2608

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions botorch/models/gpytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,21 +387,23 @@ def _apply_noise(
obs_noise = observation_noise.squeeze(-1)
mvn = self.likelihood(
mvn,
X,
[X],
noise=obs_noise.expand(noise_shape),
)
elif isinstance(self.likelihood, FixedNoiseGaussianLikelihood):
# Use the mean of the previous noise values (TODO: be smarter here).
observation_noise = self.likelihood.noise.mean(dim=-1, keepdim=True)
mvn = self.likelihood(
mvn,
X,
[X],
noise=observation_noise.expand(noise_shape),
)
else:
mvn = self.likelihood(mvn, X)
mvn = self.likelihood(mvn, [X])
return mvn

# pyre-ignore[14]: Inconsistent override. Could not find parameter
# `Keywords(typing.Any)` in overriding signature.
def posterior(
self,
X: Tensor,
Expand Down Expand Up @@ -470,6 +472,7 @@ def posterior(
return posterior_transform(posterior)
return posterior

# pyre-ignore[14]: Inconsistent override. Could not find parameter `noise`.
def condition_on_observations(
self, X: Tensor, Y: Tensor, **kwargs: Any
) -> BatchedMultiOutputGPyTorchModel:
Expand Down Expand Up @@ -632,7 +635,7 @@ def batch_shape(self) -> torch.Size:
raise NotImplementedError(msg + " that are not broadcastble.")
return next(iter(batch_shapes))

# pyre-fixme[15]: Inconsistent override in return types
# pyre-fixme[14]: Inconsistent override in return types
def posterior(
self,
X: Tensor,
Expand Down Expand Up @@ -838,6 +841,8 @@ def _apply_noise(
)
return self.likelihood(mvn, X)

# pyre-ignore[14]: Inconsistent override. Could not find parameter
# `Keywords(typing.Any)` in overriding signature.
def posterior(
self,
X: Tensor,
Expand Down
453 changes: 453 additions & 0 deletions botorch/models/likelihoods/sparse_outlier_noise.py

Large diffs are not rendered by default.

Loading
Loading