ai/machine-learning-by-example-how-a-computer-learns-apples-from-oranges.md
Machine learning by example: how a computer learns apples from oranges
Normal programs follow rules a person wrote. Machine learning turns that around: you give the computer examples with the right answers, and it works out the rule itself.
Using a toy problem, telling apples from oranges by weight and colour, this page explains features, labels, models and predictions, then lets you train a real nearest-neighbour model on a chart. Slide one setting and watch it go from memorising its examples to ignoring them, and see why every model must be judged on test data it has never seen.
$ ls ai/
see all →
ai/rag-how-a-chatbot-looks-things-up-before-it-answers.md
RAG: how a chatbot looks things up before it answers
A chatbot has never read your shop's rules, so when you ask it about them it may guess, and a confident wrong guess is called a…
ai/accuracy-why-a-spam-filter-that-is-99-right-can-still-catch-nothing.md
Accuracy: why a spam filter that is 99% right can still catch nothing
A spam filter that never flags anything can score 99% accuracy when only 1 email in 100 is spam. So what should you measure instead? This…
ai/the-context-window-why-a-chatbot-forgets-the-start-of-a-long-chat.md
The context window: why a chatbot forgets the start of a long chat
A chatbot does not remember your conversation. Each time you press send, the app hands the model the whole chat again, and the model can…
ai/tokens-how-a-chatbot-cuts-your-text-into-pieces-before-it-reads-a-word.md
Tokens: how a chatbot cuts your text into pieces before it reads a word
A chatbot never sees your letters. Before it reads anything, a small program called a tokenizer cuts the text into pieces and gives each…
ai/gradient-descent-how-a-computer-learns-a-number-by-rolling-downhill.md
Gradient descent: how a computer learns a number by rolling downhill
How does a computer learn a number? It can't solve for it in one go. It tries a guess, measures how wrong it is, and nudges the guess…
ai/embeddings-how-a-computer-knows-a-pony-is-closer-to-a-horse-than-a-tru.md
Embeddings: how a computer knows a pony is closer to a horse than a truck
A computer sees the letters in "pony" and nothing else, yet search boxes can still tell that a pony is closer to a horse than to a truck…