|
Algorithm 1. w-LDA Generation Process
|
|
Input:K, U, T,
|
|
Output:
, , uProfileSet
|
| //Step 1: User profiles data generation
|
| For each author u = 1…U
|
| Traverse all the Weibo posts t = 1…T; |
| Aggregate the posts generated by author u into users’ profile s uProfileSet(p)
|
|
Return uProfileSet
|
| //Step 2: Topics generation
|
| For each topic z = 1…K
|
| Draw ~ Dirichlet ()// sample mix components for topic-word |
|
//Step 3: Topic words generation
|
| For each user profile p = 1…P
|
| Draw ~ Dirichlet ()// sample mix components for user profile-topic |
| For each word in generated user profile p, i = 1…Np
|
| Draw ~ Multinomial () // Sample topic for user profile p
|
| Draw ~ Multinomial () //Sample word for topic
|
| Return and
|