Skip to content

Utils

gpjax.kernels.stationary.utils

tfd = tfp.distributions module-attribute
build_student_t_distribution(nu: int) -> tfd.Distribution

Build a Student's t distribution with a fixed smoothness parameter.

For a fixed half-integer smoothness parameter, compute the spectral density of a Matérn kernel; a Student's t distribution.

Parameters:

Name Type Description Default
nu int

The smoothness parameter of the Matérn kernel.

required
Returns
tfp.Distribution: A Student's t distribution with the same smoothness parameter.
squared_distance(x: Float[Array, ' D'], y: Float[Array, ' D']) -> ScalarFloat

Compute the squared distance between a pair of inputs.

Parameters:

Name Type Description Default
x Float[Array, ' D']

First input.

required
y Float[Array, ' D']

Second input.

required
Returns
ScalarFloat: The squared distance between the inputs.
euclidean_distance(x: Float[Array, ' D'], y: Float[Array, ' D']) -> ScalarFloat

Compute the euclidean distance between a pair of inputs.

Parameters:

Name Type Description Default
x Float[Array, ' D']

First input.

required
y Float[Array, ' D']

Second input.

required
Returns
ScalarFloat: The euclidean distance between the inputs.