## 2 Latent Space Based Learning
### Opinion Dictionary Generation  
Opinion-words are often referred to as _sentiments_ in the literature and categorized as:  
* Rational sentiments, namely \"rational reasoning, tangible beliefs, and utilitarian attitudes\" [38]. An example of this category is given by the sentence 'This camera is good\", which does not involve emotions like happiness at all. In this case, the opinion-word (the adjective \"good\") fully reveals the user's opinion on the phone. * Emotional sentiments, described in [12] as \"entities that go deep into people's psychological states of mind\". For example, consider the sentence \"I trust this camera\". Here, the opinion-word \"trust\" clearly conveys the emotional state of the writer. An opinion dictionary contains both keywords that represents item characteristics and the sentiment strength scores associated with them. As with [39; 40], these scores are determined using a word-similarity-based method that assumes that similar meanings imply similar sentiments, and then weighted based on the SentiWordnet sentiment corpus [41]. Table 1 shows an example of the obtained sentiment scores associated with several item characteristics of a phone review. The dictionary can be of constant length--common to all products--containing the most commonly used opinion-words in the whole review dataset [42], or as proposed of variable length solving the problems of: (_i_) using a large set of words that are not shared by different products and thereof introducing unnecessary sparsity in the input matrix, (_ii_) this same increase on sparsity worsens to some extent the prediction capabilities of the algorithm, and (_iii_) the only use of opinion-words as vocabulary allows the overall opinion prediction for a product but not for the sentiment associated with its characteristics. Since different products have truly different features, we must consider a distinctive set of opinion-words for each one of them, reducing the number of features and the sparsity of the input matrix. In this context, every user review of a particular item reduces to a (possibly sparse) array of sentiment scores associated with the item vocabulary. If an opinion keyword occurs more than once in the review, its final score is calculated simply as an average. These feature vectors were obtained using a solution similar to that described in [43] (we used the NTL services graciously provided to us by www.bibtex.com), that carries out sentiment analysis at the sentence level and can detect as many opinions as contained in a sentence. This analysis identifies the opinion keyword (the _what_) for each opinion sentence and calculates a numerical sentiment strength score for it based on its associated sentiment text (the _why_). Also, the analysis enables us to syntactically analyze the texts and extract the simple (e.g., 'guitar') and compound (e.g., 'quality_interface') opinion keywords to include in the feature vectors. To further elaborate one of the examples provided above, three distinct sentiment opinions may be extracted from the review _\"This phone is awesome, but it was much too expensive and the screen is not big enough\"_, namely:  
It is worth noting that we validated the generated vocabularies verifying that they accomplish with the frequency distribution that characterizes the majority of natural languages and is defined by a power law distribution known as Zipf's law [44; 45]. This validation is shown in Figure 2, where the frequency of occurrence of the opinion keywords in the Amazon's \"Instant Video\" dataset is plotted as a function of its ordering number \(n\). The distribution that best fits the data is \(f=Cn^{a}\) with \(a=-0.953\pm 0.001\). \begin{table}
\begin{tabular}{l c c c} \hline \hline  & **Opinion Keyword** & **Sentiment Text** & **Score** \\ \hline Opinion 1 & “_phone_” & “_awesome_” & +4.0 \\ Opinion 2 & “_phone_” & “_much too expensive_” & \(-5.4\) \\ Opinion 3 & “_screen_” & “_not big_” & \(-1.0\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Sentiment Analysis Example.