# ott.geometry.costs.ElasticSqKOverlap#

class ott.geometry.costs.ElasticSqKOverlap(k, *args, **kwargs)[source]#

Cost with squared k-overlap norm regularization .

$\frac{1}{2} \|\cdot\|_2^2 + \frac{1}{2} \text{scaling_reg} \|\cdot\|_{ovk}^2$

where $$\|\cdot\|_{ovk}^2$$ is the squared k-overlap norm, see def. 2.1 of .

Parameters:
• k (int) – Number of groups. Must be in [0, d) where $$d$$ is the dimensionality of the data.

• args – Positional arguments for RegTICost.

• kwargs (Any) – Keyword arguments for RegTICost.

Methods

 all_pairs(x, y) Compute matrix of all pairwise costs, including the norms. Compute matrix of all pairwise costs, excluding the norms. barycenter(weights, xs) Output barycenter of vectors. h(z) TI function acting on difference of $$x-y$$ to output cost. Legendre transform of h() when it is convex. h_transform(f, **kwargs) Compute the h-transform of a concave function. pairwise(x, y) Compute cost as evaluation of h() on $$x-y$$. prox_legendre_reg(z[, tau]) Proximal operator of the Legendre transform of reg(). prox_reg(z[, tau]) Proximal operator of reg(). Regularization function. twist_operator(vec, dual_vec, variable) Twist inverse operator of the cost function.

Attributes