We now describe the functioning of this method. Every user-document and all words within them are first mapped to unique vectors such that each vector is represented by a column in matrix \(D \in \mathbb {R}^{d_{s} \times N_u}\)  and \(W_s \in \mathbb {R}^{d_{s} \times |V|}\) , respectively. Here, \(d_s\)  is the embedding size and \(|V|\)  represents the size of the vocabulary. Continuous-bag-of-words approach [1]} is then performed where a target word is predicted given the word vectors from its context-window. The key idea here is to use the document vector of the associated document as part of the context words. More formally, given a user-document \(d_i\)  for user \(u_i\)  comprising a sequence of \(n_i\) -words \(\mathbf {w}_1, \mathbf {w}_2, ..., \mathbf {w}_{n_i}\) , we calculate the average log probability of predicting each word within a sliding context window of size \(k_s\) . This average log probability is:
\(\frac{1}{n_i} \sum _{t=k_s}^{n_i - k_s}\text{log} \ p(w_t | d_{i}, w_{t-k_s},..., w_{t+k_s})\) 
