Skip to content

Utils

build_student_t_distribution

build_student_t_distribution(nu)

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:

  • nu (int) โ€“

    The smoothness parameter of the Matรฉrn kernel.

Returns

tfp.Distribution: A Student's t distribution with the same smoothness parameter.

squared_distance

squared_distance(x, y)

Compute the squared distance between a pair of inputs.

Parameters:

  • x (Float[Array, ' D']) โ€“

    First input.

  • y (Float[Array, ' D']) โ€“

    Second input.

Returns

ScalarFloat: The squared distance between the inputs.

euclidean_distance

euclidean_distance(x, y)

Compute the euclidean distance between a pair of inputs.

Parameters:

  • x (Float[Array, ' D']) โ€“

    First input.

  • y (Float[Array, ' D']) โ€“

    Second input.

Returns

ScalarFloat: The euclidean distance between the inputs.