Picture the spam filter on your email. Nobody wrote it a list of bad words. Instead the computer was given 10,000 old emails and told which ones people had marked as junk. It counted which words turned up in junk and which in real mail. Now a new email arrives, and it adds up the words.
Examples with answers→Find a pattern→The model→A guess about a new case
This is what people mean by machine learning. A person does not write the rule. A computer is shown many examples with the answer attached, and it finds a pattern that fits them. That pattern is called a model. A model is a very long list of numbers, each saying how much one clue counts.
A personmarks each email
↓→
The computerfinds the pattern
The filter was shown 10,000 emails that people had already marked junk or not junk. What did the computer need from a person?
A list of bad words. The computer cannot find words by itself.
Not yet. Finding which words matter is exactly what the computer does. What it cannot do is know which emails were junk in the first place; that came from people marking them.
The answers on the examples. Somebody had to mark which emails were junk.
Right. The computer can count words on its own. It cannot know which emails were junk unless somebody says so. The marks are the part a person supplies.
Nothing. It read the emails on its own.
Not yet. It read them, but without the marks every email looks the same. There is no pattern to find until somebody has said which ones were junk.
50 emails60 right in 100
1,000 emails85 right in 100
100,000 emails96 right in 100
Made up and round. How often the filter is right on new email.
The pattern is only as good as the examples. Show the filter 10,000 emails and it finds the tricks scammers use most. Show it fifty and it learns the quirks of those fifty. A model has never seen the world. It has seen the examples, and it treats them as the world.
Move the control through the number of old emails the filter learned from. The figures are made up and round; the shape is the real thing.
Right on new email60 in 100
Wrong40 in 100
Emails it learned from: 50
Fifty emails to learn from. The filter has learned the quirks of those fifty. It gets 60 in 100 new emails right, which is not much better than guessing.
Right on new email72 in 100
Wrong28 in 100
Emails it learned from: 200
Two hundred. The common tricks start to show up more than once. 72 in 100 right.
Right on new email85 in 100
Wrong15 in 100
Emails it learned from: 1,000
A thousand. Most of the usual tricks have been seen several times. 85 in 100.
Right on new email93 in 100
Wrong7 in 100
Emails it learned from: 10,000
Ten thousand. Nearly every trick scammers use has been seen many times. 93 in 100.
Right on new email96 in 100
Wrong4 in 100
Emails it learned from: 100,000
A hundred thousand. Ten times more email adds three points. The filter has seen almost everything that is there to see. 96 in 100.
Going from 50 to 200 emails adds twelve points. Going from 10,000 to 100,000 adds three. What does that say?
The filter stopped learning at 10,000.
Not yet. It did not stop; it went from 93 to 96. It learned less, because there was less left in the emails that it had not seen before.
The first examples teach the most. Past a point, more of the same adds little.
Right. The common tricks are learned early. The last ten times more emails mostly show the filter things it has already seen, so the gain is small.
Every batch of examples helps by the same amount.
Not yet. The frames show otherwise: twelve points for the first jump, three for the last. The gain shrinks as the examples start repeating what the filter already knows.
Move the control.
WINNER!!!junk, 95 in 100
vsvs
The filterno idea what a scam is
A model finds the pattern that fits the examples. It does not know why. The filter has no idea what a scam is. It knows that emails with the word winner and seven exclamation marks were usually marked junk. If scammers stop using the word, the pattern stops working, and the filter does not notice.
Each is a rule a computer uses. Was it written down by a person, or found by the computer in examples?
One card at a time. Tap the pile it belongs to.
Card 1 of 6
If the basket is over £50, postage is free.
Emails with the word winner are junk 9 times in 10, going by 10,000 old emails.
Nobody under 18 may buy this.
Faces with these 128 measurements were usually tagged as the same person.
People who liked this film mostly watched that one next.
A password must have at least eight characters.
If the basket is over £50, postage is free. → Written by a person
Not yet. Written. A person chose the £50 and typed the rule. There is no pile of past baskets it was learned from.
Emails with the word winner are junk 9 times in 10, going by 10,000 old emails. → Found in examples
Not yet. Found. The 9 in 10 came out of counting old emails. Nobody typed the word winner into a list.
Nobody under 18 may buy this. → Written by a person
Not yet. Written. The age is a rule somebody decided on, not a pattern spotted in who bought what.
Faces with these 128 measurements were usually tagged as the same person. → Found in examples
Not yet. Found. The measurements and the usually both came from a pile of tagged photos.
People who liked this film mostly watched that one next. → Found in examples
Not yet. Found. Mostly is a count of what past viewers did, which is what a model copies.
A password must have at least eight characters. → Written by a person
Not yet. Written. Eight is a choice a person made and typed in, and it would stay eight however people behaved.
3Written by a person
vsvs
3Found in examples
Right. Three were typed in by a person, with the number chosen. Three were counted out of examples. The second kind has no sentence in it that says why, only the count.
The past→The examples→The pattern→Tomorrow's decision
Here is the whole course in one line. A model is a pattern copied from the past. Whatever was in the examples is now in the model: the good, the mistakes, the habits of whoever made the examples. People call this subject AI ethics: what the machine does, and to whom. The next lessons follow what rides along.
First hospitalten years of its records
↓→
Second hospitaldifferent patients
A hospital trains a model on ten years of its own records to guess which patients will be back within a month. It works well there. A hospital in another country installs it. What should they expect?
The same results. The pattern is maths, and maths is the same everywhere.
Not yet. The maths is the same. The examples were not, and the examples are what the pattern was copied from. Same maths, different past, different fit.
It may do worse. Its pattern is the first hospital's past, and this hospital's patients and records are different.
Right. The model learned one hospital's examples and treats them as the world. A second hospital is a world it has not seen, and the pattern may not fit it.
Better results. It has more experience now.
Not yet. Installing a model teaches it nothing. It arrives knowing only the first hospital's ten years, and it has seen none of the new patients.
Lesson complete
A machine learns by copying a pattern from examples. It knows the past it was shown, and nothing else.