Advanced Sentiment Analysis of Amazon Electronics Reviews Leveraging BERT: Model Optimization and Evaluation
Nassar Al Hafidh, Ahmed Lateef Salih Al-Karawi · Procedia Computer Science · 2025
Sentiment analysis is an essential part of natural language processing (NLP), which involves collecting and understanding individual viewpoints based on textual information. In this study, BERT is used to categorize user reviews into positive, negative, or neutral. The methodology includes research, model optimization and data cleaning. The experiment used Amazon Electronics’ five-core dataset with 6,739,590 reviews. This includes encoding and formatting the raw text input to obtain a suitable format for BERT. This ensured adequate representation of data points across all sentiment categories (around 36,000 per category). The dense layers are enabled with ReLU and the final SoftMax layer outputs probabilities of the classes while using dropout to prevent overfitting. The model achieved a training accuracy of 93.5% with an F1 score of 93.50 using the evaluation metrics such as precision, recall and performance based on the sample when evaluated by running smaller subsets of test data. Key results demonstrated proposed model ability to accurately classify complex reviews with different settings and confirmed its reliability and scalability.