تدريب Shadowing: Supervised Learning: Crash Course AI #2 - تعلم التحدث بالإنجليزية عبر الفيديو

جارٍ إنشاء الدرس...
1
Hey, I'm Jabril and this is Crash Course AI.
2
Today, we're going to try and teach John Greenbot something.
3
Hey, John Greenbot.
4
Hello, humanoid friend.
5
Are you ready to learn?
6
Hello, humanoid friend.
7
As you can see, he has a lot of learning to do, which is the basic story of all artificial intelligence.
8
But it's also our story.
9
Humans aren't born with many skills, and we need to learn how to sort mail, land airplanes, and have friendly conversations.
10
So computer scientists have tried to help computers learn like we do, with a process called supervised learning.
11
You ready John Greenbot?
12
Hello, humanoid friend.
13
The process of learning is how anything can make decisions, like for example, humans, animals, or AI systems.
14
They can adapt their behavior based on their experiences.
15
In Crash Course AI, we'll talk about three main types of learning, reinforcement, unsupervised, and supervised learning.
16
Un-learning is the process of learning in an environment, through feedback from an AI's behavior.
17
It's how kids learn to walk.
18
No one tells them how, they just practice, stumble, and get better at balancing until they can put one foot in front of the other.
19
Unsupervised learning is the process of learning without training labels.
20
It could also be called clustering or grouping.
21
Sites like YouTube use unsupervised learning to find patterns
22
and frames of video and compress those frames so that videos can be streamed to us quickly.
23
And supervised learning is the process of learning with training labels.
24
It's the most widely used kind of learning when it comes to AI, and it's what we'll focus on today and in the next few videos.
25
Supervised learning is when someone who knows the right answer, called a supervisor, points out mistakes during the learning process.
26
You can think of this like when a teacher corrects a student's math.
27
In one kind of supervised setting, we want an AI to consider some data, like an image of an animal, and classify it with a label, like reptile or mammal.
28
AI needs computing power and data to learn.
29
And that's especially true for supervised learning, which needs a lot of training examples from a supervisor.
30
After training this hypothetical AI, it should be able to correctly classify images it hasn't seen before.
31
Like a picture of a kitten as a mammal.
32
That's how we know it's learning, instead of just memorizing answers.
33
And supervised learning is a key part of lots of AI you interact with every day.
34
It's how email accounts can correctly classify a message from your boss as important and ads as spam.
35
It's how Facebook tells your face apart from your friend's face
36
so that it can make tag suggestions when you upload a photo.
37
And it's how your bank may decide whether your loan request is approved or not.
38
Now, to initially create this kind of AI, computer scientists were loosely inspired by human brains.
39
They were mostly interested in cells called neurons because our brains have billions of them.
40
Each neuron has three basic parts, the cell body, the dendrites, and the axon.
41
The axon of one neuron is separated from the dendrites of another neuron by a small gap called a synapse,
42
and neurons talk to each other by passing electric signals through synapses.
43
As one neuron receives signals from another neuron, the electric energy inside of its cell body builds up until a threshold is crossed.
44
Then, an electric signal shoots down the axon and is passed to another neuron, where everything repeats.
45
The goal of early computer scientists wasn't to mimic a whole brain.
46
Their goal was to create one artificial neuron that worked like a real one.
47
To see how, let's go to the Thought Bubble.
48
In 1958, a psychologist named Frank Rosenblatt was inspired by the Dartmouth Conference and was determined to create an artificial neuron.
49
His goal was to teach this AI to classify images as triangles or not triangles with his supervision.
50
That's what makes it supervised learning.
51
The machine he built was about the size of a grand piano, and he called it the perceptron.
52
Rosenblatt wired the perceptron to a 400 pixel camera, which was high-tech for the time,
53
but is about a billion times less powerful than the one on the back of your modern cell phone.
54
He would show the camera a picture of a triangle or a not triangle, like a circle.
55
Depending on if the camera saw ink or paper in each spot, each pixel would send a different electric signal to the perceptron.
56
Then, the perceptron would add up all the signals that match the triangle shape.
57
If the total charge was above its threshold, it would send an electric signal to turn on a light.
58
That was artificial neuron speak for, yes, that's a triangle.
59
But if the electric charge was too weak to hit the threshold, it wouldn't do anything and the light wouldn't turn on.
60
That meant not a triangle.
61
At first, the perceptron was basically making random guesses.
62
So to training with supervision, Rosenblatt used yes and no buttons.
63
If the perceptron was correct, he would push the yes button and nothing would change.
64
But if the perceptron was wrong, he would push the no button,
65
which would set off a chain of events that adjusted how much electricity crossed the synapses and adjusted the machine's threshold levels.
66
So, it'd be more likely to get the answer correct next time.
67
Thanks Thought Bubble.
68
Nowadays, rather than building huge machines with switches and lights, we can use modern computers to program AI to behave like neurons.
69
The basic concepts are pretty much the same.
70
First, the artificial neuron receives inputs multiplied by different weights, which correspond to the strength of each signal.
71
In our brains, the electric signals between neurons are all the same size, but with computers, they can vary.
72
The threshold is represented by a special weight called the bias, which can be adjusted to raise or lower the neuron's eagerness to fire.
73
So, all the inputs are multiplied by their respective weights, added together, and a mathematical function gets a result.
74
In the simplest AI systems, this function is called a step function, which can only output a zero or a one.
75
If the sum is less than the bias, then the neuron will output a zero, which could indicate not triangle or something different depending on the task.
76
But if the sum is greater than the bias, then the neuron will output a 1, which indicates the opposite result.
77
An AI can be trained to make simple decisions about anything where you have enough data and supervised labels, like triangles, junk mail, languages,
78
movie genres, or even similar looking foods, like donuts and bagels.
79
Hey John Green bot!
80
You want to learn how to sort some disgusting bagels from delicious donuts?
81
Hello, humanoid friend.
82
John Greenbot still has the Talk Like a Human program.
83
Remember, we don't have generalized AI yet.
84
That program is pretty limited.
85
So I need to swap it out for the Perception program.
86
Now that John Greenbot is ready to learn, we'll measure the mass and diameter of some bagels and donuts and supervise him so he gets better at labeling them.
87
How about you hold onto these for me?
88
Right now, he doesn't know anything about bagels or donuts or what their masses and diameters might be.
89
So his program is initially using random weights for mass, diameter, and the bias to help make a decision.
90
But as he learns, those weights will be updated.
91
Now we can use different mathematical functions to account for how close or far an AI is from the correct decision.
92
But we're going to keep it simple.
93
John Greenbot's Perception program is using a step function, so it's an either-or choice.
94
Zero or one.
95
Bagel or donut.
96
Completely right or completely wrong.
97
Let's do this.
98
This here is a mixed batch of bagels and donuts.
99
This first item has a mass of 34 grams and a diameter of 7.8 centimeters.
100
The perceptron takes these inputs, multiplies them by their respective weights, then adds them together.
101
If the sum is greater than the bias, which, remember, is the threshold for the neuron firing, John Greenbot will say, bagel.
102
So, if it helps to think of it this way, the bias is like a bagel threshold.
103
If the sum is less than the bias, it hasn't crossed the bagel threshold and John Greenbot will say, donut.
104
All this math can be tricky to picture.
105
So to visualize what's going on, we can think of John Greenbot's perceptron program as a graph, with the mass on one axis and the diameter on the other.
106
The weights and bias are used to calculate a line called a decision boundary on the graph, which separates bagels from donuts.
107
And if we represent this same donut as a data point, we'd graph it at 34 grams and 7.8 centimeters.
108
This data point is above the decision boundary, in the bagel zone.
109
So all this means is when I ask John Greenbott what this food is, he'll say, BAGEL And he got it wrong,
110
because this is a donut.
111
No big deal though.
112
With a brand new program, he's like a baby that made a random guess.
113
he's using random weights right now.
114
But we can help him learn by updating his weights.
115
So we take an old weight and add a number calculated by an equation called the update rule.
116
We're going to keep this conceptual, but if you want more information about this equation, we've linked to a resource in the description.
117
Now because our perceptron can only be completely right or completely wrong, the update rule ends up being pretty simple.
118
If John Greenbott made the right choice, like labeling a donut as a donut, the update rule works out to be zero, so he adds zero to the weight and the weight stays the same.
119
But, if John Greenbot made the wrong choice, like labeling a donut as a bagel, the update rule will have a value, a small positive or negative number.
120
He'll add that value to the weight and the weight will change.
121
Conceptually, this means John Greenbot learns from failure, but not from success.
122
So he called this donut a bagel and got the label wrong.
123
By pressing this no button, I'm supervising his learning and letting him know that he made the wrong choice, so his weights update.
124
If we look back at the graph, we can see that when the weights update, the decision boundary changes.
125
That data point we added is now below the line, in the donut zone.
126
Now his perception will classify another item with this mass and diameter as a donut.
127
This next item has a mass of 26 grams and a diameter of 6.1 centimeters.
128
What do you think, John Greenbot?
129
Doughnut.
130
He got it right!
131
When he took those inputs into the same calculation, the sum was less than the bias.
132
That data point appeared below the decision boundary, in the donut zone.
133
And so, I'm gonna push the yes button.
134
In this case, the update rule equation works out to be zero.
135
So the weights are the same, and so does the decision boundary.
136
Now we do this 48 more times to train his perceptron.
137
After we're done training John Greenbot's perceptron, we have to test it on new data to see how well he's learned.
138
So I got a hundred new bagels and donuts for him to classify.
139
Oh, whoa.
140
This is a big what.
141
What is this?
142
Bagel.
143
All right.
144
All right.
145
Just let me write that down.
146
Write down your answer.
147
Alright, so overall, he's classified 25 donuts and 75 bagels.
148
We can visualize the results on a graph with a decision boundary like this.
149
But we can also put the results in a table called a confusion matrix
150
because it tells us where John Greenbot was confused.
151
He got 8 donuts correct and 73 bagels correct, but he said that a bagel was a donut twice, and that a donut was a bagel 17 times.
152
Using these numbers, we can calculate his overall accuracy by adding together what he got right, which were 8 donuts and 73 bagels,
153
and dividing by the total 100 to get 81%.
154
But to really understand what's wrong, we need to take a look at his precision and his recall.
155
We can calculate these percentages for both foods, but we'll focus on donuts right now.
156
Precision tells us how much you should trust your program when it says it's found something.
157
If John Greenbot tells me something's a donut, I'm expecting to eat a donut.
158
I don't want to bite into a bagel because that would be a gross surprise.
159
Of the 10 items he said were donuts, 8 were actually donuts.
160
So he was 80% precise, and I can be 80% sure he's only handing me donuts when he says he is.
161
Recall tells you how much your program can find of the thing you're looking for.
162
I'm really hungry, so I want as many donuts as possible.
163
But, of the 25 items that were donuts, he correctly labeled 8 of them.
164
So his recall is just 32%.
165
And he just handed me 32% of all the donuts.
166
The precision and recall depend on the criteria John Greenbot is using to make a decision.
167
Diameter and mass.
168
And as you can see from this graph, he thinks that donuts generally have smaller diameters and masses than bagels.
169
They're small, fluffy treats.
170
So when it comes to classifying donuts, he has a high precision, because if he says something's a donut, we're pretty sure it's a donut and not a disgusting bagel.
171
But John Greenbot has a low recall, because this criteria didn't account for the fact
172
that some donuts can be way bigger than the donuts we use to train his perceptron.
173
They have a bigger diameter and mass, and they fall in the current bagel zone.
174
So he missed a lot of donuts when he was classifying.
175
Thanks John Greenbot!
176
Figuring out what criteria to use is the key to most AI challenges.
177
If we wanted better accuracy for this donut bagel problem, maybe we should have used inputs besides mass and diameter, like checking for seeds or sprinkles.
178
Generally, more inputs are better for accuracy, but the AI will need more processing power and time to make decisions.
179
An ideal AI system would be small, powerful, and have perfect precision and perfect recall.
180
But in the real world, mistakes happen, so we have to prioritize based on our goals.
181
The AI filtering our inboxes needs to make sure we get all the important emails, so it needs a high recall.
182
But it's okay if it isn't very precise, because we can deal with some spam getting through and don't need only good emails.
183
Most AIs handle more complicated problems than sorting something into one of two categories, though.
184
The world isn't all just donuts and bagels.
185
So to answer more complicated questions, we need more complicated AI.
186
Next time, we'll combine artificial neurons to create an artificial neural network.
187
See you then.
188
Crash Course is produced in association with PBS Digital Studios.
189
If you want to help keep Crash Course free for everyone forever, you can join our community on Patreon.
190
And if you want to learn more about how the brain and nervous system works, check out our anatomy and physiology videos about them.

حول هذا الدرس

أنت تتدرب على اللغة الإنجليزية باستخدام "Supervised Learning: Crash Course AI #2" مع تقنية الـ Shadowing.

ما هي تقنية التظليل الصوتي؟

التظليل الصوتي (Shadowing) تقنية تعلم لغة مدعومة علمياً، طُورت أصلاً لتدريب المترجمين الفوريين المحترفين. الطريقة بسيطة لكنها قوية: تستمع لصوت إنجليزي أصلي وتكرره فوراً بصوت عالٍ — كظل يتبع المتحدث بتأخير 1-2 ثانية. تُظهر الأبحاث تحسناً كبيراً في دقة النطق والتنغيم والإيقاع وربط الأصوات والاستماع والطلاقة.

تقنية الشادوينغ: اقرأ الدليل الكامل خطوة بخطوة →