Skip to content
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

Resistance distance not correct #103

Open
jonschwenk opened this issue Aug 21, 2024 · 2 comments
Open

Resistance distance not correct #103

jonschwenk opened this issue Aug 21, 2024 · 2 comments

Comments

@jonschwenk
Copy link
Collaborator

The resistance distance function has been found to produce incorrect values when compared against other implementations.

Immediate stopgap will be to print a warning when the function is run that its output should not be trusted.

@jonschwenk
Copy link
Collaborator Author

I can't recall specifics, but from what I can tell, the computation of the TopoDist variable (in Alex's original code) must have been done with a Matlab function for which there wasn't an exact replica that I could find in python. RivGraph's solution appears to have been a simple shortest path algorithm, but "shortest" refers only to the number of nodes along a path, without consideration for their actual lengths. Not 100% sure if this is the problem; trying to find Alex's original code.

@jonschwenk
Copy link
Collaborator Author

Code updated to print a warning statement when computing resistance distance. Once fixed we can release a new version so it's available in conda and pip RivGraph installations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant