Save this video — free

Naive Bayes: Concepts and Code

StatQuest with Josh Starmer · 1:15:20 · Watch on YouTube

Naive Bayes: Concepts and Code Watch on YouTube →

Overview

StatQuest with Josh Starmer explains Naive Bayes classification, covering both Multinomial Naive Bayes for text and Gaussian Naive Bayes for continuous data. The video demonstrates how to implement these models in R and Python using AI assistance, highlighting the 'naive' assumption of feature independence and the practical challenges like zero probabilities, which are addressed with techniques like Laplace smoothing. The comparison of R and Python implementations shows identical results when using the same training and testing data splits.

Key takeaways

Chapters

0:00 Introduction and Audience Check-in
0:49 Introducing Naive Bayes and Its Variants
6:30 Multinomial Naive Bayes: Spam Filtering Example
10:02 Calculating Word Probabilities for Normal Messages
13:34 Calculating Word Probabilities for Spam Messages
15:46 Classifying a New Message: 'Dear Friend'
19:04 Classifying 'Dear Friend' as Spam
25:46 Handling Zero Probabilities with Laplace Smoothing
33:57 The 'Naive' Assumption of Naive Bayes
36:43 Gaussian Naive Bayes: Predicting Movie Preference
41:35 Calculating Scores for Gaussian Naive Bayes
47:06 Using Log-Likelihoods to Avoid Underflow
51:38 Comparing Gaussian Naive Bayes Scores
55:12 Coding Naive Bayes in R with AI Assistance

Keep these chapters and the full searchable transcript in your own library.

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, StatQuest with Josh Starmer.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.