-
Notifications
You must be signed in to change notification settings - Fork 21
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
Documentation branch #38
base: master
Are you sure you want to change the base?
Conversation
brainconn/centrality/centrality.py
Outdated
@@ -817,3 +857,16 @@ def subgraph_centrality(CIJ): | |||
# compute eigenvector centr. | |||
Cs = np.real(np.dot(vecs * vecs, np.exp(vals))) | |||
return Cs # imaginary part from precision error | |||
|
|||
def Leverage_centrality: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to define functions with parentheses, even if they're empty. We also need to include the word "pass" when the function isn't running yet.
So instead of
def Leverage_centrality:
"""Documentation...
"""
we should have:
def Leverage_centrality():
"""Documentation...
"""
pass
brainconn/centrality/centrality.py
Outdated
|
||
""" | ||
|
||
def Delta_centrality (G): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function names should be lower snake case, so Delta_centrality
--> delta_centrality
, Degree_centrality
--> degree_centrality
, Leverage_centrality
--> leverage_centrality
.
brainconn/centrality/centrality.py
Outdated
""" | ||
Node betweenness centrality is the fraction of all shortest paths in | ||
the network that contain a given node. Nodes with high values of | ||
betweenness centrality participate in a large number of shortest paths. | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also don't want these extra spaces here.
These changes look good, but I'll hold off on merging the PR until we consolidate some functions and address the failing tests in other work. |
Closes # .
Changes proposed in this pull request: