Let's go back to this topic of machines and computers and the fact that they don't really understand
words right.
If I ask my computer hey is this a snake.
Is this a python.
My computer is going to well I have no idea what I'm talking about when I look at an image of a snake
no matter what color it is no matter whether it's a cartoon or real life image or whether it has different
directions with different animals in it.
I can identify a snake right away our brains just know but to tell my computer what a snake is is almost
impossible right.
Because there's so many factors.
A snake doesn't have legs and arms but an airplane doesn't have legs and arms a snake has scales.
But then the computer is going to ask me what are scales but with machine learning we can actually teach
a computer to know what a snake is or at least pretended like it knows.
So how do we do this.
Well you remember this diagram I hope it's simply what we do in programming that is we give an input
let's say a list of one two three we give it to a function and there's an output of 2 4 6.
So clearly this function multiplies our list items in our list by 2 and often our programs are procedural
that is we have.
If this then that do this then this type of conditions we tell the computer what to do.
We write as programmers the input and the function and all the computer does is actually just calculate
using the input and the function the output.
And it can do that really really fast for us instead of having a human do something when let's say a
list is millions of items long machine learning changes.
This idea it says hey give me the input and give me what you want the output to be that is give me all
the data that you have.
And by the way tell me what the answer is.
Or at least what the output that you want.
So in this case I want the input to be a list of 1 2 and 3 and the output to be a list of 2 4 and 6
and then the interesting part is that as developers we give this input and output but with machine learning
we say hey machine you figure out what this function is.
Because if I give you let's say instead of a list A list of all these snake pictures or maybe animals
and I want you to tell me if this image has a snake or not.
Or maybe these 100 images which one of them have snakes.
Well I don't know how to tell you how to do that.
So instead you figure it out yourself.
Here are all the pictures.
And here is what I expect the output to be either snake or not snake and with machine learning the function
is generated or created by the machine.
Sounds really cool doesn't it.
And this is machine learning it's simply a function.
So instead of us writing the function like we have before with machine learning the machine writes the
function we just give it the input and the output and the word function can be replaced with a model.
You might have heard of the word machine learning model.
That's all a model is.
It's a function that receives an input and returns an output another word might be algorithm a machine
learning algorithm a machine learning bought and at the end of the day it's a brain we're pretending
that this machine is a brain that understands the inputs and gives us the desired output.
Now the interesting side effect of this is that often when we talk about machine learning models these
functions are really hard to understand because the computer comes up with this function as a human.
It's hard to really understand how it works.
And as these models get more and more complex it becomes harder and harder for us as developers to understand
how it works.
Which raises a lot of issues but we don't need to get into that now as you can see the main part of
this is that in order to train this machine to create this function we have to give it data and for
it to be really really good.
We have to give it lots and lots of data and then we want to test to make sure that this data that we
give in gives us the correct output.
So at the end of the day machine learning is simply a computer writing its own function based on the
inputs and outputs.
That's pretty cool isn't it.
I'll see you in the next video.
Bye.