R igraph 手册页

如果您从 R 中使用 igraph,请使用此选项

sample_motifs {igraph}R 文档

图的 motif

描述

图的 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 的大小(size 参数)相同。默认情况下,不进行切割。

sample.size

用作查找 motif 起始点的顶点数量。 仅当 sample 参数为 NULL 时使用。

样本

如果不是 NULL,则指定用作查找 motif 起始点的顶点。

详细信息

sample_motifs 基于样本估计图中给定大小的 motif 总数。

一个数值标量,是图中 motif 总数的估计值。

参见

isomorphism_class

其他图 motif:count_motifs(), motifs()

示例

g <- barabasi.game(100)
motifs(g, 3)
count_motifs(g, 3)
sample_motifs(g, 3)

[包 igraph 版本 1.3.5 索引]