Skip to content

ExactOT

ExactOT(n_batches=1)

Bases: PlanPaths

Exact OT plans (POT emd), squared Euclidean cost.

Parameters:

  • 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.