DefaultScaler¶
- class baybe.scaler.DefaultScaler[source]¶
Bases:
Scaler
A scaler that normalizes inputs to the unit cube and standardizes targets.
Public methods
__init__
(searchspace)fit_transform
(x, y)Fit the scaler using the given training data and transform the data.
transform
(x)Scale a given input.
untransform
(mean, variance)Transform mean values and variances back to the original domain.
Public attributes and properties
Class variable for all subclasses
Class variable encoding the type of the scaler.
- fit_transform(x: Tensor, y: Tensor)[source]¶
Fit the scaler using the given training data and transform the data.
- transform(x: Tensor)¶
Scale a given input.
- Parameters:
x (
Tensor
) – The given input.- Return type:
- Returns:
The scaled input.
- Raises:
RuntimeError – If the scaler is not fitted first.
- untransform(mean: Tensor, variance: Tensor)¶
Transform mean values and variances back to the original domain.