AI Basics · Lesson 2

How machines learn from examples

Learning from examples has three ingredients: examples (training data), a model with lots of adjustable numbers, and a training process that nudges those numbers until the model's guesses match the examples.

Below is a real mini-AI. You give it a few example messages for each label. It turns every sentence into numbers that capture its meaning, then learns which numbers point to which label.

Try it Yourself: Train a message sorter (Train your own AI)

Tip: Notice that it can label sentences it has never seen. That is the whole point of learning: generalising from examples to new cases.

Exercises

🔎esc