From one knob to attentionChapter 1 of 9

Chapter 1

One knob

A machine that learns is a box of knobs. This chapter shows what a knob is, and what it means to set one right.

By the end of this chapter, you will be able to

Start with a tap

You have used a knob today. A tap has one. Turn it, and the water gets warmer or colder.

Try itTurn the knob until the water is comfortable. You can drag the knob round, or use the slider.
the knob: you change this15°Cthe water:it changeswith the knobcomfortablecoldhot

Too cold. Turn the knob up.

That is all a knob is: one number you can change, and something that changes with it. Here the number is how far the tap is turned. The thing that changes is the water.

Notice how you set it. Turn, check, turn again. Remember that. A machine learns the same way.

Where this is going

Here is the big idea of the whole article. A machine that learns is a box full of knobs like that one. There is nothing else inside. The more knobs it has, the more it can do.

Try itStep through the sizes to see how many knobs different machines have.
how many knobs

One knob. Enough to match the speed of a rider. That is this chapter.

That may be hard to believe right now. How can knobs read a digit, or hold a chat? The rest of the article shows you, step by step. We start small, with one knob.

A rider on a road

A cyclist rides down a straight road at a steady speed. You do not know the speed. But you have a ghost that rides next to them, and a knob that sets how fast the ghost goes.

Try itTurn the knob until the ghost stays next to the rider for the whole ride.
minute 0 of 100 km1 km2 km3 km4 km5 km6 kmthe rideryour ghost
ghost’s distance = 0.15 × minutes

Too slow. By minute 10 the ghost is 2.7 km behind. Turn the knob up.

You never measured the rider. You took a guess and watched. Too slow, and the ghost fell behind. Too fast, and it got ahead. So you fixed the guess.

Same as the tap: turn, check, turn again.

What the knob was part of

The ghost followed one short rule:

distance = knob × minutes

Give the rule a time, and it gives you a distance. After 2 minutes with the knob at 0.5, the ghost has gone 0.5 × 2 = 1 km.

The knob is the only part of the rule you can change. Each setting makes a different ghost: a fast one, a slow one. You tried a few, and found the one that matches the rider.

Finding the knob setting that makes a rule match the real world is called learning. Right now you are the one who learns. Later, a machine will do it.

The whole ride in one picture

Watching a race is fine for one rider. Soon we will need to see a whole ride at one glance. So let us draw it. Stand the road up on its end. Let time run from left to right.

Try itPress the button. The rider goes up the road on the left. Every 2 minutes, someone marks where they are with a dot.
0 km1 km2 km3 km4 km5 km6 kmthe road, stood on end0246810minutes since the startthe rider, at the start

The ride is now a row of dots. The rule is now a straight line. Look at what the knob does to the line. It does not slide it. It tilts it.

A faster ghost covers more road each minute. So its line climbs more with each step to the right.

A steeper line means a faster ghost. Speed and steepness are the same thing. We will use steepness again in chapter 3.

What a rule is good for

Someone clocked the rider for 10 minutes and then stopped. The rule does not stop. Give it any minute, and it gives you a distance.

Try itPick any minute, even one after the clocking stopped. See where the rule says the rider is.
someone clocked this partnobody clocked this part0 km5 km10 km15 km051015202530minutes since the start3.3 km
distance = 0.15 × 22 = 3.3 km

At minute 22 the rule says 3.3 km. But this knob setting did not match the rider, so the answer is wrong by 5.9 km. Fix the knob and ask again.

This is why rules are worth having. A rule that matches what you measured can tell you about things you did not measure. But only if the knob is set right.

When one knob is not enough

Here is a new rider on the same road. This one was already moving when the clock started.

Try itA new rider. Try to get the line through every dot using only the speed knob.
0 km1 km2 km3 km4 km5 km6 km0246810minutes since the clock startedthe line starts here
distance = 0.45 × minutes

You can tilt the line, but it always starts at 0 km. This rider did not start there. At minute 0 they were already 1.5 km down the road. The rule is missing something.

The two knobs do different jobs. The speed knob tilts the line. The head start knob lifts the whole line up or down. With both, you can make any straight line.

Two knobs were harder to set than one. When you fixed one, the other went wrong. Now think of a machine with billions of knobs. Nobody can set those by hand. The machine has to set them itself.

To do that, the machine first needs something you did by eye: a way to say how wrong the rule is, as one number. That is the next chapter.

You can now