Closed sumpfork closed 8 years ago
Seems like I'm misunderstanding the output of this algorithm - sum(a[range(8),hungarian.lap(a)[0]])
gives the correct sum.
Ah okay, thanks for looking into it.
Now that scipy has their own hungarian implementation I should probably just deprecate this package in favor of theirs, so thanks for alerting me to that as well.
Please do not - the scipy one is incredibly slow on large problems.
This package runs in about 36 minutes on my matrix, I have yet to see the scipy one return after a day or running.
I'm also trying the dlib one now, as it has python bindings through boost-python.
Interesting! Alright I'll keep it alive then, and maybe see if I can speed up scipy's version too…
I think scipy adopted https://github.com/ben-eysenbach/munkres which is pure python. I had fixed it up for my own use before I noticed it in scipy, but it was already way too slow.
And for the record, while dlib is slightly faster on than this project on a smaller matrix, it is already 4 minutes slower on my system (11.5 vs 7.5 minutes) on a 10k x 10k matrix.
It may be that I'm not understanding how to use this code correctly, but as I'm interpreting the output on the example included with this package it is not optimal. The scipy implementation finds the correct one.