ott.geometry.costs.Cosine#
- class ott.geometry.costs.Cosine(ridge=1e-08)[source]#
Cosine distance cost function.
- Parameters:
ridge (
float
) – Ridge regularization.
Methods
all_pairs
(x, y)Compute matrix of all pairwise costs, including the
norms
.barycenter
(weights, xs)Barycentric operator.
twist_operator
(vec, dual_vec, variable)Twist inverse operator of the cost function.