## 2 Latent Space Based Learning
### Notation and Input Matrix  
In this section, we explain the opinion prediction model based on tensor factorization in full detail, and introduce the terminology and notation used throughout this article. One of the challenges in the design of the model lays in the use of a vocabulary rich enough as to characterize the user viewpoints, but not too large (notice that without any filtering the number of possible words obtained for the used datasets is \(\approx\)10.000) as to impede numerical computations or the learning capabilities. The main difficulty in dealing with such models does not lie on its computational aspects however, but in the sparsity and noise of the data. This sparsity engages critically with the cold-start problem in recommendation systems. A typical online shopping website with SNS capabilities provides, for the purposes of this article, \(N\) users writing reviews on a set of \(M\) items. Generally, a given user will have scored and reviewed only a subset of these \(M\) items, thus making the website's database highly sparse.  
Let \(S\) denote the set of user-item pairs \(\{(u,i)\,|\,u=1,\ldots,N;i=1,\ldots,M\}\) for which written reviews do exist and let \(\mathbf{t}_{ui}\) be their associated feature vectors. Our information domain consists therefore of triples of the form \((u,i,\mathbf{t}_{ui})\). In general, each item is described by a different set of opinion topics (keywords) of size \(D_{i}\). The \(\mathbf{t}_{ui}\in\mathbb{R}^{D_{i}}\) vector is populated with the sentiment strength scores \(s_{uij}\in(-\infty,+\infty)\) (\(j=1,\ldots,D_{i}\)) given to the topics in the \((u,i)\)-th review.  
The website's 2-dimensional input matrix \(\mathbf{R}:=[\mathbf{R}_{0}\ \mathbf{R}_{1}\ \cdots\ \mathbf{R}_{M}]\) is set up by concatenating the \(N\times D_{i}\) sparse matrices \(\mathbf{R}_{i}\) containing the reviews for the \(i=1,\ldots,M\) products. Thus, \(\mathbf{R}\in\mathbb{R}^{N\times D}\), where \(D:=\sum_{i}D_{i}\) denotes the sum of the vocabulary sizes for the \(M\) products.  
Let \(s_{ij,\min}\) and \(s_{ij,\max}\) be, respectively, the minimum and maximum sentiment scores contained in the \((\sum_{i}^{l}D_{k}+j)\)-th column of the input matrix \(\mathbf{R}\). Each \(s_{uij}\) entry is then replaced by its normalized value \(\tilde{s}_{uij}\in[-1,1]\) defined as  
\[\tilde{s}_{uij}:=\left\{\begin{array}{ll}s_{uij}/|s_{ij,\min}|&\text{if}\ \ \ s_{uij}<0\\ s_{uij}/s_{ij,\max}&\text{if}\ \ \ s_{uij}\geq 0\end{array}\right..\]  
Please note that two different normalization scales are used depending on the entry sign to prevent turning positive scores into negative ones and vice versa. In what follows, normalized scores will be denoted simply by \(s_{uij}\).  
Table 2 summarizes the terminology and notation used in this article. See also Figure 3 for further clarification.  
\begin{table}
\begin{tabular}{l l} \hline \hline
**Symbol** & **Description** \\ \hline \(u\) & user, reviewer \\ \(N\) & total number of users \\ \(i\) & item, product \\ \(M\) & total number of items \\ \(S\) & set of \((u,i)\) pairs of existing reviews \\ \(\mathbf{t}_{ui}\) & \(u\)-th user review (‘document’) on \(i\)-th item \\ \(t_{ij}\) & \(j\)-th sentiment keyword for the \(i\)-th item \\ \(s_{uij}\) & normalized sentiment strength score for the \(j\)-th keyword in \(\mathbf{t}_{ui}\) \\ \(\tilde{s}_{uij}\) & predicted ALS-generated sentiment score \\ \(D_{i}\) & vocabulary size of the \(i\)-th product dictionary \\ \(D\) & sum \(\sum_{i}^{M}D_{i}\) of all dictionary lengths \\ \(\mathbf{R}\) & input matrix in \(\mathbb{R}^{N\times D}\) \\ \(K\) & rank, number of latent dimensions \\ \(\lambda\) & ALS’s regularization parameter \\ \(n_{\text{iter}}\) & number of ALS iterations \\ \hline \hline \end{tabular}
\end{table}
Table 2: Notation.