craffel / mir_eval

Evaluation functions for music/audio information retrieval/signal processing algorithms.
MIT License
588 stars 109 forks source link

Solves bss permutation efficiently #318

Open fakufaku opened 5 years ago

fakufaku commented 5 years ago

The current implementation of bss_eval exhaustively tests all permutations of sources which has factorial cost. It is possible to find the permutation in quadratic time using a minimum weight matching algorithm for bipartite graphs. This algorithm is implemented by the function scipy.optimize.linear_sum_assignment. A wrapper around the scipy function is added to handle possible infinite entries in the cost matrix.

I tried to run the tests, but got some errors due to missing files.

craffel commented 5 years ago

Thanks! I remember this being brought up before but I can't find any reference to it.

@faroit @aliutkus any thoughts?

fakufaku commented 4 years ago

Hi @craffel , thanks for the reply! I've also started discussing this with @aliutkus here.