OllieBoyne / sslap

Auction Algorithm for Sparse Linear Assignment Problems
MIT License
11 stars 6 forks source link

wrong matching result #7

Closed saurabhgup1 closed 2 years ago

saurabhgup1 commented 2 years ago

Hi,

I was trying to use auction solver in one of my solution. While comparing it to scipy linear sum assignment I saw results are not same. Attached is an example with 1 object and 8 people. Scipy is picking the right value (40.4) and auction solver failed to pick it.

Screenshot 2022-07-27 at 2 56 12 PM
OllieBoyne commented 2 years ago

Hi,

Please try modifying the eps_start value given as input to the algorithm to see if you can find a better initialisation. The chosen epsilon value (half of the maximum value) was tested on larger, sparse matrices and works well to balance convergence quality and speed. I haven't tuned it to dense, very unbalanced matrices as you have here.

You can read more about the algorithm here.

For example, if I set eps_start = 1, auction_solve produces the correct output.

Hope this helps!

saurabhgup1 commented 2 years ago

thanks for the quick response @OllieBoyne As I tried for larger sparse matrices as well and results are totally different than scipy. That didn't give me confidence. So, when ever I want to run auction_solve as a best practice get the half of the maximum cost value and use that as eps_start?

OllieBoyne commented 2 years ago

The start value of epsilon will affect the convergence. For many sparse problems, initialising at half of the maximum value provides a good starting point. If you find this isn't the case, you should experiment with what value works well for your problem.

You can read more about the algorithm here.