Skip to main content
. 2018 Nov 22;18(12):4093. doi: 10.3390/s18124093
Algorithm 1. w-LDA Generation Process
Input:K, U, T, α, β
Output: φz , ϑp, 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 φz ~ Dirichlet (β)// sample mix components for topic-word
//Step 3: Topic words generation
For each user profile p = 1…P
  Draw ϑp ~ Dirichlet (α)// sample mix components for user profile-topic
  For each word in generated user profile p, i = 1…Np
    Draw zi ~ Multinomial (ϑp) // Sample topic zi for user profile p
    Draw wi~ Multinomial (φzi) //Sample word wi for topic zi
Return φz and ϑp