Document Type : Applied Article

Authors

1 Department of Operation Management and Information Technology, Faculty of Management, Kharazmi University, Tehran, Iran

2 Department of Operation Management and Information Technology, Kharazmi University, Tehran, Iran

3 Department of Business Management, Faculty of Management, Kharazmi University, Tehran, Iran

10.22044/jadm.2026.17616.2911

Abstract

The rapid growth of e-commerce has led to an increasing volume of Persian user reviews containing valuable opinions about products and services. Sentiment analysis enables automatic extraction of sentiment polarity from such data; however, Persian remains underexplored, especially in real-world e-commerce contexts. In addition, class imbalance in sentiment datasets poses a major challenge, often leading to biased models that underperform on minority classes. In this study, we investigate sentiment analysis on Persian e-commerce reviews by comparing classical machine learning models, including Logistic Regression and SVM, with transformer-based models, namely ParsBERT and ParsRoBERTa. To mitigate the impact of class imbalance, we evaluate Focal Loss against the standard Cross-Entropy Loss. Furthermore, we employ Integrated Gradients within an Explainable Artificial Intelligence (XAI) framework to improve model interpretability and analyze feature contributions. Experimental results on the Digikala dataset demonstrate that ParsBERT trained with Focal Loss achieves the best performance, reaching a Balanced Accuracy of 88.64% and an AUC-ROC of 95.91%. The findings highlight the effectiveness of combining imbalance-aware loss functions with transformer-based architectures for improving minority class detection in Persian sentiment analysis.

Keywords

Main Subjects