-
Notifications
You must be signed in to change notification settings - Fork 5
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
igraph::laplacian_matrix(normalized = TRUE)
changes in igraph 2.0.0
#18
Comments
To clarify, this isn't a new normalization behaviour but a bug fix for the case when the graph contains self-loops. The old behaviour was incorrect so it won't be restored. Are you sure you want to use the Laplacian of a graph with loops? For complete clarity, this is how igraph (and most authors) define the Laplacian where These definitions were not followed properly by 1.6 when the diagonal of Something to pay attention to here is that this definition assumes that each self-loop adds 2 (or twice its weight) to the diagonal of the adjacency matrix. This is implied by the definition of |
Thank you for bringing this to our attention and for the helpful clarifications. To give some context on what we were doing here: We initially released our package in both python and R, and our aim was to achieve the exact same numerical result from spectral embedding in R as with Here is the test result from python
Given the new behavior of igraph, it sounds like we need to remove self loops to achieve this. My understanding is we can do this setting
If this seems appropriate to you, I will make that change. |
You don't need to cycle the graph through an adjacency matrix to remove self-loops. You can simply use |
Ok thanks. I will simplify in the next patch. Closing this issue now, I hope this resolves the reverse dependency issue above. Feel free to open a new issue if something else is needed. |
Upstream: igraph/rigraph#1102 (comment).
Tracker: igraph/rigraph#989.
Can you work with
normalized = FALSE
or adapt to the new normalization behavior? It might be hard to restore the original behavior.The text was updated successfully, but these errors were encountered: