İçeriğe geç

Bu video ve metni İngilizcedir.

Machine learning: how a computer draws its own dividing line

AI 101 #02

Nobody writes the rule: the computer draws a line between examples, checks its mistakes and nudges the line, then uses it to sort new cases. Here is how.

Ayrıntılı olarak

What machine learning is

Machine learning is a way of getting a computer to make decisions without anyone writing the decision rule. You give it a pile of examples where the right answer is already known. It proposes a rule, checks it against those examples, adjusts it where it got things wrong, and goes again. Once the rule gets the examples right, or close enough, you use it on cases it has never seen.

What the video shows

The short uses cats and dogs, shown as dots on a chart, one colour for each. The computer draws its own dividing line between them. Dots that land on the wrong side are marked as mistakes, and the line moves. Each try is a little less wrong than the one before, until none are left. Then new, unlabelled dots drop in, and it uses the line to predict which one is a cat and which one is a dog.

An everyday example

Imagine a new cook learning when a steak is done, judging only two things: how firm it feels when pressed and how many minutes it has been on the grill. At first the calls are poor. When a call is right, nothing changes. Every time an experienced cook says "wrong", the new cook shifts their idea of where "done" begins, a little, in the direction that call needed. After enough steaks the boundary sits in a good place, and they can judge a steak nobody has checked yet.

How it works

Our free course builds the simplest learning machine there is, called a perceptron: two numbers that set how much each measurement counts, plus a threshold, the cut-off the total has to pass. Its examples are factory parts, each measured by width and weight and labelled "accept" or "reject". Those two measurements turn each part into a point on a graph, and the machine's job is to find a straight line with the accepted points on one side and the rejected points on the other.

  1. Start knowing nothing. Every setting begins at zero, so at first it accepts every single part.
  2. Look at one example. Did the answer land on the correct side?
  3. Right? Change nothing. Wrong? Nudge. Shift the line a small step in the direction that one example needed.
  4. Go round again. A nudge that helps one part can break another, so it keeps passing through all the examples until a full round has zero mistakes. That finish line only exists if the two groups can be split by a straight line at all.
  5. Predict. The finished line now sorts parts it was never shown.

That nudge is not a lucky guess. The course shows it is the smallest change that is certain to improve the example in front of it.

A common misconception

"Learning" sounds like understanding. For this machine, learning literally means moving a line. It does not even need calculus, the maths of slopes, because it never asks how wrong it was, only whether it was right or wrong.

That simplicity is also its limit. A yes-or-no signal cannot tell it whether it just missed or was far off. And one straight line cannot split every problem: the course shows a case with only four points where no line works at all. Later ideas fix both, by measuring how wrong a guess was and by stacking many of these units in layers.

Why it matters

The perceptron is the smallest version of an idea that never goes away: try, compare with the known answer, adjust, repeat. Bigger models change how they measure mistakes and how they adjust, but their rule still comes from examples, not from a programmer typing it in. Once you picture a line being nudged into place, "the model learned it" stops sounding mysterious.

Learn it step by step in Chapter 1 of our free course AI From Scratch: The Perceptron From Scratch: What a Neuron Computes.

Ekranda

Show the computer lots of examples. It draws its own dividing line. Each try, a little less wrong. Then it predicts new data.

Şurada da

Bu bölümden daha fazlası

Metin, ücretsiz kursumuzun 1. bölümünden AI desteğiyle yazıldı.