Enhanced sentiment classification of phone brands on Twitter with a modified walrus optimizer and novel ensemble method
摘要
Nowadays, social media, especially Twitter, represents a goldmine for understanding consumer opinions about phone brands and applications. Decision-makers can use these insights to address negative views on products and brands and improve the quality of their brands or products to remain competitive. However, while Twitter is a valuable source for representing consumer opinions about phone brands and products, collecting all consumer opinions about specific products or brands and evaluating them as positive, negative, or neutral is challenging. In this paper, a new machine learning-based sentiment analysis system is developed and designed to identify consumer opinions about phone brands, products, and applications, classifying them as neutral, positive, or negative using the Twitter platform. To achieve this, the system consists of four main steps: preprocessing, word categorization, classification, and hyperparameter tuning. In the preprocessing step, each tweet is analyzed to remove hyperlinks, mentions, hashtags, and stopwords that do not affect the nature of the tweet. A new green hybrid categorization mechanism is then developed to perform stemming and lemmatization on each word in the tweets, estimate the importance of each word, and calculate the frequency of each word in the dataset. To do this, the bag-of-words algorithm is used to collect the words present in the dataset, calculate the frequency of each word, and highlight the importance of each word for analyzing the tweet’s sentiment. The term frequency-inverse document frequency (TF-IDF) algorithm is then applied to the bag-of-words results to estimate the relevance of each word to each tweet. Finally, the singular value decomposition algorithm is applied to the TF-IDF results to perform word factorization of the entire dataset by computing the singular matrix and left singular vector for each tweet, which provides the significance of each word and identifies the direction of the words in each tweet. Each tweet is then classified as neutral, positive, or negative using a new ensemble algorithm that combines neural networks, K-nearest neighbors (KNN), and random forest in the classification stage. To enhance system performance, the optimal hyperparameters for the neural network, KNN, and random forest algorithms are identified using a modified version of the walrus metaheuristics algorithm. The performance of the proposed system is tested on a dataset named “Brands and Product Emotions,” which contains 9094 tweets reflecting consumer opinions about phone brands and products collected from the CrowdFlower platform. The system outperforms state-of-the-art techniques by achieving an accuracy of 99.84%. Future applications of this system include real-time sentiment monitoring for brand reputation management, enhanced customer feedback analysis for product development, and integration with customer relationship management systems to tailor marketing strategies. The promising results demonstrate the potential for deploying this system in various consumer and business domains.