[论文解读] Sentiment analysis on electricity twitter posts
本研究使用TF-IDF特征提取和多种机器学习分类器,对约10,000条关于英国和印度电价上涨的英文Twitter推文进行情感分析。随机森林模型达到最高准确率(84%),优于朴素贝叶斯(66%),且在使用TF-IDF词级特征时表现优于N-gram特征。
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.
研究动机与目标
- 利用英国和印度的Twitter数据,分析公众对电价上涨的情绪反应。
- 评估不同特征提取技术(特别是TF-IDF词级特征与N-gram特征)在情感分类性能上的有效性。
- 比较多种机器学习分类器(朴素贝叶斯、决策树、随机森林、逻辑回归)在情感分类任务中的表现。
- 为政府和能源市场利益相关方提供有关能源价格上涨引发公众意见和政策反应的见解。
提出的方法
- 使用Twitter API和Python收集约10,000条与电价上涨相关的英文推文。
- 通过标准自然语言处理技术对文本数据进行预处理,包括分词和停用词移除。
- 使用TF-IDF(词频-逆文档频率)在词级上提取特征,并与N-gram特征进行比较。
- 应用四种分类算法:朴素贝叶斯、决策树、随机森林和逻辑回归,用于情感极性预测。
- 使用标准指标评估模型性能:F-Score、准确率、精确率和召回率。
- 生成ROC曲线和AUC分数,以评估模型的可分性和整体性能。
实验结果
研究问题
- RQ1在电价相关推文的情感分类任务中,TF-IDF词级特征与N-gram特征哪种方法性能更优?
- RQ2在电价相关Twitter数据的情感分类中,不同机器学习模型(朴素贝叶斯、决策树、随机森林、逻辑回归)的表现如何比较?
- RQ3在英国和印度的多语言、真实世界电价相关推文数据集上,情感分类模型的整体准确率和F-Score是多少?
- RQ4在此情境下,TF-IDF特征相比其他特征集在多大程度上提升了情感分类性能?
主要发现
- 随机森林模型达到最高准确率84%,显著优于朴素贝叶斯模型(准确率66%)。
- 与N-gram特征相比,TF-IDF词级特征在情感分类中性能提升了3-4%。
- 决策树和随机森林模型的精确率最高,表明其在分类正向情感方面具有更强的可靠性。
- 随机森林和逻辑回归模型的召回率最高,表明其在检测实际正向情感样本方面表现更优。
- 所有模型的AUC分数均显示良好的可分性,决策树和随机森林的AUC值均高于0.7,证实了模型具有强大的判别能力。
- 尽管数据集规模和语言范围存在局限,模型整体表现良好,其中随机森林在本任务中被证明是最有效的分类器。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。