如果您从 R 中使用 igraph,请使用此选项
count_motifs {igraph} | R 文档 |
图的 motif 是具有明确结构的小型连通子图。这些函数在图中搜索各种 motif。
count_motifs(graph, size = 3, cut.prob = rep(0, size))
图 |
Graph 对象,即输入图。 |
size |
motif 的大小。 |
cut.prob |
数值向量,给出在特定级别切割搜索图的概率。它的长度应与 motif 的大小( |
count_motifs
计算图中给定大小的 motif 的总数。
count_motifs
返回一个数值标量。
其他图的 motif:motifs()
, sample_motifs()
g <- barabasi.game(100)
motifs(g, 3)
count_motifs(g, 3)
sample_motifs(g, 3)