ott.geometry.geometry.Geometry.apply_kernel#

Geometry.apply_kernel(scaling, eps=None, axis=0)[source]#

Apply kernel_matrix on positive scaling vector.

This function applies the ground geometry’s kernel, to perform either output = K v (1) output = K’u (2) where K is [num_a, num_b]

Parameters
  • scaling (ndarray) – jnp.ndarray [num_a or num_b] , scaling of size num_rows or num_cols of kernel_matrix

  • eps (Optional[float]) – passed for consistency, not used yet.

  • axis (int) – standard kernel product if axis is 1, transpose if 0.

Return type

ndarray

Returns

a jnp.ndarray corresponding to output above, depending on axis.