piglot.optimisers.botorch.dataset.Standardiser

class Standardiser(std_tol: float = 1e-06)[source]

Bases: object

Standardisation transformation.

Methods

fit

Fit the standardisation transformation to the given data.

to

Move the standardiser to a given device.

transform

Standardise data.

untransform

Unstandardise data.

fit(data: Tensor) None[source]

Fit the standardisation transformation to the given data.

Parameters

datatorch.Tensor

Data to fit the standardisation transformation to.

to(device: str) Standardiser[source]

Move the standardiser to a given device.

Parameters

devicestr

Device to move the standardiser to.

Returns

Standardiser

The standardiser in the new device.

transform(values: torch.Tensor, covariances: torch.Tensor | None = None) torch.Tensor | Tuple[torch.Tensor, torch.Tensor][source]

Standardise data.

Parameters

valuestorch.Tensor

Values to transform.

covariancestorch.Tensor | None

Variances to transform, if any.

Returns

torch.Tensor | Tuple[torch.Tensor, torch.Tensor]

Transformed values and covariances (if any).

untransform(data: Tensor) Tensor[source]

Unstandardise data.

Parameters

datatorch.Tensor

Data to unstandardise.

Returns

torch.Tensor

Unstandardised data.