# Automatic Gender Identification from Text
## 4 Results  
This section presents the results of the experiments on the BookSCE dataset. In all the experiments, we followed the settings described in Section 3.3.  
The results are reported in Table 2. We calculated the overall classification accuracy, the average Precision (P), Recall (R), and F1-score, as well as the precision, recall, and F1-score for each class separately (denoted with subscripts '_m_' and '_f_' for male and female, respectively). The Acc column of Table 2 contains the average classification accuracy results for all models on the BookSCE dataset. As can be seen, GPT2 provided the best overall accuracy of 0.925, and XLNet followed with the second-best accuracy score of 0.907.  
The GPT2 model achieved an impressive accuracy of 0.925 and precision scores of 0.944 for males and 0.851 for females. This model's success can be attributed to its generative and autoregressive training, which enhances its ability to interpret contextual information. The high performance of GPT2 in binary classification tasks highlights its strong contextual understanding and precise prediction capabilities.  
The XLNet model also performed well, with an accuracy of 0.907 and precision scores of 0.931 for males and 0.806 for females. The XLNet's architecture, which includes autoregressive and permutation-based training, enables it to excel in capturing complex patterns and dependencies in the text. This contributes to its high performance, making it a strong contender in binary classification tasks.  
Among other models, XGBoost (XGB) achieved an accuracy of 0.853. While its overall performance was lower than GPT-2 and XLNet, it displayed robust precision for both males (0.861) and females (0.787). However, its recall score for females was notably lower (0.402), suggesting challenges in identifying female authors consistently. Despite this, XGB remains a powerful option, benefiting from its ensemble learning approach and ability to model non-linear relationships effectively.  
The SVM model achieved an accuracy of 0.809, with precision scores of 0.878 for males and 0.548 for females. SVM's recall scores were 0.882 for males and 0.538 for females, indicating decent performance in identifying male authors but limitations in recognizing female authors. These results highlight the simplicity and efficiency of SVMs in certain tasks but also their constraints when dealing with complex literary texts.  
At the bottom of the performance table, BERT, RoBERTa AND T5 showed significantly lower accuracies of 0.739, 0.711 and 0.778, respectively (we experimented with several T5 classifiers; among all variants, T5-base delivered the best results). The relatively poor performance of these models may be due to their different architectural designs and the way they handle textual data. The high versatility and variability in book texts can pose a challenge for these models, making it harder to capture consistent patterns, especially when dealing with the nuanced language found in literature.  
Interestingly, the simpler LR model demonstrated comparable performance, achieving an overall accuracy of 0.837 and even outperforming some of the more complex models like BERT, RoBERTa and T5. The LR model precision for males was 0.886, and for females it was 0.605. This phenomenon can be explained by the unique nature of book texts, which may exhibit more straightforward correlations between features and the target variable, making simpler models like LR surprisingly effective. Furthermore, adding regularization of L2 marginally improved the accuracy of LR to 0.841, highlighting the impact of regularization techniques on model performance. In summary, the results indicate that sophisticated models like GPT2 and XLNet are particularly well-suited for the binary classification task on the BookSCE dataset, likely due to their advanced architectures and training methods.