MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / get_cluster

Function get_cluster

graphs/frequent_pattern_graph_miner.py:88–96  ·  view source on GitHub ↗

Returns cluster format cluster:{WT(bitcode):nodes with same WT}

(nodes)

Source from the content-addressed store, hash-verified

86
87
88def get_cluster(nodes):
89 """
90 Returns cluster
91 format cluster:{WT(bitcode):nodes with same WT}
92 """
93 cluster = {}
94 for key, value in nodes.items():
95 cluster.setdefault(key.count("1"), {})[key] = value
96 return cluster
97
98
99def get_support(cluster):

Callers 1

Calls 1

countMethod · 0.80

Tested by

no test coverage detected