# Gender Classification Using Sentiment Analysis and Deep Learning in a Health Web Forum
## 4 Results
### Traditional Machine Learning Results
For feature perspective, words are good features for gender classification in the web forum. Types of emotion and their density are not enough, although these sentiment features reduce the computational complexity with a small number of features. However, when using with SVM, the senti-word feature set generates the comparable performance to the word feature set. Even though words are good features, we cannot employ all words because we need to consider the computational complexity and cost to make the algorithm work. Machine learning algorithms support a limited number of features, unlike the deep learning algorithm, and we need to reduce the number of words included in the feature set. For feature reduction, we explored the threshold value to extract words from 5 to 100, as shown in Table 7. The number of words involved in learning is displayed at the end of Table 7. We also tested which feature extraction method among the occurrence with boolean and the term frequency is useful. From the experiments results, the occurrence with boolean outperforms the term frequency. In naive Bayes, which assumes the independence of the variables, the number of words decreases when setting a higher threshold value, and the performance improves. SVM has the opposite behavior with NB. The best performance is achieved when applying the RF model to the term frequency features with a threshold value of 10, resulting in 4822 words. However, the performance of RF begins to decline beyond a certain number of features from the first two rows of Table 7. From all the experiments, we could conclude that traditional machine learning algorithms are \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & \multicolumn{2}{c}{**NB**} & \multicolumn{2}{c}{**SVM**} & \multicolumn{2}{c}{**RF**} \\ \cline{2-7}  & **Female** & **Male** & **Female** & **Male** & **Female** & **Male** \\ \hline Female & 1838 & 2623 & 1 & 0 & 754 & 135 \\ Male & 14 & 34 & 1822 & 2686 & 1069 & 2551 \\ \hline Precision & 99.24\% & 1.28\% & 0.05\% & 100.00\% & 41.36\% & 94.97\% \\ Recall & 41.20\% & 70.83\% & 100.00\% & 59.58\% & 84.81\% & 70.47\% \\ Accuracy & 41.52\% & & 59.55\% & & 73.33\% \\ False positive rate & 29.17\% & & 40.42\% & & 29.53\% \\ False negative rate & 58.80\% & & 0.00\% & & 15.19\% \\ \hline \hline \end{tabular}
\end{table} 
Table 6: The accuracy of gender detection using entire feature set (word features + sentiment features). \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & \multicolumn{2}{c}{**NB**} & \multicolumn{2}{c}{**SVM**} & \multicolumn{2}{c}{**RF**} \\ \cline{2-7}  & **Female** & **Male** & **Female** & **Male** & **Female** & **Male** \\ \hline Female & 1706 & 2434 & 701 & 236 & 514 & 210 \\ Male & 117 & 252 & 1122 & 2450 & 1309 & 2470 \\ \hline Precision & 93.58\% & 9.38\% & 38.45\% & 91.21\% & 28.20\% & 92.16\% \\ Recall & 41.21\% & 68.29\% & 74.81\% & 68.59\% & 70.99\% & 65.36\% \\ Accuracy & 43.42\% & & 69.88\% & & 66.27\% \\ False positive rate & 31.71\% & & 31.41\% & & 34.64\% \\ False negative rate & 58.79\% & & 25.19\% & & 29.01\% \\ \hline \hline \end{tabular}
\end{table} 
Table 5: The accuracy of gender detection using senti-word feature set. not good at gender classification, resulting in a large performance gap between two classes. In the next section, we will see how much the deep learning algorithm improved the performance.