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
.all_pairs_pairwise
(x, y)Compute matrix of all pairwise costs, excluding the
norms
.barycenter
(weights, xs)Barycentric operator.
pairwise
(x, y)Compute cost between \(x\) and \(y\).
Attributes