summaryrefslogtreecommitdiff
path: root/ot/optim.py
AgeCommit message (Collapse)Author
2023-03-16[MRG] fix bugs of gw_entropic and armijo to run on gpu (#446)Cédric Vincent-Cuaz
* maj gw/ srgw/ generic cg solver * correct pep8 on current state * fix bug previous tests * fix pep8 * fix bug srGW constC in loss and gradient * fix doc html * fix doc html * start updating test_optim.py * update tests gromov and optim - plus fix gromov dependencies * add symmetry feature to entropic gw * add symmetry feature to entropic gw * add exemple for sr(F)GW matchings * small stuff * remove (reg,M) from line-search/ complete srgw tests with backend * remove backend repetitions / rename fG to costG/ fix innerlog to True * fix pep8 * take comments into account / new nx parameters still to test * factor (f)gw2 + test new backend parameters in ot.gromov + harmonize stopping criterions * split gromov.py in ot/gromov/ + update test_gromov with helper_backend functions * manual documentaion gromov * remove circular autosummary * trying stuff * debug documentation * alphabetic ordering of module * merge into branch * add note in entropic gw solvers * fix exemples/gromov doc * add fixed issue to releases.md * fix bugs of gw_entropic and armijo to run on gpu * add pr to releases.md * fix pep8 * fix call to backend in line_search_armijo * correct docstring generic_conditional_gradient --------- Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2023-03-09[MRG] Semi-relaxed (fused) gromov-wasserstein divergence and improvements of ↵Cédric Vincent-Cuaz
gromov-wasserstein solvers (#431) * maj gw/ srgw/ generic cg solver * correct pep8 on current state * fix bug previous tests * fix pep8 * fix bug srGW constC in loss and gradient * fix doc html * fix doc html * start updating test_optim.py * update tests gromov and optim - plus fix gromov dependencies * add symmetry feature to entropic gw * add symmetry feature to entropic gw * add exemple for sr(F)GW matchings * small stuff * remove (reg,M) from line-search/ complete srgw tests with backend * remove backend repetitions / rename fG to costG/ fix innerlog to True * fix pep8 * take comments into account / new nx parameters still to test * factor (f)gw2 + test new backend parameters in ot.gromov + harmonize stopping criterions * split gromov.py in ot/gromov/ + update test_gromov with helper_backend functions * manual documentaion gromov * remove circular autosummary * trying stuff * debug documentation * alphabetic ordering of module * merge into branch * add note in entropic gw solvers --------- Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2022-03-24[MRG] Domain adaptation and unbalanced solvers with backend support (#343)Nathan Cassereau
* First draft * Add matrix inverse and square root to backend * Eigen decomposition for older versions of pytorch (1.8.1 and older) * Corrected eigen decomposition for pytorch 1.8.1 and older * Spectral theorem is a thing * Optimization * small optimization * More functions converted * pep8 * remove a warning and prepare torch meshgrid for future torch release (which will change default indexing) * dots and pep8 * Meshgrid corrected for older version and prepared for future versions changes * New backend functions * Base transport * LinearTransport * All transport classes + pep8 * PR added to release file * Jcpot barycenter test * unbalanced with backend * pep8 * bug solve * test of domain adaptation with backends * solve bug for tic toc & macos * solving scipy deprecation warning * solving scipy deprecation warning attempt2 * solving scipy deprecation warning attempt3 * A warning is triggered when a float->int conversion is detected * bug solve * docs * release file updated * Better handling of float->int conversion in EMD * Corrected test for is_floating_point * docs * release file updated * cupy does not allow implicit cast * fromnumpy * added test * test da tf jax * test unbalanced with no provided histogram * using type_as argument in unif function correctly * pep8 * transport plan cast in emd changed behaviour, now trying to cast as histogram's dtype, defaulting to cost matrix Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2021-12-03[MRG] Cupy backend (#315)Nathan Cassereau
* Cupy backend * pep8 + bug * working even if cupy not installed * attempt to force codecov to ignore cupy because no gpu can be used for testing on github * docstring * readme
2021-11-17[MRG] SinkhornL1L2 bug solve (#313)Nathan Cassereau
* Now limiting alpha to a minimum value as well as a max value * Docs * typo
2021-11-17[MRG] SinkhornL1L2Transport bug (#312)Nathan Cassereau
* solve bug * Linesearch no longer return None as alpha, only 0
2021-11-04[MRG] Make gromov loss differentiable wrt matrices and weights (#302)Rémi Flamary
* grmov differentable * new stuff * test gromov gradients * fgwdifferentiable * fgw tested * correc name test * add awesome example with gromov optimizatrion * pep8+ typos * damn pep8 * thunbnail * remove prints
2021-11-03[MRG] Docs updates (#298)ncassereau-idris
* bregman docs * sliced docs * docs partial * unbalanced docs * stochastic docs * plot docs * datasets docs * utils docs * dr docs * dr docs corrected * smooth docs * docs da * pep8 * docs gromov * more space after min and argmin * docs lp * bregman docs * bregman docs mistake corrected * pep8 Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2021-11-02[MRG] Backend for gromov (#294)ncassereau-idris
* bregman: small correction * gromov backend first draft * Removing decorators * Reworked casting method * Bug solve * Removing casting * Bug solve * toarray renamed todense ; expand_dims removed * Warning (jax not supporting sparse matrix) moved * Mistake corrected * test backend * Sparsity test for older versions of pytorch * Trying pytorch/1.10 * Attempt to correct torch sparse bug * Backend version of gromov tests * Random state introduced for remaining gromov functions * review changes * code coverage * Docs (first draft, to be continued) * Gromov docs * Prettified docs * mistake corrected in the docs * little change Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2021-10-27[WIP] Sinkhorn in log space (#290)Rémi Flamary
* adda sinkhorn log and working sinkhorn2 function * more tests pass * more tests pass * it works but not by default yet * remove warningd * update circleci doc * update circleci doc * new sinkhorn implemeted but not by default * better * doctest pass * test doctest * new test utils * remove pep8 errors * remove pep8 errors * doc new implementtaion with log * test sinkhorn 2 * doc for log implementation
2021-10-25[MRG] Backend for optim (#282)ncassereau-idris
* Backend for optim * Bug solve * Doc update * backend tests now with fixture * Unused imports removed * Docs * Docs * Docs * Outer product backend docs * Prettier docs * Pep8 * Mistakes corrected Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2021-09-28[MRG] Regularized OT (optim.cg) bug solve (#286)ncassereau-idris
* Line search stops when derphi is 0 instead of bugging out like in some instances * pep8 compliance * Tests
2021-04-19[MRG] Cleanup test warnings (#242)Rémi Flamary
* remove warnings in tests from docstrings * working tets for bregman implemneted methods * pep8
2020-08-24Check if alpha is not None when restricting it to be at most 1 (#199)Panayiotis Panayiotou
* Check if alpha is not None when restricting it to be at most 1 * Write check more clearly * Add no regression test for line search armijo returning None for alpha Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
2020-06-22Revert "[WIP] Update bregman.py : barycenter_sinkhorn function (#195)" (#196)Rémi Flamary
This reverts commit b2eae39e8a422b18ecc3fadc08bc909ee1dae55f.
2020-06-22[WIP] Update bregman.py : barycenter_sinkhorn function (#195)Rémi Flamary
* Update bregman.py * correct call to function Co-authored-by: FerdinandGns <56926826+FerdinandGns@users.noreply.github.com>
2020-05-26Restrict Armijo linesearch function step to be at most 1 (#189)Panayiotis Panayiotou
Thanks for the modification @panpan2
2020-04-24better doc per moduleRémi Flamary
2019-11-15fix bug numItermax emd in cgKilian
2019-07-09trailing spacesAlexandre Gramfort
2019-07-09moreAlexandre Gramfort
2019-06-04changes forgotten comentstvayer
2019-05-29code review1tvayer
2019-05-29relative+absolute losstvayer
2019-05-29Doc+armijotvayer
2019-05-29wizard stufftvayer
2019-05-29python2 divide problemtvayer
2019-05-29test checktvayer
2019-05-29pep8tvayer
2019-05-28solve conlicttvayer
2019-05-28FGW+gromov changestvayer
2018-03-21add linear mapping test + autopep8Rémi Flamary
2017-07-26pep8Rémi Flamary
2017-07-26add license and authors on all modulesRémi Flamary
2017-07-20pep8Alexandre Gramfort
2016-12-02cleanup pyflakes issue #23Rémi Flamary
2016-11-09da with GLNicolas Courty
2016-11-08da with GLNicolas Courty
2016-11-07gcgNicolas Courty
2016-11-04doc nonlinear mapping estimationRémi Flamary
2016-11-04add mapping estimation with kernels works!Rémi Flamary
2016-11-02add mapping estimation (still debugging)Rémi Flamary
2016-10-28relative pathRémi Flamary
2016-10-28update bregman with docRémi Flamary
2016-10-28update doc optim+bregman; add log to sinkhornRémi Flamary
2016-10-27rename emd module to lpRémi Flamary
2016-10-27demo optimRémi Flamary
2016-10-26add conditionnal gradient and demoRémi Flamary
2016-10-26add conditionnal gradient and demoRémi Flamary