NaazS03 / cgSpan

Python implementation of closed frequent subgraph mining algorithm cgSpan. Only undirected graphs are currently supported.
https://pypi.org/project/cgspan-mining/
MIT License
9 stars 5 forks source link

Can you share the Python code of closegraph? I would appreciate it #1

Open laijunli opened 2 years ago

shaulz commented 2 years ago

Hello,

We have tried to allocate closegraph code but unfortunately could not find it. To the best of our knowledge, cgSpan is the only publically available close graph implementation.

laijunli commented 2 years ago

Hello, thank you for sharing, I would like to ask that cgspan‘s EARLY TERMINATION、REJECT EARLY TERMINATION、DETECT EARLY TERMINATION FAILURE, Can these three early termination strategies be used in a directed graph?

shaulz commented 2 years ago

At the moment cgSpan does not support directed graphs.

The implementation should be straightforward by adding 6th element (direction) to the 5-tuple and is certainly planned for the future. Please check details http://www.mysmu.edu/staff/caneleung/pub/notes-gSpanDirected.pdf

laijunli commented 2 years ago

Thank you so much, I learned a lot from the articles you shared。As you said, the directed graph only needs to redefine the DFS code sorting part.

laijunli commented 2 years ago

Hello, I would like to ask you how to mine the Maximal frequent subgraphs of directed graphs? It seems that SPIN and MARGIN can only mine the Maximal frequent subgraphs of undirected graphs.

shaulz commented 2 years ago

I think we have already discussed this topic. Please see my answer from Mar 24. May I ask what is your task at hand?

laijunli commented 2 years ago

Thank you very much for your reply. I want to mine the maximum frequent subgraphs of multi graph directed graphs. I have been able to realize the mining of directed graph frequent cartographers by gspan. However, for spin, the maximum frequent subgraph mining algorithm, ffsm is used, and the cam in ffsm seems to be unable to represent the data used for directed graphs. Is there any article about the application of ffsm to digraph mining, just like the gspan algorithm you shared with me last time.

laijunli commented 2 years ago

I now have two schemes to realize the maximum frequent subgraph of multi graph digraph: first, replace the algorithm for judging undirected graph isomorphism in spin with the algorithm for judging directed graph isomorphism, as if this can be realized; second, replace ffsm in spin with gspan, but if so, the pruning strategy of spin will fail!

shaulz commented 2 years ago

I guess you should consult SPIN authors.