# A Comprehensive Approach to Bias Mitigation for Sentiment Analysis of Social Media Data
## 3 Proposed Methodology
### Data Preprocessing
\[\text{Precision}=\frac{\text{True Positives}}{\text{True Positives}+\text{False Positives}} \tag{7}\]

#### 4.1.3 Recall

The proportion of true positive predictions out of the total actual positive instances. \[\text{Recall}=\frac{\text{True Positives}}{\text{True Positives}+\text{False Negatives}} \tag{8}\]

#### 4.1.4 F1-Score

The harmonic mean of precision and recall, which provides a balanced measure of the performance of the model. \[\text{F1-score}=2\cdot\frac{\text{Precision}\cdot\text{Recall}}{\text{ Precision}+\text{Recall}} \tag{9}\]

### Baseline Models

We compared the performance of our proposed methodology with several baseline models, including Logistic Regression, SVM, Multilayer Perceptron (MLP), LSTM, and several recent transformer-based models. Logistic regression (LR) is a straightforward linear model for binary classification that uses the logistic function to model class probabilities, making it a popular choice for foundational classification tasks due to its simplicity and interpretability [52]. Support Vector Machines (SVMs), a discriminative classifier, are effective for both linear and non-linear classification tasks, as they identify the optimal hyperplane for separating data points, providing robust performance in text classification tasks [53]. Multilayer Perceptron (MLP), a feedforward artificial neural network, is capable of modeling complex, nonlinear relationships in data and is often used as a baseline in deep learning studies [54]. Long Short-Term Memory (LSTM), a type of Recurrent Neural Network (RNN), is specifically designed to address the problem of vanishing gradients, making it highly suitable for sequence-based tasks such as text and sentiment analysis [55]. In addition, we included several modern transformer-based models to reflect the current state of the art in sentiment analysis. RoBERTa, a variant of BERT, improves key training techniques and hyperparameters to improve the robustness of the model and performance [56]. DistilBERT [56], a smaller, faster version of BERT, is designed for efficiency, offering reduced size and faster inference while retaining much of BERT's performance. These baseline models, which include both traditional methods and recent advances in NLP, provide a strong set of comparisons to evaluate the effectiveness of our proposed method in sentiment analysis, particularly in terms of mitigating bias. ### Existing Models in the Literature

We further compare the performance of our proposed methodology with existing models in bias-aware sentiment analysis, including counterfactual data enhancement, adversarial training, Bias-Product-of-Experts (BPoE), and Bias-Regularized Neural Networks. These models were selected for comparison due to their focus on addressing bias in machine learning and their relevance in similar contexts. Counterfactual data augmentation generates counterfactual samples by altering specific words or phrases in the original text, creating new examples to help the model mitigate unintended bias in sentiment prediction [57]. Adversarial training incorporates an adversarial component that predicts the presence of bias in input data, while the main model is trained to minimize both sentiment classification loss and adversarial bias detection loss, enabling the model to learn representations less sensitive to biases [7]. Bias-Product-of-Experts (BPoE) employs multiple specialized \"expert\" classifiers, each handling specific subsets of data and combines their predictions to reduce the influence of biases [58]. Bias-Regularized Neural Networks include a bias regularization term in the loss function, penalizing biased predictions and encouraging the model to learn more unbiased representations [59]. Lastly, we included BiasFinder, a model that uses metamorphic testing to uncover biases in sentiment analysis systems, ensuring fairness and helping to identify biases that might otherwise go unnoticed [60].