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

Include small world in plot_network_measures #131

Open
KirstieJane opened this issue Jul 5, 2019 · 3 comments
Open

Include small world in plot_network_measures #131

KirstieJane opened this issue Jul 5, 2019 · 3 comments
Assignees

Comments

@KirstieJane
Copy link
Member

At the moment plot_network_measures only includes assortativity, clustering, shortest path length, efficiency and modularity.

It really should also include the small world coefficient.

On thing that's important to note is that the small world coefficient is calculated for the real graph compared to each of the random graphs.

This means that - in comparison to the other measures - the variability will be on the "blue" bars - the bars representing the real graphs - rather than the grey ones (the random graphs).

That bar should be set to exactly 1.

The command: bundleGraphs.report_small_world("real_graph") returns a dictionary with keys real_graph_R0, real_graph_R1, real_graph_R2 etc. These correspond to the comparison of the graph labelled "real_graph" with R0 (itself), R1, R2 etc.


Another thing to note is that I don't think the small world measures are saved as part of the graph bundle after they've been calculated. It might be interesting to see if we can make it so you only have to run it once (similar to making random graphs etc).

(This might be better as its own issue, just shout if that's the case.)

@wingedRuslan wingedRuslan self-assigned this Jul 12, 2019
@wingedRuslan
Copy link
Collaborator

wingedRuslan commented Jul 12, 2019

@KirstieJane I would like to add this measure while I am creating a function to restructure DataFrame obtained from GraphBundle.report_global_measures() to an acceptable DataFrame for seaborn.barplot.

I've run the GraphBundle.report_small_world.
Did I understand the results correctly?

image

I am calculating the small coefficient of "Real_Graph" in GraphBundle relative to each other Graph in GraphBundle.
So, the small coefficient for "Real_Graph" and "Real_Graph_R0" is 1.6565, for "Real_Graph" and "Real_Graph_R1" is 1.6507 and so on.

On the figure, I need to display eror bar for "Real_Graph" and for random networks - constant value 1.

@wingedRuslan
Copy link
Collaborator

@KirstieJane, I've added small_world to network measures
Do you like it?

image

@wingedRuslan
Copy link
Collaborator

Ohhhh, plotting is slow, because inside the function I calculate the small coefficient of "real_graph" relative to each other graph in GraphBundle.
small_world = bundleGraphs.report_small_world(real_network)

It is needed to find a way how to store the calculated small world values and then inside the function simply access this data.

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