简介
对deepwalk的随机游走方式做了改进,将网络节点嵌入到低纬度向量空间中(deepwalk学习笔记:https://www.cnblogs.com/yyqxwh1128/p/12144232.html)
改进随机游走方式
Random Walks
给源节点(u),模拟一个长为(l)的随机游走。设(c_i)为游走的第(i)个节点,起始节点(c_0=u)。节点(c_i)服从一下分布:
[P(c_i=x|c_{i-1}=v)=egin{cases}frac{pi _{vx}}{Z};;if(v,x) in E\;0;;;;otherwiseend{cases}
]
其中,(pi _{vx})是没有标准化的节点(v)到(x)的转移概率,(Z)用于标准化
Search Bias α
改进的随机游走有两个参数(p)和(q)。假设刚游走完边((t,v)),现在在节点(v)要根据转移概率(pi _{vx})选择下一个节点(x)。设(pi _{vx}=alpha _{pq}(t,x)*omega _{vx})
[alpha _{pq}(t,x)=egin{cases}frac{1}{p}; ; if; d_{tx}=0\1; ; ;if; d_{tx}=1\frac{1}{q}; ; if; d_{tx}=2end{cases}
]
(d_{tx})表示节点t和x间最短距离,(d_{tx}{ in 0,1,2})。参数(p)和(q)相当于调节BFS和DFS的程度。
- 节点的可能性比较低;若(p<min(q,1))),会使得游走变得比较拘于局部。
- (q)称为In-out parameter,(q>1),则游走会选择距离(t)较近的节点,以此达到接近BFS的效果;若(q<1)游走会选择离t更远的节点,达到类似DFS的效果。
随机游走的优点:时间复杂度和空间复杂度优于DFS/BFS,可以使得游走的范围可控,避免游走局限的现象。