Skip to content

UnbalancedSinkhorn

UnbalancedSinkhorn(reg=0.1, reg_m=10.0, method='sinkhorn', n_batches=1)

Bases: Sinkhorn

Unbalanced entropic plans (POT sinkhorn_unbalanced).

Snapshot masses are proportional to the snapshot sizes, and the paths carry masses computed from the plans (relative mass growth along each path).

Parameters:

  • reg (float, default: 0.1 ) –

    Entropic regularization.

  • reg_m (float, default: 10.0 ) –

    Marginal relaxation.

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