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

rich_club function not defined as expected #114

Open
wingedRuslan opened this issue Jun 3, 2019 · 2 comments
Open

rich_club function not defined as expected #114

wingedRuslan opened this issue Jun 3, 2019 · 2 comments

Comments

@wingedRuslan
Copy link
Collaborator

Hi @KirstieJane,

While replicating (running) visualization functions and reporting the results of running them, some questions appeared regarding the rich_club function.

rich_club is similarly implemented in 2 different locations.

  1. scona.graph_measures.rich_club(G)
  2. as a method inside BrainNetwork class

According to docstrings, both implementations do the same thing - Calculate the rich club coefficient of G for each degree between 0 and max([degree(v) for v in G.nodes])

Why are there 2 similar implementations (makes things confusing)?

However, none of these satisfies to make inputs for plot_rich_club. From docstring:

rc and rc_rand are calculated by the rich_club function that is saved within the networkx_functions.py file

So there is no networkx_functions.py file and I am hesitating how can I obtain rc_rand - the random rich club data.
Do I need to make a random graph and then apply one of the above-mentioned rich_club functions in order to make a rc_rand?

@KirstieJane
Copy link
Member

Heya! Here's the networkx_functions file - same one I linked to in #115 - https://github.com/KirstieJane/NSPN_CODE/blob/master/networkx_functions.py.

The duplication is probably because we haven't refactored the code yet! That's your summer project 🌞 @Islast is the best person to ask about where it should end up.

Sorry for the short reply - I'm rushing between talks.

@Islast
Copy link
Collaborator

Islast commented Jun 5, 2019

Re the duplication of certain methods, read the documentation on the BrainNetwork class. All class methods are duplicated in this way.

As for the inputs to the visualisation functions, the functions were originally written with inputs from certain written out blocks of data. I advise that you scrap these old-style inputs and rewrite the functions to accept input in the format output by the scona functions as they currently exist.

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

3 participants