Coding TRAIN WRECK: Bayesian Text Classification @TheCodingTrain
Coding TRAIN WRECK: Bayesian Text Classification  @TheCodingTrain
Uploaded September 2025 | Updated November 2026, 14 hours ago
Warning, this live stream was a mess and is probably unwatchable! But if you choose to continue you'll see me attempt to build a Naive Bayes text classifier from scratch in the p5.js web editor! I start by explaining the core concepts behind Bayes' Theorem (multiple times) before diving into the code. You'll see my raw, unedited process of structuring the data, implementing the algorithm, debugging issues, and finally building a simple interactive sentiment analysis demo.

Code from live: editor.p5js.org/codingtrain/sketches/vZQKzBXJT
Polished code: github.com/Programming-from-A-to-Z/bayes-classifier-js
youtu.be/unm0BLor8aE
youtu.be/RPMYV-eb6lI
youtu.be/fxQ0B6BkfKo
youtu.be/HZGCoVF3YvM

00:00:00 Choo choo!
00:05:35 Welcome & Announcements
00:10:49 Fall Plans
00:14:19 Technical Difficulties: Whiteboard Setup
00:23:20 Main Topic: Bayesian Text Classification
00:33:03 Whiteboard: Explaining Bayes' Theorem (Attempt 1)
00:44:02 Technical Difficulties: Muted Microphone
00:45:52 Whiteboard: Explaining Bayes' Theorem (Attempt 2)
01:24:54 Live Coding Begins
01:32:42 Re-recording the Introduction for Edited Video
01:40:13 Technical Difficulties: Camera Overheating
02:04:10 Coding Resumes: Building the Classifier
02:51:10 Explaining Laplacian (Additive) Smoothing
03:12:20 Normalizing the Final Probabilities
03:24:12 Coding Challenge Complete!
03:24:43 Reviewing a More Polished Version of the Code
03:30:35 Good bye!

πŸš‚ Website: thecodingtrain.com
πŸ‘Ύ Share Your Creation! thecodingtrain.com/guides/passenger-showcase-guide
🚩 Suggest Topics: github.com/CodingTrain/Suggestion-Box
πŸ’‘ GitHub: github.com/CodingTrain
πŸ’¬ Discord: thecodingtrain.com/discord
πŸ’– Membership: youtube.com/thecodingtrain/join
πŸ›’ Store: standard.tv/codingtrain
πŸ–‹οΈ Twitter: twitter.com/thecodingtrain
πŸ“Έ Instagram: instagram.com/the.coding.train

πŸŽ₯ youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

πŸ”— p5.js: p5js.org
πŸ”— p5.js Web Editor: editor.p5js.org
πŸ”— Processing: processing.org

πŸ“„ Code of Conduct: github.com/CodingTrain/Code-of-Conduct
Coding TRAIN WRECK: Bayesian Text Classification#genuary16 10,000 snowflakesApple ][ Coding Challenge: Fractal TreeCoding Train Live: Processing Community CatalogCoding Train Live: Live from the Attic 2!i like pinkA Pocket Full of Algorithms! Q&A 1.1 #shortsCoding Train Live: Autoencoders!Coding Train Live! (Preparing for Computer Mouse Conference)Upcoming Plans, ML Sampling with softmax and temperatureHosting a p5.js sketch with GitHub PagesCoding Challenge 169: Pi in the Sky Game
The Coding Train |

Coding TRAIN WRECK: Bayesian Text Classification

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER