ott.initializers.linear.initializers.SubsampleInitializer#
- class ott.initializers.linear.initializers.SubsampleInitializer(subsample_n_x, subsample_n_y=None, **kwargs)[source]#
Subsample initializer [Thornton and Cuturi, 2022].
Subsample each
PointCloud
, then computeSinkhorn potential
from the subsampled approximations and use this potential to initialize Sinkhorn potentials/scalings for the original problem.- Parameters:
subsample_n_x (
int
) – number of points to subsample from the first measure inPointCloud
.subsample_n_y (
Optional
[int
]) – number of points to subsample from the second measure inPointCloud
. IfNone
, usesubsample_n_x
.
Methods
init_dual_a
(ot_prob, lse_mode[, rng])Initialize Sinkhorn potential/scaling f_u.
init_dual_b
(ot_prob, lse_mode[, rng])Initialize Sinkhorn potential/scaling g_v.