# A Domain-Independent Classification Model for Sentiment Analysis Using Neural Models
## 5 Results  
In this section, we want to demonstrate the performance of the proposed approach. The prototype is implemented in Python. In order to gain sufficient information and prove the applicability of our approach, the following libraries have been used: NLTK ([[https://www.nltk.org/](https://www.nltk.org/)]([https://www.nltk.org/](https://www.nltk.org/))) library for natural language processing, Keras ([[https://keras.io/](https://keras.io/)]([https://keras.io/](https://keras.io/))) (Deep learning) and scikit-learn ([[https://scikit-learn.org/stable/](https://scikit-learn.org/stable/)]([https://scikit-learn.org/stable/](https://scikit-learn.org/stable/))) (machine learning), which is mainly used for testing the performance of the other classifiers. We applied 10-fold cross-validation for performance evaluation. The neural models have been trained on a GeForce GTX 1080-NVIDIA ([[https://www.nvidia.com/de-de/geforce/products/10](https://www.nvidia.com/de-de/geforce/products/10) series/geforce-gtx-1080/]([https://www.nvidia.com/de-de/geforce/products/10](https://www.nvidia.com/de-de/geforce/products/10) series/geforce-gtx-1080/)). In order to conduct experimental results and check the performance of the proposed approach, we tested the algorithm using the extracted features based on three datasets, namely IMDb, Movie Reviews, and Amazon reviews. To evaluate the overall performance of the classifiers, we consider several performance metrics. In particular, we use precision, recall, f1, and accuracy, as in [32]. Regarding the evaluation scenarios, we used the trained model in Section 3.2. Tables 5-7 present the precision, the recall, and the f-measure using IMDb, Movie Reviews, and Amazon datasets, respectively. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Classifier** & **Precision** & **Recall** & **F-Measure** & **Accuracy** \\ \hline Random Forest & 0.73 & 0.73 & 0.73 & 0.73 \\ Naive Bayes & 0.64 & 0.59 & 0.56 & 0.59 \\ SVM (poly) & 0.24 & 0.29 & 0.33 & 0.49 \\ SVM (rbf) & 0.24 & 0.29 & 0.33 & 0.49 \\
**Proposed SNN** & 0.87 & 0.87 & 0.87 & 0.87 \\
**Proposed CNN** & 0.81 & 0.81 & 0.81 & 0.81 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Performance metrics for IMDb, where SVM (poly): Support Vector Machine using a polynomial kernel, SVM (rbf): Support Vector Machine using a radial basis function kernel. In all tables, the proposed neural models show the highest performance compared to random forest which is hereby the next best classifier. However, the support vector machine using a radial basis function kernel also performs well for the IMDb dataset, but the Naive Bayes classifier performs much better using our own Amazon dataset. Additionally, it is remarkable to realize that the proposed shallow neural network performs better than the proposed convolutional neural network model. However, random forest and our proposed neural models show a robust behavior regarding sentiment classification. Moreover, it should be realized that some classifiers show high precision and low recall or vice versa where high precision relates to a low false positive rate, and high recall relates to a low false negative rate. This reflects the complexity of this classification task and shows the robust performance of the proposed neural models. Furthermore, the trained neural models are applied on different datasets that are not related to each other (see Table 8). Despite of this fact, it still behaves well and, consequently, it can be extended for different applications in the research field of sentiment analysis. Figures 3 and 4 show the 10-folds cross-validation results for the trained CNN and SNN models, respectively. In addition, they show the mean accuracy and the standard deviation for each fold. We can observe a reasonable symmetric distribution and that the mean captures the central tendency well. The cross-validation results belong to the pre-trained model which has been applied to calculate the results in Table 8.