ehab-abdelhamid / GraMi

GraMi is a novel framework for frequent subgraph mining in a single large graph, GraMi outperforms existing techniques by 2 orders of magnitudes. GraMi supports finding frequent subgraphs as well as frequent patterns, Compared to subgraphs, patterns offer a more powerful version of matching that captures transitive interactions between graph nodes (like friend of a friend) which are very common in modern applications. Also, GraMi supports user-defined structural and semantic constraints over the results, as well as approximate results. For more details, check our paper: Mohammed Elseidy, Ehab Abdelhamid, Spiros Skiadopoulos, and Panos Kalnis. GRAMI: Frequent Subgraph and Pattern Mining in a Single Large Graph. PVLDB, 7(7):517-528, 2014.
Other
107 stars 39 forks source link

Run on other dataset #19

Open fuvty opened 2 years ago

fuvty commented 2 years ago

Great work! But I wonder how can I run GraMi on my own dataset instead of the ones given in Dataset folder? There're some details that I do not understand:

  1. What is the meaning of the first line, i.e. # t 1 in mico.lg

  2. Are the edges directed or not? If there is an undirected edge between 0 and 1, and there exists e 0 1 0 in .lg file, do I need to add e 1 0 0 as well?

Thank you for your prompt rely.

tianyma commented 8 months ago

I think the first line # t 1 is the beginning line of the graph, which means that this graph ID is 1. You just copy this line and modify 1 to any number. an example of the following lines:

v 0 "label1"                 // vertex 0, label1
v 1 "label2"                 // vertex 1, label2
e 0 1 "edge_label"           // edge between vertex 0 and vertex 1, edge_label

ps. I think in .lg there are no concepts for directed graphs or undirected graphs. If you want to represent an undirected edge, you may write

e 0 1 "edge_label"           // edge between vertex 0 and vertex 1, edge_label
e 1 0 "edge_label"           // edge between vertex 0 and vertex 1, edge_label