コンテンツへスキップ

この動画とテキストは英語です。

Perceptron: the yes-or-no model every neural network grew from

AI Concepts #001

What a perceptron is, how it turns a few measurements into a yes or a no, and how the same data took 29,870 corrections raw but just one once centred.

詳しく

What a perceptron is

A perceptron is one of the simplest models a computer can learn: it turns a few measurements into a yes or a no. Each measurement gets a weight, a number that says how much that measurement counts. On top of that sits one bias, a fixed nudge that shifts the total up or down. The answer depends only on whether the final total lands above or below zero.

In our course, a perceptron sorts factory parts using two measurements: width in millimetres and weight in grams (the part's weight, not to be confused with the model's weights). So everything it knows fits in three numbers: two weights and one bias. Picture every part as a dot on a chart. The perceptron draws one straight line across it, accepted parts on one side and rejected parts on the other. Learning just means moving that line.

What the video shows

This short is the first half of a two-part walkthrough of Chapter 1 of the course. A perceptron learns to sort the factory parts straight from their raw measurements. It gets there, but only after 29,870 corrections: 29,870 times it got a part wrong and had to adjust.

Then comes one small change. Before training, subtract the average width and the average weight from every measurement, so the numbers are centred around zero. Same parts, same perceptron, same learning rule. This time it needs a single correction.

The model did not get any smarter. Only the way the numbers were presented to it changed. Why centring helps this much is a story of its own, told in the Input Normalization entry of this series.

An everyday example

Imagine deciding each morning whether to take an umbrella. You check two things: how dark the sky looks and what the forecast says. You trust the forecast more, so it counts double. You add the two up, then subtract a little because you hate carrying an umbrella around. If what is left is still positive, the umbrella comes with you.

That is a perceptron. Counting double is a weight. Subtracting a little is the bias. Asking whether it is still positive is the final yes or no. The only difference is that a perceptron learns its weights and its bias from examples instead of from your hunches.

How it works, step by step

  1. Multiply each measurement by its weight.
  2. Add the results, plus the bias.
  3. Check the sign: zero or above means accept, below zero means reject.

Because the answer is only ever yes or no, the border is hard: a part just on one side of the line is accepted, one just across it is rejected. Where that line sits, and how the perceptron shifts it after each mistake, are covered in the next entries of this series: Decision Boundary and Learning From Mistakes.

Why it matters

The perceptron is old, but its shape never went away. Weights, a sum, a bias, then a function applied to the total: that recipe is still the basic unit of every neural network that came after it, including the ones inside transformers, the design behind today's chatbots. The yes-or-no check is one such final function. Engineers call it nonlinear because its output does not simply grow in step with the total; it snaps to one of two answers. Later networks usually swap it for a different nonlinear function, but they keep the recipe.

The video adds a practical lesson on top: the same simple model can look painfully slow or almost instant depending on how its data is prepared. It is 29,870 corrections against one, with nothing changed but the numbers going in.

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

こちらでも

この章の他の動画

無料コース第1章をもとに、AIの支援を受けて作成したテキストです。