graphs.frequent_pattern_graph_miner

FP-GraphMiner - A Fast Frequent Pattern Mining Algorithm for Network Graphs

A novel Frequent Pattern Graph Mining algorithm, FP-GraphMiner, that compactly represents a set of network graphs as a Frequent Pattern Graph (or FP-Graph). This graph can be used to efficiently mine frequent subgraphs including maximal frequent subgraphs and maximum common subgraphs.

URL: https://www.researchgate.net/publication/235255851

Attributes

edge_array

frequency_table

Functions

construct_graph(cluster, nodes)

create_edge(nodes, graph, cluster, c1)

create edge between the nodes

find_freq_subgraph_given_support(s, cluster, graph)

find edges of multiple frequent subgraphs

freq_subgraphs_edge_list(paths)

returns Edge list for frequent subgraphs

get_bitcode(edge_array, distinct_edge)

Return bitcode of distinct_edge

get_cluster(nodes)

Returns cluster

get_distinct_edge(edge_array)

Return Distinct edges from edge array of multiple graphs

get_frequency_table(edge_array)

Returns Frequency Table

get_nodes(frequency_table)

Returns nodes

get_support(cluster)

Returns support

my_dfs(graph, start, end[, path])

find different DFS walk from given node to Header node

preprocess(edge_array)

Preprocess the edge array

print_all(→ None)

Module Contents

graphs.frequent_pattern_graph_miner.construct_graph(cluster, nodes)
graphs.frequent_pattern_graph_miner.create_edge(nodes, graph, cluster, c1)

create edge between the nodes

graphs.frequent_pattern_graph_miner.find_freq_subgraph_given_support(s, cluster, graph)

find edges of multiple frequent subgraphs

graphs.frequent_pattern_graph_miner.freq_subgraphs_edge_list(paths)

returns Edge list for frequent subgraphs

graphs.frequent_pattern_graph_miner.get_bitcode(edge_array, distinct_edge)

Return bitcode of distinct_edge

graphs.frequent_pattern_graph_miner.get_cluster(nodes)

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

graphs.frequent_pattern_graph_miner.get_distinct_edge(edge_array)

Return Distinct edges from edge array of multiple graphs >>> sorted(get_distinct_edge(edge_array)) [‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’, ‘g’, ‘h’]

graphs.frequent_pattern_graph_miner.get_frequency_table(edge_array)

Returns Frequency Table

graphs.frequent_pattern_graph_miner.get_nodes(frequency_table)

Returns nodes format nodes={bitcode:edges that represent the bitcode} >>> get_nodes([[‘ab’, 5, ‘11111’], [‘ac’, 5, ‘11111’], [‘df’, 5, ‘11111’], … [‘bd’, 5, ‘11111’], [‘bc’, 5, ‘11111’]]) {‘11111’: [‘ab’, ‘ac’, ‘df’, ‘bd’, ‘bc’]}

graphs.frequent_pattern_graph_miner.get_support(cluster)

Returns support >>> get_support({5: {‘11111’: [‘ab’, ‘ac’, ‘df’, ‘bd’, ‘bc’]}, … 4: {‘11101’: [‘ef’, ‘eg’, ‘de’, ‘fg’], ‘11011’: [‘cd’]}, … 3: {‘11001’: [‘ad’], ‘10101’: [‘dg’]}, … 2: {‘10010’: [‘dh’, ‘bh’], ‘11000’: [‘be’], ‘10100’: [‘gh’], … ‘10001’: [‘ce’]}, … 1: {‘00100’: [‘fh’, ‘eh’], ‘10000’: [‘hi’]}}) [100.0, 80.0, 60.0, 40.0, 20.0]

graphs.frequent_pattern_graph_miner.my_dfs(graph, start, end, path=None)

find different DFS walk from given node to Header node

graphs.frequent_pattern_graph_miner.preprocess(edge_array)

Preprocess the edge array >>> preprocess([[‘ab-e1’, ‘ac-e3’, ‘ad-e5’, ‘bc-e4’, ‘bd-e2’, ‘be-e6’, ‘bh-e12’, … ‘cd-e2’, ‘ce-e4’, ‘de-e1’, ‘df-e8’, ‘dg-e5’, ‘dh-e10’, ‘ef-e3’, … ‘eg-e2’, ‘fg-e6’, ‘gh-e6’, ‘hi-e3’]])

graphs.frequent_pattern_graph_miner.print_all() None
graphs.frequent_pattern_graph_miner.edge_array = [['ab-e1', 'ac-e3', 'ad-e5', 'bc-e4', 'bd-e2', 'be-e6', 'bh-e12', 'cd-e2', 'ce-e4', 'de-e1',...
graphs.frequent_pattern_graph_miner.frequency_table