Naïve Bayes
Overview
Naive Bayes is a probabilistic algorithm that is commonly used for classification and prediction problems in machine learning. It is based on Bayes' theorem of probability, which describes the probability of an event based on prior knowledge of conditions that might be related to the event. Naive Bayes assumes that the features or variables used for prediction are independent of each other, which may not always be the case.
Naive Bayes can be applied to classify the data based on the sentiment expressed in the text. The goal is to predict whether the sentiment expressed in the text is positive or negative towards Nike as compared to other leading shoe brands.
The application of Naive Bayes to this project would help to determine whether Nike is the top-ranked brand in the global footwear market in terms of brand recognition and customer appeal compared to other leading shoe brands. It would also provide insights into the strengths and weaknesses of Nike as perceived by customers in comparison to other leading shoe brands.
Data Preparation
Supervised learning algorithms, such as Naive Bayes, learn from labeled examples to make predictions or classifications on new, unlabeled data. In this case, a Naive Bayes classifier is trained using a labeled dataset, where each text is labeled as positive or negative towards Nike or other leading shoe brands. Once the classifier is trained, it can be used to predict the sentiment expressed in the unlabelled data.


Code
Results
Visualization
Confusion Matrix

Conclusion
In conclusion, based on customer reviews, Accuracy of Label: 0.6410256410256411 was achieved using naive bayes.