-
Notifications
You must be signed in to change notification settings - Fork 393
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
[Bug] Lengthscale change with and without normalization #2392
Comments
Standardizing data makes a difference because Let's delve into your example. import warnings
from gpytorch.mlls import ExactMarginalLogLikelihood
from botorch.models import SingleTaskGP
from botorch import fit_gpytorch_mll
from botorch.models.transforms.outcome import Standardize
from torch import tensor
import torch
import numpy as np
train_X = tensor(
[
[0.3660, 0.7463],
[0.8714, 0.4299],
[0.5104, 0.0620],
[0.1276, 0.9511]
],
dtype=torch.float64,
)
train_y = tensor([10000, 11000, 12000, 20000], dtype=torch.float64).reshape(-1, 1)
train_yvar = tensor([100, 200, 150, 100], dtype=torch.float64).reshape(-1, 1)
gpr = SingleTaskGP(
train_X=train_X,
train_Y=train_y,
train_Yvar=train_yvar
)
mll = ExactMarginalLogLikelihood(
likelihood=gpr.likelihood,
model=gpr
)
torch.manual_seed(0) # model fitting fails entirely for some seeds
_ = fit_gpytorch_mll(mll=mll) This prints out a bunch of warnings. One recommend standardizing the data:
Then there are several warnings that fitting the model is not going well:
I think that inconsistency in model fit explains the variability you're seeing rather than the (relatively small) change in the data. I'm getting a variety of lengthscales when I run this with different seeds. When I use a gpr = SingleTaskGP(
train_X=train_X,
train_Y=train_y,
train_Yvar=train_yvar,
outcome_transform=Standardize(m=1)
) |
Thank you for your explanation. |
🐛 Bug
I want to fit a Gaussian process over samples. After optimization, the lengthscale seems strange. I tried normalizing it and it appeared that normalization change lengthscale which is not expected.
To reproduce
** Code snippet to reproduce **
** Stack trace/error message **
Expected Behavior
We expect the lengthscale to be independent of the chosen normalization.
System information
Please complete the following information:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: