From Customer Voice to Predictive Intelligence: Machine Learning Analysis of E-Commerce Reviews
Ecommerce websites can have a lot of reviews, but not all reviews with a specific sentiment lead to a recommendation. This study demonstrates whether review text will predict if a customer would recommend a clothing item and if a transformer can outperform traditional machine learning models when a minority (non-recommended) class is of interest. This Women’s E-Commerce Clothing Reviews dataset has been cleaned to retain 22,641 reviews that have non-empty text and a binary recommendation label. Training, validation and test sets were created using stratification. Using class-specific performance measures, balanced accuracy, ROC-AUC, average precision, confusion matrices and paired bootstrapped confidence intervals, the models were compared: a majority baseline, logistic regression, linear Support Vector Machine (SVM), Naive Bayes, Random Forest, LightGBM and finetuned BERT. The accuracy of BERT on the 4527 unseen test reviews was 91.39%, and the non-recommendation F1 score, recall and precision were 0.780, 0.845 and 0.725, respectively. Compared to logistic regression, BERT achieved an accuracy gain of 0.036 and a non-recommendation F1 gain of 0.064. The 95% paired bootstrapped confidence intervals for both did not contain zero. Both logistic regression and linear SVM were very similar. The most important contribution of this work is the development of a class-aware transformer benchmark for recommendation classification.
Authors
- Othman A. Alrusaini (ORCID: https://orcid.org/0000-0003-3797-6384)
- Hasan Beyari (ORCID: https://orcid.org/0000-0003-0943-0317)
Institutions
- Umm al-Qura University (SA)
Publication Details
- Journal
- Electronics
- Published
- 2026-11-25
- DOI
- https://doi.org/10.3390/electronics15235505
- Primary Topic
- Sentiment Analysis and Opinion Mining
- Type
- article
- Field-Weighted Citation Impact
- 0.00