Skip to content

Mean Functions

AbstractMeanFunction

AbstractMeanFunction()

Bases: Module

Mean function that is used to parameterise the Gaussian process.

__call__ abstractmethod

__call__(x)

Evaluate the mean function at the given points. This method is required for all subclasses.

Parameters:

  • x (Float[Array, ' D']) –

    The point at which to evaluate the mean function.

Returns:

  • Float[Array, 'N O'] –

    Float[Array, "1]: The evaluated mean function.

__add__

__add__(other)

Add two mean functions.

Parameters:

Returns:

__mul__

__mul__(other)

Multiply two mean functions.

Parameters:

Returns:

Constant

Constant(constant=0.0)

Bases: AbstractMeanFunction

Constant mean function.

A constant mean function. This function returns a repeated scalar value for all inputs. The scalar value itself can be treated as a model hyperparameter and learned during training but defaults to 1.0.

__add__

__add__(other)

Add two mean functions.

Parameters:

Returns:

__mul__

__mul__(other)

Multiply two mean functions.

Parameters:

Returns:

__call__

__call__(x)

Evaluate the mean function at the given points.

Parameters:

  • x (Float[Array, ' D']) –

    The point at which to evaluate the mean function.

Returns:

  • Float[Array, 'N O'] –

    Float[Array, "1"]: The evaluated mean function.

Zero

Zero()

Bases: Constant

Zero mean function.

The zero mean function. This function returns a zero scalar value for all inputs. Unlike the Constant mean function, the constant scalar zero is fixed, and cannot be treated as a model hyperparameter and learned during training.

__call__

__call__(x)

Evaluate the mean function at the given points.

Parameters:

  • x (Float[Array, ' D']) –

    The point at which to evaluate the mean function.

Returns:

  • Float[Array, 'N O'] –

    Float[Array, "1"]: The evaluated mean function.

__add__

__add__(other)

Add two mean functions.

Parameters:

Returns:

__mul__

__mul__(other)

Multiply two mean functions.

Parameters:

Returns:

CombinationMeanFunction

CombinationMeanFunction(means, operator, **kwargs)

Bases: AbstractMeanFunction

A base class for products or sums of AbstractMeanFunctions.

__add__

__add__(other)

Add two mean functions.

Parameters:

Returns:

__mul__

__mul__(other)

Multiply two mean functions.

Parameters:

Returns:

__call__

__call__(x)

Evaluate combination kernel on a pair of inputs.

Parameters:

  • x (Float[Array, ' D']) –

    The point at which to evaluate the mean function.

Returns:

  • Float[Array, 'N O'] –

    Float[Array, " Q"]: The evaluated mean function.