LAB NOTEBOOK No. 01 · PROJECT · INDIA — UTC+5:30Live · interactiveShipped · live demo
Live · interactive · Shipped · live demo

spam_classifier

◉ Live · interactive·Type a message, watch it split into tokens, score red (spam) or green (ham), filter the weak signals, then stamp a verdi
Open live bench → View code on GitHub ↗ ← Back to archive

A Naive Bayes spam filter you can see working. Type any message and it tokenises, scores each token P(spam|token) with Laplace smoothing, filters weak signals, then stamps SPAM or HAM with P(spam|message).

Trained live in your browser on 5,572 SMS messages (data.csv) via Pyodide + pandas — no mock, no server. The same Python that trained it scores you, token by token, in real time. Open the live bench and try WINNER!! free money now.

Highlights

  • Tokenisation and scoring you can see
  • Weak signals filtered, strong signals kept
  • Shows P(spam|message) with real math
  • Runs entirely in the browser (Pyodide)
Naive Bayes NLP Pyodide Pandas live
Python 72% · HTML 28%
Dataset
data.csv
Model
Naive Bayes
Runtime
browser
FAQ — spam_classifier
Does my message leave my device?tap ↕

No — the bench runs entirely in your browser via Pyodide. Nothing is sent to a server.

How is the model trained?tap ↕

Naive Bayes with Laplace smoothing (k=1) over the 5,572-row SMS dataset — the same data.csv from the repo, loaded live.

What does Weak filtered mean?tap ↕

Tokens with P(spam|token) near 0.5 (weak signal, within 0.12 of 0.5) are filtered before the verdict — only strong red/green tokens count.

Related logs
2026-08-05 · 1 min
Spam Classifier Shipped — 5,572 Messages, Zero Mock
Shipped a live Naive Bayes bench that tokenises, scores, and stamps P(spam|message) in your browser via Pyodide — nothing mocked.
Read →
Open live bench → View code on GitHub ↗ ← All projects GitHub ↗