[Paper Review] Sentiment analysis on electricity twitter posts
This study performs sentiment analysis on ~10,000 English-language Twitter tweets regarding rising electricity prices in the UK and India using TF-IDF feature extraction and multiple machine learning classifiers. Random Forest achieved the highest accuracy (84%), outperforming Naive Bayes (66%) and showing superior performance with TF-IDF word-level features over N-gram features.
In today's world, everyone is expressive in some way, and the focus of this project is on people's opinions about rising electricity prices in United Kingdom and India using data from Twitter, a micro-blogging platform on which people post messages, known as tweets. Because many people's incomes are not good and they have to pay so many taxes and bills, maintaining a home has become a disputed issue these days. Despite the fact that Government offered subsidy schemes to compensate people electricity bills but it is not welcomed by people. In this project, the aim is to perform sentiment analysis on people's expressions and opinions expressed on Twitter. In order to grasp the electricity prices opinion, it is necessary to carry out sentiment analysis for the government and consumers in energy market. Furthermore, text present on these medias are unstructured in nature, so to process them we firstly need to pre-process the data. There are so many feature extraction techniques such as Bag of Words, TF-IDF (Term Frequency-Inverse Document Frequency), word embedding, NLP based features like word count. In this project, we analysed the impact of feature TF-IDF word level on electricity bills dataset of sentiment analysis. We found that by using TF-IDF word level performance of sentiment analysis is 3-4 higher than using N-gram features. Analysis is done using four classification algorithms including Naive Bayes, Decision Tree, Random Forest, and Logistic Regression and considering F-Score, Accuracy, Precision, and Recall performance parameters.
Motivation & Objective
- To analyze public sentiment on rising electricity prices using Twitter data from the UK and India.
- To evaluate the effectiveness of different feature extraction techniques—specifically TF-IDF word-level features versus N-gram features—on sentiment classification performance.
- To compare the performance of multiple machine learning classifiers (Naive Bayes, Decision Tree, Random Forest, Logistic Regression) on the sentiment classification task.
- To provide insights into public opinion and policy reactions to energy price increases for use by governments and energy market stakeholders.
Proposed method
- Collected ~10,000 English tweets related to electricity price hikes using the Twitter API and Python.
- Preprocessed text data through standard NLP techniques, including tokenization and stopword removal.
- Extracted features using TF-IDF (Term Frequency-Inverse Document Frequency) at the word level and compared with N-gram features.
- Applied four classification algorithms: Naive Bayes, Decision Tree, Random Forest, and Logistic Regression for sentiment polarity prediction.
- Evaluated models using standard metrics: F-Score, Accuracy, Precision, and Recall.
- Generated ROC curves and AUC scores to assess model separability and overall performance.
Experimental results
Research questions
- RQ1Which feature extraction method—TF-IDF word-level or N-gram—yields better performance in classifying sentiment on electricity price-related tweets?
- RQ2How do different machine learning models (Naive Bayes, Decision Tree, Random Forest, Logistic Regression) compare in classifying sentiment on electricity price-related Twitter data?
- RQ3What is the overall accuracy and F-Score of sentiment classification models on a multilingual, real-world dataset of electricity price-related tweets from the UK and India?
- RQ4To what extent do TF-IDF features improve sentiment classification performance compared to other feature sets in this context?
Key findings
- Random Forest achieved the highest accuracy of 84%, significantly outperforming Naive Bayes, which had an accuracy of 66%.
- TF-IDF word-level features yielded a 3-4% improvement in performance compared to N-gram features in sentiment classification.
- Decision Tree and Random Forest achieved the highest precision scores, indicating strong reliability in classifying positive sentiments.
- Random Forest and Logistic Regression achieved the highest recall values, suggesting better detection of actual positive sentiment instances.
- The AUC scores across all models indicated good separability, with values above 0.7 for Decision Tree and Random Forest, confirming strong model discrimination capacity.
- Despite limitations in dataset size and language scope, the models demonstrated strong performance, with Random Forest emerging as the most effective classifier for this task.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.