Python bipartite matching

Does anyone know of any Python module that computes the best bipartisan correspondence? I tried the following two:

  1. munkres
  2. hungarian
However, in my case, I have to deal with an incomplete graph (i.e. there should not be an edge between two nodes), and therefore, there can be no match if the node does not have an edge. These two packages seem to be unable to handle this.

Any tips?

+5
source share
1 answer

Set the cost to infinity or great value for an edge that does not exist. You can then determine if an invalid edge has been used.

+5
source

All Articles