R igraph 手册页

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

scg_eps {igraph}R 文档

谱粗粒化 (SCG) 近似的误差

描述

scg_eps 计算 \Vert v_i-Pv_i\Vert, 其中 v_iV 中的第 i 个特征向量,P 是对应于 mtype 参数的投影算子。

用法

scg_eps(
  V,
  groups,
  mtype = c("symmetric", "laplacian", "stochastic"),
  p = NULL,
  norm = c("row", "col")
)

参数

V

一个数值矩阵,包含(特征)向量,假设已标准化。向量按列存储在 V 中。

groups

一个长度为 nrow(V) 的整数向量,标记分区中每个组顶点。

mtype

用于 SCG 的半投影算子的类型。目前有 “symmetric”、“laplacian” 和 “stochastic” 可用。

p

一个长度为 nrow(V) 的概率向量。当 mtype = “stochastic” 时,p 是马尔可夫链的平稳概率分布。否则,此参数将被忽略。

norm

可以是 “row” 或 “col”。如果设置为 “row”,则拉普拉斯矩阵的行之和为零,随机矩阵的行之和为一;否则为列。

scg_eps 返回一个数值向量,其第 i 个分量是 \Vert v_i-Pv_i\Vert(参见详细信息)。

作者

David Morton de Lachapelle, http://people.epfl.ch/david.morton.

参考

D. Morton de Lachapelle, D. Gfeller, and P. De Los Rios, Shrinking Matrices while Preserving their Eigenpairs with Application to the Spectral Coarse Graining of Graphs. Submitted to SIAM Journal on Matrix Analysis and Applications, 2008. http://people.epfl.ch/david.morton

参见

scg-methodscg

示例


v <- rexp(20)
km <- kmeans(v,5)
sum(km$withinss)
scg_eps(cbind(v), km$cluster)^2

[包 igraph 版本 1.3.5 索引]