Skip to content

Sinkhorn

Sinkhorn(reg=0.1, method='sinkhorn', n_batches=1)

Bases: PlanPaths

Entropic OT plans (POT sinkhorn), squared Euclidean cost.

Parameters:

  • reg (float, default: 0.1 ) –

    Entropic regularization (on the squared Euclidean cost).

  • method (str, default: 'sinkhorn' ) –

    POT backend name.

  • n_batches (int, default: 1 ) –

    Number of mini-batches.

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 times j and k.