Skip to main content
AmigoFish

Coding TRAIN WRECK: Bayesian Text Classification

From The Coding Train Β· Β· 3 hr 34 min

The player loads from YouTube only when you click. It uses YouTube's privacy-enhanced mode.

If the video does not play, the owner may have turned off embedding. Watch it on YouTube instead.

Watch on YouTube

Not rated yet

Description

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: https://editor.p5js.org/codingtrain/sketches/vZQKzBXJT Polished code: https://github.com/Programming-from-A-to-Z/bayes-classifier-js https://youtu.be/unm0BLor8aE https://youtu.be/RPMYV-eb6lI https://youtu.be/fxQ0B6BkfKo https://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: https://thecodingtrain.com/ πŸ‘Ύ Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide 🚩 Suggest Topics: https://github.com/CodingTrain/Suggestion-Box πŸ’‘ GitHub: https://github.com/CodingTrain πŸ’¬ Discord: https://thecodingtrain.com/discord πŸ’– Membership: http://youtube.com/thecodingtrain/join πŸ›’ Store: https://standard.tv/codingtrain πŸ–‹οΈ Twitter: https://twitter.com/thecodingtrain πŸ“Έ Instagram: https://www.instagram.com/the.coding.train/

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

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

πŸ“„ Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct

Back to The Coding Train Β· Report a problem