Open
Description
Motivation
It's common to see warnings like this:
import torch
from botorch.models import SingleTaskGP
x = torch.linspace(-5, 10, 100).unsqueeze(-1)
model = SingleTaskGP(train_X=x, train_Y=x)
/botorch/models/utils/assorted.py:173: InputDataWarning:
Input data is not contained to the unit cube. Please consider min-max scaling the input data.
/botorch/models/utils/assorted.py:201: InputDataWarning:
Input data is not standardized. Please consider scaling the input to zero mean and unit variance.
Pitch
To improve these warnings,
- Make it clear which of these is about
train_X
and which is abouttrain_Y
. (Should the y data be "outcome" data?) - Suggest using transforms to fix this. In this case, a better implementation would be
import torch
from botorch.models import SingleTaskGP
from botorch.models.transforms.input import Normalize
from botorch.models.transforms.outcome import Standardize
x = torch.linspace(-5, 10, 100).unsqueeze(-1)
model = SingleTaskGP(
train_X=x,
train_Y=x,
input_transform=Normalize(d=1),
outcome_transform=Standardize(m=1)
)
Are you willing to open a pull request? (See CONTRIBUTING)
Yes, but this is pretty easy so it would make a good first task for a newcomer