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

Alternate Design forms: Weighted Graphs for Correlation Networks #118

Closed
BradKML opened this issue Dec 10, 2021 · 2 comments
Closed

Alternate Design forms: Weighted Graphs for Correlation Networks #118

BradKML opened this issue Dec 10, 2021 · 2 comments

Comments

@BradKML
Copy link

BradKML commented Dec 10, 2021

Observing https://github.com/holtzy/The-Python-Graph-Gallery/blob/master/src/notebooks/327-network-from-correlation-matrix.ipynb
With reference to WestHealth/pyvis#123 and

Instead of using thresholds, is it possible to simply weight the connections between 0 and infinity?

https://towardsdatascience.com/eveything-you-need-to-know-about-interpreting-correlations-2c485841c0b8

On this page, anything under 0.3 makes negligible correlation, and anything over 0.9 is clearly correlated, with 0.6 being the middle of correlation significance. Possibly, for scaling purposes (where 0 correlation leads to 0 weight, and 0.6 correlation leads to 1, 1 correlated to b^0.583):

from numpy import tanh, exp
def scale(x):
    return exp(tanh((x-0.6)/0.6))
@BradKML
Copy link
Author

BradKML commented Dec 11, 2021

@holtzy
Copy link
Owner

holtzy commented Mar 21, 2024

Hi!
Thanks a lot for the feedback!
I think this is a bit too specific/niche for the gallery. We are just here to give some simple & educational graph examples!

@holtzy holtzy closed this as completed Mar 21, 2024
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

2 participants