DebiasedSinkhorn
DebiasedSinkhorn(reg=0.5, stop_thr=None, method='sinkhorn_log', warm_start=True, n_paths=None)
Bases: MapPaths
Debiased Sinkhorn map computed on the node cloud itself.
On interval k, with the pushed nodes q and the cells y of the next snapshot,
the entropic plans P_ab: q -> y and P_aa: q -> q (cost |x - y|^2 / 2,
regularization reg, uniform weights) give every node its debiased displacement,
read on the cloud's own points::
z_i = q_i + sum_j n P_ab[i, j] y_j - sum_m n P_aa[i, m] q_m
The step vanishes when the pushed cloud and the next snapshot have the same law, so
the true dynamics is a fixed point of the iterated construction. The Sinkhorn
potentials are kept between calls to :meth:fit, to warm-start the next round of an
iteration.
Parameters:
-
reg(float, default:0.5) –Entropic regularization in data units, on the cost
|x - y|^2 / 2. Should be at least a few times the squared nearest-neighbour distance of the snapshots. -
stop_thr(float or None, default:None) –Sinkhorn marginal tolerance. If
None, 1e-8 in float64 and 1e-5 in lower precision (1e-8 is not reachable in float32). -
method(str, default:'sinkhorn_log') –POT backend name.
-
warm_start(bool, default:True) –Start every Sinkhorn solve from the potentials of the previous one.
-
n_paths(int or None, default:None) –Number of paths (see :class:
MapPaths).
moments(n_paths=None, generator=None)
First two moments of the path nodes.
Empirical moments of :meth:sample (normalized by the number of paths).
Ensembles fitted on exact laws override this with the exact moments.
Parameters:
-
n_paths(int or None, default:None) –Number of paths passed to :meth:
sample. -
generator(Generator or None, default:None) –Optional RNG for reproducible sampling.
Returns:
-
means(torch.Tensor of shape (nsnaps, ndim)) –Mean of the nodes at every snapshot time.
-
covs(torch.Tensor of shape (nsnaps, nsnaps, ndim, ndim)) –covs[j, k]is the covariance between the nodes at timesjandk.