# Deep Learning-Based Sentimental Analysis for Large-Scale Imbalanced Twitter Data
## 4 Results and Discussions
The deep learning algorithm with TensorFlow framework is applied on selected PCs, as shown in Figure 7. The acc, val_acc, val_loss denote accuracy, validated the accuracy, and validated loss, respectively. The accuracy and loss metrics with 100 epochs are shown with and without fine configuration, i.e., (a) and (b). The blue color presents loss and accuracy curves in both figures. Similarly, green color shows the validated accuracy and validated loss, respectively. First, we performed the experiment without fine-tuning configuration and got 80% accuracy, i.e., (a). The loss and validated curves show in a range of 0.35 to 0.7. Initially, the loss is quite high but gradually decreases up to 0.35. Similarly, accuracy and validated calculated in a range of 0.5 to 0.80. While on the hand with fine-tune configuration, we got an accuracy of 98.4%. The loss curves start at 0.7 but soon decrease to 0.025. Similarly, the accuracy curve starts from 0.3 but soon increases to 0.7 on 5 epoch. Then, it runs in the same direction with 0.7 accuracy and on 38 epoch it again increased up to 98%. Fine-tune configuration solved the overfitting problem and improved the prediction accuracy as proved from both subgraphs. Figure 6: The Principal Components from balanced features set. The confusion matrices are presented to compare the classification and misclassification errors with and without fine-tune configuration, as shown in Figure 8. The true label is given vertically, and the predicted label is given horizontally. The diagonal values show the predicted values in terms of percentage for emotions prediction, while other cells denote misclassification for each class. The prediction accuracy of positive tweets is 74%, and negative tweets are 85% without fine-tune configuration. The overall emotions prediction accuracy is 80%. However, after fine-tuning configuration, we got really interesting results, as shown in Figure 8b. The emotions prediction of positive emotions is 96% and for negative 100%. The overall accuracy is 98.4% after fine-tuning the designed deep learning model. Further, the proposed approach is compared in terms of percentage training ratio with other states of the art methods, i.e., Support Vector Machine (SVM), Multi-Layer perceptron (MLP), Random Forest (RF), Logit Boost, Logistic Regression (LR), and K-Nearest Neighbor (KNN), as shown in Figure 3:0 Overall, the proposed deep learning approach outperforms in each phase of % training ratio from 90% to 30%. The maximum accuracy of the proposed approach is 98.4% with 90% training ratio and minimum 86.53% with 30% training ratio. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Layer** & **Type** & **Shape** & **Parameters** \\ \hline Dense 1 & Dense & 100 & 1200 \\ \hline Dropout 1 & Dropout & 100 & 0 \\ \hline Dense 2 & Dense & 80 & 8080 \\ \hline Dropout 2 & Dropout & 80 & 0 \\ \hline Dense 3 & Dense & 60 & 4860 \\ \hline Dropout 3 & Dropout & 60 & 0 \\ \hline Dense 4 & Dense & 40 & 2440 \\ \hline Dropout 4 & Dropout & 40 & 0 \\ \hline Dense 5 & Dense & 2 & 41 \\ \hline Total Parameters & 16,621 & & \\ \hline Trainable Parameters & 16,621 & & \\ \hline Non-trainable & **0** & & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Parameters training using Dense and Dropout layers based on TensorFlow with Keras. Figure 7: Dynamic visualization of predicted loss and accuracy with 100 epochs. (**a**) Accuracy and Loss without Class balancer and Fine-tune. (**b**) Accuracy and Loss with Class balancer and Fine-tune.