Skip to content
Snippets Groups Projects

Adding new methods and the consensual backbone

Merged Ali Yassin requested to merge dev into main
1 file
+ 1
8
Compare changes
  • Side-by-side
  • Inline
+ 1
8
@@ -60,16 +60,9 @@ def fraction_filter(backbone, value, narrate=True, secondary_property='weight',
value = math.ceil(value * len(data))
return nx.from_pandas_edgelist(data[:value], edge_attr=edge_properties(data))
else:
print('hereeeeeeee')
b = backbone.graph.copy()
value = math.ceil(value * len(backbone.graph))
print(value)
print(list(data[:value].index))
b.remove_nodes_from(list(data[:value].index))
return b
return b.subgraph(list(data[:value].index))
print("The accepted filters for " + backbone.method_name + " are: " + ', '.join(
[fun.__name__ for fun in backbone.compatible_filters()]))
Loading