Standardise#

class gpjax.xarray.Standardise(names=None, loc=None, scale=None)[source]#

Bases: InputTransform

Centre and scale inputs to zero mean and unit standard deviation.

The mean and standard deviation come from the training cells. A new grid is scaled with the training values, so one lengthscale means the same distance in training and in prediction.

Parameters:
names#

The columns to standardise. None standardises every column present when the transform runs.

Type:

collections.abc.Sequence[str] | None

loc#

The fitted training mean of each column; None before fitting.

Type:

dict[str, float] | None

scale#

The fitted training standard deviation of each column; None before fitting.

Type:

dict[str, float] | None

Expand for references to gpjax.xarray.Standardise

Working with Gridded Data

fit(columns)[source]#

Record the mean and standard deviation of each named column.

Raises:

ValueError – If a name is not a column, or a column is constant.

Parameters:

columns (dict[str, ndarray])

Return type:

Standardise