-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential problem in branch-type classification of cycle #166
Comments
@kushaangupta can you please include complete imports, screenshots, and outputs when making issues? At any rate, wow that is not what I expected to see:
What I expected to happen is that the "junction" at the bottom right would be cleared by the MST method, and then there would be a single loop, going from 4 to 4. So this indeed appears to be a major bug. I don't think it's at the classification step, but at the graph simplification and traversal steps. |
Done
I understand. So, is the problem in |
More likely, in how we use it, here: Lines 774 to 814 in f606888
|
☝️ that's super-suspicious 😂 I wonder if that factor, combined with the new traversal algorithm (#152) have created an error. If I remember correctly, the algorithm sets the entries to 0. But it might actually need to delete the entries (relatively expensive, as it requires copying the whole csr graph), or we need to change the algorithm to ignore 0 entries. |
Actually, I think copying the graph is better than having an additional |
@kushaangupta and I just had a meeting where we tried to hash this out, and we realised that this is not really a bug at all, it's only a bug in our expectations of what should happen in such a graph. In fact, the node 4 is not a junction node, so skan's current interpretation is correct: there are two junction nodes, 2 and 3, and there are three ways to get from one to the other: via the direct edge, via 0 and 1, and via 4. One implication of this is that the junction graph will need to support being a multi-graph. This is difficult/impossible with a csr graph. 😞 |
The following minimal skeleton is not being classified as cycle in summary. I was wondering if it's a problem or a compromise of the current algorithm for branch-type classification.
At present only paths with
src == dst
are classified as cycles, but what about the case where two paths have samesrc, dst
nodes?The text was updated successfully, but these errors were encountered: