pawelswoboda/RAMA

Edge Costs - Infinite

Closed this issue · 1 comments

I am currently using your python solver. According to your documentation edge costs should be defined as floating numbers.

In my graph, I simply want to prevent some specific nodes from belonging to the same cluster. I am planning to do this by creating "edges with a really high negative cost" between nodes that should not be merged together.

  • Do you think such an approach is possible with your solver?
  • Does your python solver support np.inf and -np.inf as edge costs?

Hi, thanks for your interest.

  1. RAMA does not support this function theoretically, it is because when we merge some nodes we do not check whether there is a constraint present disallowing such merger.
  2. Practically if might be that assigning a high negative cost will disallow such mergers because of our dual message passing scheme. You can give it a try. However, the solver does not support infinities but possibly you can assign a value such as -10 * maximum absolute edge cost to disallow such mergers.