You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe a bit late, but Force Atlas 2 is a algorithm for undirected graphs. This means that every edge from node1 to node2 has a equal edge from node2 to node1 (-> edges have no direction).
This implies that G, the weight matrix of the graph, is symmetric: The entry G[node1, node2] of that matrix contains the weight for the edge node1->node2. For undirected graphs this implies that the edge node2->node1 has the same weight, so G[node1, node2] == G[node2, node1] has to be True for every entry in G (0 means "no edge").
The line of code you mentions means exactly that: It checks if G is symmetric and raises the AssertionError if the check fails.
In short: The weight matrix of your graph is not symmetric, so your graph is not undirected, so Force Atlas 2 can not help you here.
If you are sure that the graph is undirected, maybe it is a floating point precision error (like 1 != 1.000000000001).
A good compromise of the code would then be to take the abs net edge weight in creation of a symmetric graph. That would replace the assertion error with a simple warning, allowing the code to run for all usercases.
The text was updated successfully, but these errors were encountered: