[MRG] New API for gromov solvers by rflamary · Pull Request #536 · PythonOT/POT
in this PR I propose the implementation of the new API for Gromov-Wasserstsein solvers. Similarly to ot.solve we now have a function ot.solve_gromov that can be used as follows
# Gromov Wassrerstein (GW) wity L2 loss res = ot.solve_gromov(Ca, Cb) # uniform weights res = ot.solve_gromov(Ca, Cb, a=a, b=b) # given weights # GW with KL loss res = ot.solve_gromov(Ca, Cb, loss='KL') # uniform weights # Fused Gromov-Wassertsein (FGW) res = ot.solve_gromov(Ca, Cb, M, alpha=0.5) # uniform weights res = ot.solve_gromov(Ca, Cb, M, a=a, b=b, alpha=0.1) # given weights # GW and FGW with entropy reg res = ot.solve_gromov(Ca, Cb, reg=1) # GW res = ot.solve_gromov(Ca, Cb, M, reg=1, alpha=0.5) # FGW # Semirelaxed GW and FGW res=ot.solve_gromov(Ca, Cb, unbalanced_type='semirelaxed') # GW res=ot.solve_gromov(Ca, Cb, M, unbalanced_type='semirelaxed') # FGW # partial GW res=ot.solve_gromov(Ca, Cb,unbalanced=0.8, unbalanced_type='partial') # partial GW with m=0.8 of mass transported #results can be obtained from OTResult() as res.plan # OT plan res.value # optimal loss (all objective with regularization is present) res.value_quad # quadratic (GW) part of the loss res.value_linear # linear (W) part of the loss for FGW