Skip to content

naive Bayes

learning

Level 2 of 3

Also called the naive Bayes classifier and simple Bayes.

fresh numbers

The test's questions that a run answers, asked again on new numbers whenever you like. The answer, its working and the reason for every other choice come from naive bayes's own run on the numbers shown.

choose one

question 1

Points 2 8 t, 7 8 s, 6 2 c, 3 2 t and 8 5 s, and a new point at 5 across, 4 up. The smoothing count is 1. How many points does naive Bayes count?

024681002468100-10x 0-3x 4-6x 7-10y 0-3y 4-6y 7-10tsc000000000000000000000
the answer, and why

the answer is C

One for each of the 5 points, each added once to its class's row.

if you chose another

  • That counts the classes, each scored once after the counting.
  • That counts each point twice, once for each band; it is one point read once.
  • That is the smoothing count; it is added to counts, never counted.

new numbers

question 2

On the same points, what do the squares score?

024681002468100-10x 0-3x 4-6x 7-10y 0-3y 4-6y 7-10tsc000000000000000000000
the answer, and why

the answer is C

The squares at 7 8 and 8 5 are 2 of 5. Neither is in band 4 to 6 across, so 0 + 1 over 2 + 3. One is in band 4 to 6 up, so 1 + 1 over 5. 2/5 × 1/5 × 2/5 = 0.032.

if you chose another

  • That is the triangles' score, 2/5 × 1/5 × 1/5.
  • That is the circle's score, 1/5 × 2/4 × 1/4.
  • That is the squares' share of the points alone, 2 of 5.

new numbers

question 3

Five triangles, 1 9 t, 8 9 t, 9 7 t, 9 2 t and 8 1 t, and one square at 5 8. A new point at 4 across, 9 up, with no smoothing. What do the triangles score?

024681002468100-10x 0-3x 4-6x 7-10y 0-3y 4-6y 7-10ts00000000000000
the answer, and why

the answer is C

No triangle stands in band 4 to 6 across, so one share is 0 of 5, and 0 times anything is 0.

if you chose another

  • That is their score with a smoothing count of 1.
  • That is their share in band 7 to 10 up alone, 3 of 5.
  • That is their share of all the points alone, 5 of 6.

new numbers