Hello, everyone, and last lecture.
We created a simple linear regression model in Python.
We use a site, Model API and a Skillern to create that model.
Now let's start building them or deepen the integration model.
And by then.
First, we will build our model using Start Smardon, and then we will again be using Eskinder.
I have already imported my estate's model and Escalon liabilities.
So if you are planning this.
Don't forget to import the required libraries.
Now, similar to last thing, we need to first create X and Y variables for over more than.
So let's first clear dollar, swift even.
Last time, we only use rule number as our x ray, but this time we need all the variables except the
price variable.
Since Bizer table is our dependent variable, we need all the variables except price variable from a
lot B if as our X would even write X.
Underscore my date.
This is our variable name for dependent variables.
We will write B if not go.
And then record will right price.
And after a coma, we'll write Exis Equal the one.
Let me explain you discovery first.
We are creating a variable X underscore morality.
Then we want all the variables of our beef data frame in this variable except the price variable.
So we are using graph.
Come on, we'll grab the guys column name.
And since we are dropping a call them, we need to mention access equally to one.
If we were dropping any rules, so, for example, if I wanted to drop my first school.
I would use Grop and then in record I will write one.
And in excess I would mention zero.
X is zero is for dropping rose and X is equal to one is for dropping columns.
So and this is statement.
We are just dropping price and saving out all the variables and Door X multivariable.
If we take a head of this X, my D.
DUFFING.
This is a sample of what it's my duty to frame.
And you can see price sweaty when they scrub and desert.
We only have our independent variable in this is a.
Now, let's clear Tuller dependent variable name.
Why are indiscriminately.
And since our prize is over, the Bindoon video, but will right be off?
And in this good record with mentioned price.
We can also take a sample of this.
You can see now we have created a what dependent and independent variables.
If you remember and Isaak's Smardon, we have to act concerned, deliver data by default, what be done.
Which is consent is zero.
And they said smart.
Let's add a constant to the word dependent variable x underscore Moradi.
We'll create another debate.
But X underscore my date under this good Korn's.
All right, write Essene dot edcon spent.
And then record will mention our x ray was, which is x mightly.
If we take a sample of this, X might be Korn's.
You can see, Ali, at our first columbus' crime rate.
Now, our first column is this concept and this is taking Relu one.
So this is a kind of proxy for what would be dunnart.
Now to for Total Waman.
Will create an alarm object, will write alarm, and that's called Moradi.
Again, this is our variable name.
You can say a word, object name, and we want to fit ordinary Lisa Square.
So we'll write Esson Dot or as or unless a sense for ordinary Lisa Square, it is a method to make a
patient model.
We'll mention why underscore might be.
And our X is X underscore may be underscored Conn's.
There's the one in which we edit consent.
Then we like big.
Good on this.
We have today a lot more that in this Elmendorf's got a mighty good view, this Smardon, right?
I mean, let's go to my day then.
Right.
Got somebody.
This is the result of a lot more than.
You can see the artist square value or model is zero points.
I went to one.
And it just said artists good value is zero points, I wouldn't want to.
Which is pretty good.
Then about probability of F statistics is very low.
It's in the range of eight to the bottom minus 125.
So we can say with confidence that our independent variables have some impact on our dependent variable.
The total number of observation network data are 506 and degrees of freedom is 490, since the formula
for calculating the degrees of freedom is an.
Minus B, minus one zero.
And this five zero six would be.
That is number of variables is 15 since we have been independent variables.
And then minus one, that is five hundred and six, minus 16, which will give us four 90.
So what degree of freedom is for 90?
Now, let's look at individual independent variables.
You can see all of what independent variables are listed on the left.
The next column is, of course, fishing.
These are the values of be done or be done with two, three and so on.
Bita fifteen.
Next is the standard edit.
After that, we have a D.
Statistics associated with this variables.
Then we have a P-value of these variables.
So remember.
The lower the up you add, Lou, the more significant the variable is in determining way.
So if you see the lowest.
Will lose out in the case of inequality.
Room them.
The jet, which is 30 turps ratio.
Or, Rob, it is the proportion of our population.
And evidence distance.
You can say that these are the most significant variables.
What a what more than.
These are the variables which have the highest impact on the worldwide variable.
So how to interpret this data?
First, you should look at the sign of this patient and.
If the sign is positive, that means if you're increasing your independent variable, your dependent
variable will increase with it.
So, for example.
I'm on the looking at the significant variable, for example, this room, non variable, the coefficient,
dispositive, positive.
And the value of coefficient is for.
So in a way, I'm seeing that if I am increasing are growing numb by one, my price is going to increase
by 40 units.
So in a way, you can say that if all other variables are consent for two houses, if one of the house
has more room numbers than the other house, then the price is going to be 40.
Onex more.
Now, let's look at the air quality here.
My sign is negative.
So in a way, I'm saying that if we are increasing the value of air quality, the price is going to
decrease.
Now, the p value for airport variable is also very less.
That is zero point zero one three.
And here the coefficient is one point one.
So in a way, we're seeing that if the airport is present in any city, the prize is going to be increased
by one unit.
We are also somewhat confident that this variable have a significant effect on our dependent variable.
So important takeaways from this research is identify the variables which have P value less than zero
point zero five.
And try to observe their coefficient and their signs to make business sense out of your data.
This is the desert.
From where you will Assad be driving your business intelligence?
So in this case, you can say that you had house price is dependent on this five or six variables,
which is room air quality and so on, and you can also tell that all this variables are impacting your
price.
Now, we will also create this similar model using a Escalon library.
Our X and Y variables are ready with us.
So it will just create another object.
L m three l m three.
Is the word object equal to linear regression?
Alem three is our variable and linear regression is a function of Escalon Library.
We have already imported Escalon.
Now, to fit this model we let them through don't fit.
Now our X was X underscore my D..
We don't need another variable with the consent sign in case of Escalon.
So we'll just write a Eskander score.
Might be another way variable this way, underscore maybe.
We have for today, at least there, more done with a.
Now, to get the coefficient, we will just, I think, Alem three.
Don't intercept the school.
Coma three.
Well, if endoscope intercept underscored attributes represent we dunnart and quiff underscore a tribute
group resing we dulan with our group with the three other.
You can see first we have the value of intercept.
And then we have the value of be done with that, too.
You can also compare this result with the.
Result we got from Start Smardon.
You can see.
It's not possible to get at somebody of a Linnean more than in a Skillern.
But Escalon is much more useful and on other aspects by fitting the model and while predicting the values
and running other advanced linear regression models.
That's why we are also teaching you how to run this Eskinder.
That is how we run a building integration, Martin and Biton.