moscot.backends.ott.SinkhornSolver¶
- class moscot.backends.ott.SinkhornSolver(jit=True, rank=-1, epsilon=0.0, initializer=None, initializer_kwargs=mappingproxy({}), **kwargs)[source]¶
Solver for the linear problem.
The (Kantorovich relaxed) OT problem is defined by two distributions in the same space. The aim is to obtain a probabilistic map from the source distribution to the target distribution such that the (weighted) sum of the distances between coupled data point in the source and the target distribution is minimized.
- Parameters:
rank (
int
) – Rank of the solver. If -1, useSinkhorn
[Cuturi, 2013], otherwise, useLRSinkhorn
[Scetbon et al., 2021].epsilon (
float
) – Additional epsilon regularization for the low-rank approach.initializer (
Union
[Literal
['default'
,'gaussian'
,'sorting'
],Literal
['random'
,'rank2'
,'k-means'
,'generalized-k-means'
],None
]) – Initializer forSinkhorn
orLRSinkhorn
, depending on therank
.initializer_kwargs (
Mapping
[str
,Any
]) – Keyword arguments for the initializer.kwargs (
Any
) – Keyword arguments forSinkhorn
orLRSinkhorn
, depending on therank
.
Methods
__call__
([xy, x, y, tags, device])Solve an optimal transport problem.
Attributes