LESSON 4.28 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
Naive Bayes
Watch Naive Bayes multiply one factor per feature, then pick the likelier class.
Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 4.28 · BAYES BAYP(Y = 1) = 6/12 = 0.50
01
Stage 1 of 6 · Class prior
A Bayesian classifier starts from the prior P(y). Here 6 of 12 training points have y = 1.
Explain it simply
Each dot or square is a training point with two numbers, x₁ and x₂. The dots have the label y = 1. That's 6 of 12, so the prior for y = 1 is one half. The prior is your guess before you see a new point.
12 points on a plane: 6 dots with y = 1 and 6 squares with y = 0. The ledger shows the prior: 0.50 and 0.50.
training data, inputprior, fitted curve, factorposterior, chosen classwrong or zero county = 0, not spam, the added 1
Toy: 12 points with 2 features (4.12's data) · or 6 messages over 5 words · 2 classes
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
The prior is the share of training examples in each class.
PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
- 5 more stages and 3 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.