The construct_gaussian_process function#
Aliases#
halerium.core.template.construct_gaussian_process
- construct_gaussian_process(name, shape, kernel, axis=-1, mean=None, variable_class=<class 'halerium.core.variable.static_variable.StaticVariable'>)#
Construct a Gaussian process based on a shape and a kernel. The Gaussian process will be constructed by convolving a standard normal variable with the procided kernel along the specified axis or axes. The Gaussian process will be constructed as a Variable or StaticVariable depending on the provided variable_class. This variable will contain the standard normal variable as well as the kernel. This special construction will be treated differently when posterior graphs are built to keep the convolution properties.
- Parameters:
name (str) – The name of the constructed variable.
shape (tuple) – The target shape of the Gaussian process
kernel (Operator, numpy.ndarray or tuple or list) – The kernel. Must not depend on Variable instances, only on StaticVariable instances. If a tuple or list is provided it must contain operators and the axis argument must be a list or tuple of the same length.
axis (int, tuple or list, optional) – The axis or axes on which are to be convolved with the kernel. If a list or tuple is provided as axis and kernel is a list or tuple as well the kernels are applied to their corresponding axis. If a list or tuple is provided as axis and kernel is a single operator the same kernel is applied to all axis entries. The default is -1.
mean (Operator , optional) – an additional mean to provide to the Gaussian process. The default is None.
variable_class (type, optional) – The desired class for the Gaussian process. Either StaticVariable or Variable. The default is StaticVariable.
- Returns:
The constructed Gaussian process of the specified variable_class type.
- Return type:
Variabe or StaticVariable