Team Algebra Experiments

Network Data

The Zachary's karate club data include 78 connections between 34 members:
Using the spring_layout algorithm to visualize it, we get

figure 1

Task:

Predict surrounding members in a team size 2c+1 of every member w_t such that we have the most possible name list for team members:

Eq. 1
Eq. 1

Model

Objective function: Maximize the log probability of any "social context" member given the current center (target) member:

![Eq. 2](http://latex.codecogs.com/svg.latex?J(\theta)=\frac{1}{T}\sum_{t=1}^T\sum_{-c\leq j\leq c} \log p(w_{t+j}|w_t),)

in which T is the total number of target members. In other words, the right sigma sums over all members in a time window and the left sigma sums over all time windows.

Now let's define the probability function as

Eq. 3
Eq. 3

or the simplified version,

![Eq. 4](http://latex.codecogs.com/svg.latex?p(O|I)=\frac{\exp(v_o^T v_i)}{\sum_{w=1}W\exp(v_oT v_i)},)

in which I and O correspond to the target member and the context member, correspondingly, and w goes over all possible context members in the training data.

Now we can do some math to obtain the gradience descent as

![Eq. 5](http://latex.codecogs.com/svg.latex? \frac{\partial \log p(O|I)}{\partial v_i}=\frac{\partial }{\partial v_i}[v_o^T v_i-\log \sum_{w=1}W\exp(v_oT v_i) ],)

By applying the chain rule twice, we solve it as

![Eq. 6](http://latex.codecogs.com/svg.latex? \frac{\partial \log p(O|I)}{\partial v_i}=v_o-\sum_{x=1}W\frac{\exp(v_oT v_i)}{\sum_{w=1}W\exp(v_oT v_i)}v_x = v_o-\sum_{x=1}^Wp(O|I)v_x,)

In order to maximize Eq. 2, we shall update the vector vi as

![Eq. 7](http://latex.codecogs.com/svg.latex? v_i^{new} = v_i^{old}+\epsilon \frac{1}{T}\sum_{t=1}^T\sum_{-c\leq o\leq c} [v_o-\sum_{x=1}^Wp(O|I)v_x],)

in which P(O|I) is given by Eq. 4.

Updating vectors

Now let's assume all these members are embedded in a 2D space, i.e., each vi is of length 2,

initial state
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 合拍的时候什么都好,不合拍的时候什么都错
    此刻so阅读 59评论 0 0
  • 8月16日 愿你历尽千帆,归来已是女王 写在公号发文五篇后开通原创之日。愿历尽千帆,不改初心。 ——题记 站在不惑...
    果木人心阅读 342评论 0 0
  • 自由的翅膀飞走了 带走全部的能量 和快乐的本领一起 消失在淡黄色月光背后 你坐在身旁的房间 如此接近却总那么遥远 ...
    巽天阅读 236评论 0 2
  • 昨夜睡得很晚,今早又被可恶的肚子疼闹醒,外面此刻正淅淅沥沥下着秋雨,北方的秋雨夹杂着风的呜咽,竟然透着些许的悲伤气...
    五蕴皆空度苦厄阅读 269评论 0 0