Mean Functions
AbstractMeanFunction
Bases: Module
Mean function that is used to parameterise the Gaussian process.
__call__
abstractmethod
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 two mean functions.
Parameters:
-
other
(AbstractMeanFunction
) βThe other mean function to add.
Returns:
-
AbstractMeanFunction
(AbstractMeanFunction
) βThe sum of the two mean functions.
__mul__
Multiply two mean functions.
Parameters:
-
other
(AbstractMeanFunction
) βThe other mean function to multiply.
Returns:
-
AbstractMeanFunction
(AbstractMeanFunction
) βThe product of the two mean functions.
Constant
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 two mean functions.
Parameters:
-
other
(AbstractMeanFunction
) βThe other mean function to add.
Returns:
-
AbstractMeanFunction
(AbstractMeanFunction
) βThe sum of the two mean functions.
__mul__
Multiply two mean functions.
Parameters:
-
other
(AbstractMeanFunction
) βThe other mean function to multiply.
Returns:
-
AbstractMeanFunction
(AbstractMeanFunction
) βThe product of the two mean functions.
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__
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 two mean functions.
Parameters:
-
other
(AbstractMeanFunction
) βThe other mean function to add.
Returns:
-
AbstractMeanFunction
(AbstractMeanFunction
) βThe sum of the two mean functions.
__mul__
Multiply two mean functions.
Parameters:
-
other
(AbstractMeanFunction
) βThe other mean function to multiply.
Returns:
-
AbstractMeanFunction
(AbstractMeanFunction
) βThe product of the two mean functions.
CombinationMeanFunction
Bases: AbstractMeanFunction
A base class for products or sums of AbstractMeanFunctions.
__add__
Add two mean functions.
Parameters:
-
other
(AbstractMeanFunction
) βThe other mean function to add.
Returns:
-
AbstractMeanFunction
(AbstractMeanFunction
) βThe sum of the two mean functions.
__mul__
Multiply two mean functions.
Parameters:
-
other
(AbstractMeanFunction
) βThe other mean function to multiply.
Returns:
-
AbstractMeanFunction
(AbstractMeanFunction
) βThe product of the two mean functions.