# A Cross-Platform Personalized Recommender System for Connecting E-Commerce and Social Network
## The Proposed CPRec
### User Profiling
#### 3.1.1 Latent Interest Profiles Obtained by Microblogs  
Many studies related to users' posted messages have been conducted [14; 15; 16], including research focusing on the problem of identifying influential users in a social network by taking into account the similarity of the topics that users post about topics, which is decided by a user's posted messages [17]. However, we wish to detect a user's latent interest profiles though the messages posted naturally by that user. The method we adopt is based on Latent Dirichlet Allocation (LDA), an unsupervised machine learning technique which has been widely used to detect latent topics in documents. LDA treats a single document as \"a bag of words\", which means that it views a document as a vector of word counts. Each document is represented as a probability distribution over various topics, while each topic is represented as a probability distribution over a number of words, as shown in Figure 3.  
Standard LDA may not fit the writing of microblog users, the reason being that a single microblog will always be short and contain only one topic, so the method we adopt is the Microblogs Topic Discovery Model, which is based on the twitter-LDA in [18]. In Section 2, we have introduced method for dividing a user's microblogs into groups such that \(M=\left(M_{\Delta t_{0}},M_{\Delta t_{1}},M_{\Delta t_{2}},\ldots,M_{\Delta t_{n }}\right)\). \(M_{\Delta t}\) denotes all of the microblogs that user released during time \(\Delta t_{i}\), and it will be processed to obtain the user's interest profiles during time \(\Delta t_{i}\). Suppose that there are T hidden topics in microblogs set \(M_{\Delta t_{i}}\), and that each topic t has a word distribution \(\varnothing^{t}\) and a background words distribution \(\varnothing^{B}\). \(\pi\) denotes a Bernoulli distribution that manages the choice between background words and topic words. \(\theta^{u}\) is the topic distribution of user u. Each multinomial distribution is governed by some symmetric Dirichlet distribution. Gibbs sampling is used to perform model inference. We leave out the derivation details and the sampling formulas here. Figure 4 describes the generation process of microblogs, and we illustrate the plate notation of the model in Figure 5.  
Figure 4: Generation process of Microblogs. Figure 3: An abstract representation of LDA principle. As the result of the method we adopt, the microblogs set \(M_{\Delta t_{i}}\) has been patterned as a distribution over all topics to obtain latent topics and to represent the topic distribution of the microblogs collection as a topic vector, each entry of which denotes the weight of the representative words for each topic. Otherwise, the topics that users focus on are the latent interests user have, so, leveraging LDA, we depict \(M_{\Delta t_{i}}\) as an interest vector \(P_{\Delta t_{i}}\)  
\[P_{\Delta t_{i}}=\{(I_{1},\lambda_{u,1}),(I_{2},\lambda_{u,2}),(I_{3},\lambda_ {u,3}),\ldots,(I_{n},\lambda_{u,n})\} \tag{1}\]  
where \(I=(I_{1},I_{2},I_{3},\ldots,I_{n})\) denotes the set of interest vectors, \(I_{i}\) represents a kind of interest (lurking in topics, e.g., r, traveling), and \(\lambda_{u,i}\) is the degree that \(I_{i}\) occupies in user \(u\)'s interest. Take all the \(P_{\Delta t}\) into account, we formulate \(P_{u_{M}}\) (the latent interest vector in user \(u\)'s microblogs) as  
\[P_{u_{M}}=P_{\Delta t_{0}}+P_{\Delta t_{1}}+P_{\Delta t_{2}}+\ldots+P_{\Delta t _{n}}=\sum_{i=0}^{n}P_{\Delta t_{i}} \tag{2}\]  
Note that time is a factor which influences a user's interests, and some interests submerge or weaken. We determine to add a time weight function \(f(t)\) to each \(P_{\Delta t_{i}}\). There are two requirements for \(f(t)\):  
* \(f(t)\) must be monotonically decreasing for the reason that current interest vector \(P_{\Delta t_{0}}\) should have more weight in \(P_{u_{M}}\). * The value of \(f(t)\) should lie in the range of [0, 1]. Inspired by [PERSON] et al.