ramsey.experimental#
Experimental modules such as Gaussian processes or Bayesian neural networks.
Warning
Experimental code is not native Ramsey code and subject to change, and might even get deleted in the future.
Better don’t build critical code bases around the ramsey.experimental submodule.
Covariance functions#
|
Exponentiated quadratic covariance function. |
|
Linear covariance function. |
|
Periodic covariance function. |
|
Exponentiated-quadratic convariance function. |
|
Linear convariance function. |
|
Periodic convariance function. |
ExponentiatedQuadratic#
- class ramsey.experimental.ExponentiatedQuadratic(active_dims=None, *, rho_init=<function constant.<locals>.init>, sigma_init=<function constant.<locals>.init>, param_dtype=<class 'jax.numpy.float32'>, rngs)[source]#
Exponentiated quadratic covariance function.
- Parameters:
active_dims – either None or a list of integers. Specified the dimensions of the data on which the kernel operates on
rho_init – Optional[Initializer] an initializer object from Haiku or None
sigma_init – Optional[Initializer] an initializer object from Haiku or None
param_dtype – parameter type
rngs – a random seed generator
- ramsey.experimental.exponentiated_quadratic(x1, x2, sigma, rho)[source]#
Exponentiated-quadratic convariance function.
- Parameters:
x1 – (n x p)-dimensional set of data points
x2 – (m x p)-dimensional set of data points
sigma – the standard deviation of the kernel function
rho – the length-scale of the kernel function. Can be a float or a \(p\)-dimensional vector if ARD-behaviour is desired
- Returns:
returns a (n x m)-dimensional kernel matrix
Linear#
- class ramsey.experimental.Linear(active_dims=None, *, sigma_b_init=<function uniform.<locals>.init>, sigma_v_init=<function uniform.<locals>.init>, offset_init=<function zeros>, param_dtype=<class 'jax.numpy.float32'>, rngs)[source]#
Linear covariance function.
- Parameters:
active_dims – the indexes of the dimensions the kernel acts upon
sigma_b_init – an initializer object from Flax or None
sigma_v_init – an initializer object from Flax or None
offset_init – an initializer object from Flax or None
rngs – a random seed generator
- ramsey.experimental.linear(x1, x2, sigma_b, sigma_v, offset)[source]#
Linear convariance function.
- Parameters:
x1 – \(n x p\)-dimensional set of data points
x2 – \(m x p\)-dimensional set of data points
sigma_b – the standard deviation of the kernel function
sigma_v – the standard deviation of the kernel function
offset – float
- Returns:
returns a \(n x m\)-dimensional Gram matrix
Periodic#
- class ramsey.experimental.Periodic(period, active_dims=None, *, rho_init=<function constant.<locals>.init>, sigma_init=<function constant.<locals>.init>, param_dtype=<class 'jax.numpy.float32'>, rngs)[source]#
Periodic covariance function.
- Parameters:
period – the period of the periodic kernel
active_dims – either None or a list of integers. Specified the dimensions of the data on which the kernel operates on
rho_init – an initializer object
sigma_init – an initializer object from Haiku or None
param_dtype – parameter type
rngs – a random seed generator
- ramsey.experimental.periodic(x1, x2, period, sigma, rho)[source]#
Periodic convariance function.
- Parameters:
x1 – (n x p)-dimensional set of data points
x2 – (m x p)-dimensional set of data points
period – the period
sigma – the standard deviation of the kernel function
rho – the length-scale of the kernel function. Can be a float or a \(p\)-dimensional vector if ARD-behaviour is desired
- Returns:
returns a (n x m)-dimensional Gram matrix