简体   繁体   English

使用igraph频繁进行子图挖掘

[英]Frequent subgraph mining with igraph

Is there a function in igraph that allows discovering all frequent subgraphs in a given graph? igraph中是否有一个功能可以发现给定图中的所有频繁子图? Something along the lines of gSpan for instance. 例如,沿着gSpan的东西。

R has got a package subgraphMining , which - among other things - has implemented gSpan . R已经有一个包subgraphMining ,其中-除其他事项外-已经实施gSpan However, it depends on the outdated igraph0 package. 但是,这取决于过时的igraph0软件包。

From the help ?gspan it would look like this: 在帮助?gspan它看起来像这样:

library(subgraphMining)
library(igraph0)
graph1 = graph.ring(5)
graph2 = graph.ring(6)

database = array(dim=2);
database[1] = list(graph1);
database[2] = list(graph2);

# Call gspan, 80% frequency
results = gspan(database, "80%");
results
#  [[1]]
# Vertices: 5
# Edges: 10
# Directed: TRUE
# Edges:
# 
# [0] '1' -> '5'
# [1] '5' -> '1'
# [2] '2' -> '1'
# [3] '1' -> '2'
# [4] '3' -> '2'
# [5] '2' -> '3'
# [6] '4' -> '3'
# [7] '3' -> '4'
# [8] '5' -> '4'
# [9] '4' -> '5'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM