Learndata-mlHow Machines Learn Patterns

Lesson · 8 min

How Machines Learn Patterns

Features, labels, and the loop that turns examples into a model.

Supervised learning is a guessing game. You show the model thousands of examples with the right answers attached (labels). Each round, it guesses, measures how wrong it was, and nudges itself to be less wrong. Repeat a few million times and you have a trained model.

The vocabulary you’ll use in the lab

  • Example: one data point, like a sentence with its category.
  • Feature: a property the model can use, like word counts.
  • Label: the right answer attached to an example.
  • Accuracy: the share of predictions the model gets right on data it hasn’t memorized.
A model that scores 100% on data it trained on has usually just memorized it. That’s called overfitting — the machine version of acing a practice test but failing the real exam.

Try it yourself

Try it — match

Match each term to its meaning before the lab borrows the vocabulary.

Click a card, then a slot (or a slot, then a card). Click again to detach.

Knowledge check

1

In a spam classifier, what is the "label"?

2

What does "accuracy" measure?