Public opinion plays a crucial role in presidential elections, shaping voter choices and influencing outcomes. Most sentiment analysis studies focus on binary (positive vs. negative) or multiclass (positive, negative, neutral) classification, which limits their ability to capture opinions that express multiple sentiments simultaneously. In presidential elections, a single opinion may support one candidate while criticizing another. This study proposes a MultiLabelBinarizer model to classify candidate and sentiment labels simultaneously—an approach that remains underexplored. The model combines Naïve Bayes (NB) and Support Vector Machine (SVM) for opinion mining using public data and TF-IDF for feature extraction, applying Multinomial and Linear kernels. Performance is evaluated using Accuracy, Precision, Recall, and F1-score. The study is conducted in two stages: developing a multi-label analysis model for presidential candidates and testing the effectiveness of cross-validation. Results show that multi-label classification is effective for both candidate and sentiment categories. Cross-validation with NB and SVM yields high accuracy. NB achieves 0.89 for candidate labels and 0.86 for sentiment labels. SVM performs better, with 0.93 for candidate labels and 0.94 for sentiment labels. While SVM provides higher accuracy, NB offers faster implementation with still competitive results.
Copyrights © 2025