This project explores sentiment analysis using few main distinct machine learning models: Logistic Regression, Convolutional Neural Network (CNN), Naive Bayes, BERT, and XLNET. We leverage the IMDb dataset from the Natural Language Toolkit (NLTK), where sentences are labelled as positive or negative, forming the foundation for our training and testing sets. Logistic Regression employs TF-IDF features for sentiment prediction, while the CNN model, constructed using Keras, tokenizes and pads text data for input. Simultaneously, a Multinomial Naive Bayes classifier is trained on TF-IDF features. Each model is evaluated rigorously using metrics such as F1 score, accuracy, precision, and recall. Additionally, we developed a voting ensemble method that uses the results of all these models to achieve superior evaluation metrics. Comparing these models offers valuable insights into their strengths and weaknesses within the realm of sentiment analysis. We present the results through a grouped bar graph, providing a clear visualization of their comparative performance. Practitioners can derive actionable insights from our work, aiding in informed decision-making regarding performance metrics based model selection. By using the well-established libraries such as scikit-learn and TensorFlow we can ensure the robustness and reliability of our implemented models.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Comparative Study of Models in Sentiment Analysis

  • Nagaratna P. Hegde,
  • Sireesha Vikkurty,
  • Sriperambuduri Vinay Kumar,
  • Amruth Devineni,
  • Sanjana Cherukuri

摘要

This project explores sentiment analysis using few main distinct machine learning models: Logistic Regression, Convolutional Neural Network (CNN), Naive Bayes, BERT, and XLNET. We leverage the IMDb dataset from the Natural Language Toolkit (NLTK), where sentences are labelled as positive or negative, forming the foundation for our training and testing sets. Logistic Regression employs TF-IDF features for sentiment prediction, while the CNN model, constructed using Keras, tokenizes and pads text data for input. Simultaneously, a Multinomial Naive Bayes classifier is trained on TF-IDF features. Each model is evaluated rigorously using metrics such as F1 score, accuracy, precision, and recall. Additionally, we developed a voting ensemble method that uses the results of all these models to achieve superior evaluation metrics. Comparing these models offers valuable insights into their strengths and weaknesses within the realm of sentiment analysis. We present the results through a grouped bar graph, providing a clear visualization of their comparative performance. Practitioners can derive actionable insights from our work, aiding in informed decision-making regarding performance metrics based model selection. By using the well-established libraries such as scikit-learn and TensorFlow we can ensure the robustness and reliability of our implemented models.