如果您从 R 中使用 igraph,请使用此选项
sample_motifs {igraph} | R 文档 |
图的 motif 是具有明确结构的小型连通子图。这些函数在图中搜索各种 motif。
sample_motifs(
graph,
size = 3,
cut.prob = rep(0, size),
sample.size = vcount(graph)/10,
sample = NULL
)
图 |
Graph 对象,即输入图。 |
size |
motif 的大小,当前有向图支持大小 3 和 4,无向图支持大小 3-6。 |
cut.prob |
数值向量,给出在特定级别切割搜索图的概率。它的长度应与 motif 的大小( |
sample.size |
用作查找 motif 起始点的顶点数量。 仅当 |
样本 |
如果不是 |
sample_motifs
基于样本估计图中给定大小的 motif 总数。
一个数值标量,是图中 motif 总数的估计值。
其他图 motif:count_motifs()
, motifs()
g <- barabasi.game(100)
motifs(g, 3)
count_motifs(g, 3)
sample_motifs(g, 3)