10.5 KB · .xlsx

AI in a spreadsheet

A 160-word SMS spam classifier whose weights live in Excel cells. The classify sheet scores a text with SUMPRODUCT and SEARCH; no macros, no Python, no server.

90.6%
160
10.5 KB
0

Download

The workbook has three sheets: classify (input + formula), model (160 words × 2 weights) and readme.

Download spreadsheet.xlsx

Open in Excel, LibreOffice or Google Sheets. Replace cell B1 with an SMS; B4 is the verdict. Excel recalculates on load.

How the formula works

B2 (ham)  = SUMPRODUCT(--ISNUMBER(SEARCH(model!A2:A161, B1)), model!B2:B161)
B3 (spam) = SUMPRODUCT(--ISNUMBER(SEARCH(model!A2:A161, B1)), model!C2:C161)
B4        = IF(B2>=B3, "ham", "spam")

The weights are Complement NB log-probabilities; higher is better. SEARCH is a case-insensitive substring match, not the exact tokenizer: formula accuracy is 90.6% on 1,115 held-out SMS, while the Python model is 90.9%. A demo of a model small enough to live in a workbook, not a production filter.

The same model in other containers

the 2.2 KB QR URL · the 3.7 KB PDF model card · the Minimum-Bit Table · train your own · the 130 KB demos