graphs.frequent_pattern_graph_miner =================================== .. py:module:: graphs.frequent_pattern_graph_miner .. autoapi-nested-parse:: 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 ---------- .. autoapisummary:: graphs.frequent_pattern_graph_miner.edge_array graphs.frequent_pattern_graph_miner.frequency_table Functions --------- .. autoapisummary:: graphs.frequent_pattern_graph_miner.construct_graph graphs.frequent_pattern_graph_miner.create_edge graphs.frequent_pattern_graph_miner.find_freq_subgraph_given_support graphs.frequent_pattern_graph_miner.freq_subgraphs_edge_list graphs.frequent_pattern_graph_miner.get_bitcode graphs.frequent_pattern_graph_miner.get_cluster graphs.frequent_pattern_graph_miner.get_distinct_edge graphs.frequent_pattern_graph_miner.get_frequency_table graphs.frequent_pattern_graph_miner.get_nodes graphs.frequent_pattern_graph_miner.get_support graphs.frequent_pattern_graph_miner.my_dfs graphs.frequent_pattern_graph_miner.preprocess graphs.frequent_pattern_graph_miner.print_all Module Contents --------------- .. py:function:: construct_graph(cluster, nodes) .. py:function:: create_edge(nodes, graph, cluster, c1) create edge between the nodes .. py:function:: find_freq_subgraph_given_support(s, cluster, graph) find edges of multiple frequent subgraphs .. py:function:: freq_subgraphs_edge_list(paths) returns Edge list for frequent subgraphs .. py:function:: get_bitcode(edge_array, distinct_edge) Return bitcode of distinct_edge .. py:function:: get_cluster(nodes) Returns cluster format cluster:{WT(bitcode):nodes with same WT} .. py:function:: 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'] .. py:function:: get_frequency_table(edge_array) Returns Frequency Table .. py:function:: 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']} .. py:function:: 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] .. py:function:: my_dfs(graph, start, end, path=None) find different DFS walk from given node to Header node .. py:function:: 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']]) .. py:function:: print_all() -> None .. py:data:: edge_array :value: [['ab-e1', 'ac-e3', 'ad-e5', 'bc-e4', 'bd-e2', 'be-e6', 'bh-e12', 'cd-e2', 'ce-e4', 'de-e1',... .. py:data:: frequency_table