cosine

Contents

cosine#

luas.kernels.cosine(x: Array, y: Array, P: Any) Array[source]#

Cosine kernel, used with luas.kernels.evaluate_kernel to build covariance matrices which have periodic covariance.

\[k(x, y) = \cos\Bigg(\frac{2\pi|x - y|}{P}\Bigg)\]
Parameters:
  • x (JAXArray) – Input vector 1

  • y (JAXArray) – Input vector 2

  • P (Scalar) – Period

Returns:

Covariance between two input vectors

Return type:

JAXArray