Naive Bayes, Clearly Explained!!!

StatQuest with Josh Starmer · 1.4M views · 2020 · 15:12

Open on YouTube

Machine learning & deep learningData science & statisticsexplainer

Why Stack Overflow recommends it

Stack Overflow users link it when they want a gentle intuition for Naive Bayes text classification, including how pseudocounts avoid zero probabilities.

Recommended by 2 people across 2 different months, 2020 to 2022.

What it is

A StatQuest explainer by Josh Starmer that walks step by step through the Multinomial Naive Bayes classifier using a spam vs. normal email example. It covers histograms and conditional probabilities, classifying sample messages, pseudocounts, and why the method is called naive.

What people said

Recommends picklepick · 2022-02 · Stack Overflow · on “Predicting score from text data and non-text data”

This would be an ideal situation for using Multinomial Naive Bayes. This is a relatively simple yet quite powerful method to classify the class of a text. If this is an introductory exercise I'm 99% sure that you're prof is expecting something with NB to solve the given problem. I would recommend a library like sklearn [LINK] which should make the task almost trivial. If you're interested in the intuition behind NB, this [this video] YouTube video should serve as a good introduction. Start off by going over some examples/blog posts, google should provide you with countless examples. Then modify the code to fit your use case. You could either group the articles in two classes e.g. score <=5 = bad

Recommends GRASBOCK · 2022-11 · Stack Overflow · on “How to analyze and get the main context from email subject in python”

Shooting with cannons at sparrows eh? If you want to learn ML/AI I suggest starting out with text classification. For example take a look at simple methods like Naive Bayes [this video] . Do you have large amounts of training data? If yes, then take a look at Neural Networks. Once you are comfortable with them move on to transformer models and language models. Then you will be at the state of the art.

Cites Ganesh Tata · 2020-10 · Stack Overflow · on “A simple explanation of Naive Bayes Classification”

I know that this answer is very old, but I was wondering if `P(Orange|Long, Sweet and Yellow)` should actually be `0`. While `P(Long/Orange)` is `0`, `P(Sweet/Orange)` and `P(Yellow/Orange)` are not. Hence, this might lead to problems during comparison between the data of two fruits ( In case the training set has more fruits ( classes ). One simple solution might be to add 1 to each fruit count so that this issue doesn't arise, as mentioned in [this video]