ott.initializers.linear.initializers.SortingInitializer.init_fu#
- SortingInitializer.init_fu(ot_prob, lse_mode, rng=None, init_f=None)[source]#
Apply DualSort algorithm.
- Parameters:
ot_prob (
LinearProblem
) – OT problem between discrete distributions.lse_mode (
bool
) – Return potential ifTrue
, scaling ifFalse
.rng (
Optional
[Array
]) – Random number generator for stochastic initializers, unused.init_f (
Optional
[Array
]) – potential f, array of size[n,]
. This is the starting potential, which is then updated to make the init potential, so an init of an init.
- Return type:
- Returns:
potential/scaling f_u, array of size
[n,]
.