[MUSIC]
So now we have some training data and some desk data.
And what we can do next is #Build,
there's a sub-header here,
#Build the regression model.
So GraphLab Create has many algorithms pre-implemented for
various machinery and tasks or you can implement your own if you like.
And during the sequence of the specialization,
you're gonna write many algorithms of your own, but for this course,
we're just gonna use pre-implemented algorithms so
can really try to understand how machine learning works.
So what you can do with machine learning?
So, we're gonna do is a build a square foot prediction model.
Just call it sqft_model.
And in GraphLab, there something called linear regression.
So, linear regression is what we learned, what we explored and
talked about, and we understood quite well during the module that Ann was teaching.
And so if you just say linear _regression.create,
it's going to create a linear regression model for you.
That creates the traits with projects GraphLab Create, and
create is also the verb to use to create various things with GraphLab Create.
So we're now going to create a linear regression model, and
what I have to give as input I give it the training data.
So here's the training data.
You have to say what variable you're trying to predict.
So that's the target.
So I'm gonna say the target is going to be price.
So I'm trying to predict price.
And the question is what are the features, what is the input.
So, I'm going to say that the features, and by the way, you can use top complete
even if [INAUDIBLE] parameters of function, which is pretty cool.
So, the features is a list of the features.
If you don't give anything, it will use all features, all columns of the data.
But here, the only feature input we want to use is square feet of living space.
And that is a string that I need to put in, so
I forgot to put it in quotes, so let me fix that real quick here.
So open quotes,
close quotes.
All right, very good.
So let me just reread that for us.
So sqft_model graphlab.linear_regression.create on
the training data to predict the target price using features sqft of living.
Let's go an execute this.
On training data training, I wrote data twice here.
You see the arrow came out here, training data and the score data.
So now let's execute.
So what's happening here?
It's done actually, but what we did was create a linear regression model,
it used a particular algorithm called Newton's Method.
But GraphLab Create chooses an algorithm automatically for
you unless you tell it which one to use.
And this algorithm allows you to make some predictions on the data.
[MUSIC]