ott.geometry.costs.SoftDTW#
- class ott.geometry.costs.SoftDTW(gamma, ground_cost=None, debiased=False)[source]#
Soft dynamic time warping (DTW) cost [Cuturi and Blondel, 2017].
- Parameters:
gamma (
float) – Smoothing parameter \(> 0\) for the soft-min operator.ground_cost (
Optional[CostFn]) – Ground cost function. IfNone, useSqEuclidean.debiased (
bool) – Whether to compute the debiased soft-DTW [Blondel et al., 2021].
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.