@@ -541,7 +541,27 @@ function sinkhorn_barycenter(
541541 return u_all[1 , :] .* (K_all[1 ] * v_all[1 , :])
542542end
543543
544- function ot_reg_plan (mu, nu, C, eps; reg_func = " L2" , method = " lorenz" , kwargs... )
544+ """
545+ ot_reg_plan(mu, nu, C, eps; reg_func = "L2", method = "lorenz", kwargs...)
546+
547+ Compute the optimal transport plan between `mu` and `nu` for optimal transport with a
548+ general choice of regulariser `math Ω(γ)`. Solves for `gamma` that minimises
549+
550+ ```math
551+ \\ inf_{γ ∈ Π(μ, ν)} \\ langle γ, C \\ rangle + ε Ω(γ)
552+ ```
553+
554+ Supported choices of `math Ω` are:
555+ - L2: `math Ω(γ) = \\ frac{1}{2} \\ | γ \\ |_2^2`, `reg_func = "L2"`
556+
557+ Supported solution methods are:
558+ - L2: `method = "lorenz"` for the semi-smooth Newton method of Lorenz et al.
559+
560+ References
561+
562+ Lorenz, D.A., Manns, P. and Meyer, C., 2019. Quadratically regularized optimal transport. Applied Mathematics & Optimization, pp.1-31.
563+ """
564+ function ot_reg_plan (mu, nu, C, eps; reg_func= " L2" , method= " lorenz" , kwargs... )
545565 if (reg_func == " L2" ) && (method == " lorenz" )
546566 return quadreg (mu, nu, C, eps; kwargs... )
547567 else
0 commit comments