Sentiment Analysis on Internet Movie Database (IMDb) Movie Review Dataset: Hyperparameters Tuning for Naïve Bayes Model
Haoran Li · Advances in computer science research · 2023
Sentiment classification plays a crucial role in understanding and analyzing text data, particularly in domains like social media and online reviews.In this study, the influence of three key parameters on the accuracy of sentiment classification was investigated by applying Naive Bayes classifier to the Internet Movie Database (IMDb) movie review dataset.To explore the impact of the training set ratio, the proportion of data allocated to the training set was varied while keeping other parameters constant.Results indicate that increasing the training set ratio from 50% to 90% leads to a gradual improvement in classification accuracy.This finding suggests that a larger training set provides more representative samples for learning, enhancing the model's ability to generalize.Subsequently, the impact of the maximum features parameter-which establishes the feature space's dimensionality-was investigated.By changing the number of features taken into account, it is found that a larger value of max features, like 4096, produces better accuracy.Additionally, the impact of the smoothing parameter alpha on classification accuracy was investigated.The experiments showed that different alpha values, such as 0.1, 0.5, and 1, had minimal influence on the accuracy.This suggests that the Naive Bayes classifier is relatively robust to variations in the smoothing parameter in the context of sentiment classification.The findings emphasize the significance of a larger training set and an optimal number of features for improving accuracy, meanwhile the influence of the smoothing parameter appears to be limited in this context.