Integrating Sentiment Analysis with Machine Learning for Cyberbullying Detection on Social Media
DOI:
https://doi.org/10.62643/Abstract
Cyberbullying on social media is a widespread issue with serious psychological and emotional consequences, making reliable detection mechanisms critically important. Leveraging sentiment analysis with advanced machine learning offers a scalable solution to identify harmful interactions and promote safer digital spaces. This work employs the Cyberbullying Tweets dataset from Kaggle, which contains labeled instances of various cyberbullying categories. Preprocessing includes normalization, noise removal such as URLs and HTML tags, tokenization, WordNetLemmatizer, vaderSentiment analysis, and label encoding. Feature extraction is performed using TF-IDF vectorization, while SMOTE oversampling addresses class imbalance. Visualization techniques such as distribution plots and word clouds provide insights into bullying patterns and category frequency. The proposed framework implements multiple classifiers including Logistic Regression, Random Forest, XGBoost, Decision Tree, Naive Bayes, SVM, Extra Tree, Gradient Boost, and AdaBoost, with hyperparameter tuning via GridSearchCV. Evaluation uses accuracy, precision, recall, F1-score, and confusion matrices to effectively capture false positives and false negatives. Further enhancements include SMOTEENN for improved data balancing and a Voting Classifier ensemble (combining MLP and Bagging with Logistic Regression) for robust classification. Explainable AI techniques such as LIME and SHAP ensure interpretability by identifying influential features, while Flaskbased deployment supports real-time predictions with confidence scores and topic modeling for usability and transparency. Results show that the proposed Voting Classifier significantly outperforms all baseline models, achieving 97.4% across all evaluation metrics, demonstrating the reliability, scalability, and practical applicability of the system for cyberbullying detection.
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.













