# Deep Learning-Based Sentimental Analysis for Large-Scale Imbalanced Twitter Data
## 5 Conclusions  
Effective emotions prediction from the raw text of twitter's data is very important. This is really helpful to automate the process of useful features extraction. However, it is very hard to predict the actual information from tweets, as users are not restricted to follow a specific type of grammar rules or a number of words in tweets. Emotions have fuzzy boundaries with subjective concepts, but it may be presented in different expressions and terminologies. We proposed a hybrid TensorFlow deep learning approach with Keras API to predict meaningful emotions features from tweets. The proposed research mainly targets feature extraction from incomplete, imbalanced, and highly sparse tweets. We used preprocessing steps, class balancer, and PCA to get high-quality features from these types of tweets. The preprocessing measures are applied to extract features with frequency details. Tweets are always imbalanced as the public is not restricted to use a specific syntax and semantic structure with a limited number of words. To solve the imbalance problem, we used the class balancer technique to calculate the weight value for each class and then include this weight value with each class. The high correlation among features is another big issue that may affect prediction accuracy. The PCA technique is used to extract normalized uncorrelated features from highly correlated data. Then, the proposed TensorFlow based deep learning approach is fine-tuned to predict high-quality emotions features with an accuracy of 98.4%. We have shown accuracy, loss, classification, and misclassification errors with and without fine-tune configuration to get a better understanding of the proposed deep learning  
Figure 8: Confusion matrices with and without Fine-tuned configuration. **(a)** Confusion Matrix without Class balancer and Fine-tune. **(b)** Confusion Matrix with Class Balancer and Fine-tune. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Technique** & **90\%** & **80\%** & **70\%** & **60\%** & **50\%** & **40\%** & **30\%** \\ \hline Support Vector Machine & 70 & 80 & 86.66 & 75 & 70 & 66.66 & 71.42 \\ \hline Multi-Layer Perceptron & 70 & 85 & 80 & 82.54 & 84 & 81.66 & 77.14 \\ \hline Random Forest & 60 & 75 & 76.66 & 80 & 76 & 81.66 & 77.14 \\ \hline Logit Boost & 60 & 70 & 76.66 & 77.52 & 66 & 76.66 & 75.71 \\ \hline Logistic Regression & 60 & 70 & 80 & 75 & 70 & 78.33 & 74.28 \\ \hline K-Nearest Neighbor & 60 & 85 & 80 & 80 & 76 & 80 & 82.85 \\ \hline
**Proposed Technique** & **98.4** & **93.33** & **90.91** & **90.62** & **96.36** & **89.75** & **86.53** \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparison of the proposed deep learning approach with other methods based on % training ratio. model. The designed TensorFlow deep learning approach has the following advantages compared to other methods. * It provides excellent visualization and high computation services for a large scale of tweets data. * TensorFlow-based algorithms can be deployed easily from a cellular device to a huge number of complex networks. * It provides unified functions and fast updates as it is maintained by a big organization, i.e., Google. * It has a great feature of flexibility and can be easily extendable. * To get better accuracy, we may configure the dense layers according to our requirements in terms of a number of neurons and activation methods. * Dropout layer configuration is another great feature which solves the overfitting problem. It can be easily fine-tuned with learning error rate and type of activation function. Our outcomes show that the proposed approach is an efficient process to detect emotions from a large volume of raw tweets. The proposed work does not show the synthetic detail relationship among tokens used in the same tweet. Synthetic features based on NLP may be better for classification as these features indicate the relationship among words of tokens. It shows how a token is related to other tokens used in the same tweet. The n-gram technique can be used to extract these types of features.