# ott.solvers.linear.sinkhorn_lr.LRSinkhorn#

class ott.solvers.linear.sinkhorn_lr.LRSinkhorn(rank, gamma=10.0, gamma_rescale=True, epsilon=0.0, initializer='random', lse_mode=True, inner_iterations=10, use_danskin=True, implicit_diff=False, kwargs_dys=None, kwargs_init=None, **kwargs)[source]#

A Low-Rank Sinkhorn solver for linear reg-OT problems.

The algorithm is described in and the implementation contained here is adapted from LOT.

The algorithm minimizes a non-convex problem. It therefore requires special care to initialization and convergence. Convergence is evaluated on successive evaluations of the objective. The algorithm is only provided for the balanced case.

Parameters

Methods

 Create a low-rank Sinkhorn initializer. dykstra_update(c_q, c_r, h, gamma, ot_prob) rtype Tuple[Array, Array, Array] init_state(ot_prob, init) Return the initial state of the loop. kernel_step(ot_prob, state, iteration) Not implemented. lse_step(ot_prob, state, iteration) LR Sinkhorn LSE update. one_iteration(ot_prob, state, iteration, ...) Carries out one LR sinkhorn iteration. output_from_state(ot_prob, state) Create an output from a loop state.

Attributes

 is_entropic Whether entropy regularization is used. norm_error Powers used to compute the p-norm between marginal/target. outer_iterations Upper bound on number of times inner_iterations are carried out.