scikit-adaptation / skada

Domain adaptation toolbox compatible with scikit-learn and pytorch
https://scikit-adaptation.github.io/
BSD 3-Clause "New" or "Revised" License
54 stars 16 forks source link

Add frank-wolfe algorithm #126

Closed antoinedemathelin closed 2 months ago

antoinedemathelin commented 4 months ago

Hi everyone, I propose to add the Frank-wolfe algorithm to speed KMM. (almost 20 times faster in the small example). It can be used for KLIEP and Tars too, in the future.

Cf paper https://webdocs.cs.ualberta.ca/~dale/papers/ijcai15.pdf

Cf PR #93 PR #108

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.91%. Comparing base (4950a16) to head (3ee0d45).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #126 +/- ## ========================================== + Coverage 91.85% 91.91% +0.05% ========================================== Files 43 43 Lines 3400 3437 +37 ========================================== + Hits 3123 3159 +36 - Misses 277 278 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

rflamary commented 4 months ago

Hello @antoinedemathelin this is great.

I was thinking that we would add a parameter to qpsolve and insteda have _qpsolve_scipy and _qpsolve_frank_wolfe functions ? this would be nice because it means that in the methdos one can just apss the solver parameter.

rflamary commented 4 months ago

I see that your solver is less general but one can use the general function and taise an error if the constrainst cannot be solve by FW

antoinedemathelin commented 4 months ago

Hi @rflamary, Ok I can do that!

rflamary commented 2 months ago

I'm closing this PR since we have the new and improved #167