Skip to content
Snippets Groups Projects
Commit 7d5d2572 authored by Yassin's avatar Yassin
Browse files

Updating df

parent 48a784c1
No related branches found
No related tags found
No related merge requests found
......@@ -23,11 +23,11 @@ def disparity(data, weight='weight'):
w = float(g[node][neighbour]['weight'])
p_ij = w/strength[node]
alpha_ij = (1-p_ij)**(k-1)
if 'alpha' in g[node][neighbour]:
if alpha_ij < g[node][neighbour]['alpha']:
g[node][neighbour]['alpha'] = alpha_ij
if 'p_value' in g[node][neighbour]:
if alpha_ij < g[node][neighbour]['p_value']:
g[node][neighbour]['p_value'] = alpha_ij
else:
g[node][neighbour]['alpha'] = alpha_ij
g[node][neighbour]['p_value'] = alpha_ij
return Backbone(g, name="Disparity Filter", column="p_value", ascending=True, filters=[threshold_filter, fraction_filter])
# b = nx.Graph()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment