OK, so let us first discuss the solution for the first project that this house price prediction problem.
So here is what we have done is we have imported all the required libraries and we have got the data.
So here we have the data said that this house data set and this data set contains around twenty one
thousand rooms and twenty one columns out of these.
We have selected these different data.
Right.
So we have got the database, which includes object.
So we have got this data.
And next, what we are doing here is checking that we have only this data column, which is a timestamp.
So we will basically ignore this data column.
So what we are doing here is we are checking if there are any columns which are having not a numbers
of value.
And then we see that we get that there are no particular columns, which are no particular rules, which
have a number in the values.
So we see that the data is pretty much structured and it does not have any norten no values.
So we can basically jump in to finding the correlation between the features and data equity.
But so now when we are finding out the correlations, so we have simply got the feature values and the
target values and we are finding out the correlation.
So this is the blind correlation list, which we have created and we are putting in the Peerson correlation
inside this, using this bias in our function and comparing each of those values with the target value.
So we are comparing the all the features with the target value to find out the correlation values.
So next, what we are doing is we are converting all this data, which we have got for the correlation
in toward the Gulf Stream.
And we have created this data correlations, data frame for that and for each location they are checking
and they are getting the values, the absolute values, and we are sorting based on these correlation
values.
So here we can see the maximum correlation value of which we have here is you can see that here it is,
70 percent correlation and it goes down to zero point zero two, which is basically two percent correlation
between the values.
So you can see the minimum correlation that we have is between long and prices and conditions and prices,
while the maximum correlation which we have is of seventy five, seventy percent between square feet
living and the price.
So we can see that the top five features are most correlated features with the target price.
And so what we do is we applaud the best tool aggressor's jointly.
So we applaud this.
So how do we do that?
So we are taking this very column and this X column this week column would consist of square feet living
on the three, which are the top two columns which have the maximum correlation.
And we are again sorting the values so that we can see a proper plot with these values and we are creating
this y value y es shape.
So we are getting the values with respect to that index.
So we are getting the X values and Y values corresponding to these next.
We are generating the different plots for that.
So we are generating four square feet with grade and prices.
So here we have the data.
So this is the square data.
This is the three data and this is the price data.
So here you can see how these plots are very much similar to each other.
And you can see that these square feet and great plots are almost similar, only difference being the
range and the scale a little bit.
Otherwise, everything else seems to be a lot similar.
So next, what we will be doing is we will fit the model first.
So we are generating the base model, using the menials regression.
So when we are generating this base.
We are getting some of the top forelimbs that is you can see here we have square feet living green,
square feet above square feet, living bathroom to your bedroom.
So let's see here.
We have these floors, all of these.
So these are different columns which we are taking off.
So now we are getting the X and Y columns and the performing cross-validation on this, trying to split.
So we are getting the split for this data.
We are simply getting the split of the data, which is the size of zero point two.
That is, 20 percent of data will belong to the best data and the rest will be a part of our training
dataset.
So here we have extreme X test wiping rightest.
So next, what we have done is we have this regression and then we have predicted the values and we
are scoring this regression and the score gives us zero point seven zero.
So here we are getting around 70 percent prediction score, which is not a very good score and not a
very bad score.
This is a decent point, but yes, because we have implemented the linear model, the line is a Christian,
so it can be improved a lot more for thought.
So let's go ahead.
So we are calculating the square area for this, which comes out to be one nine three six one five.
Now, one thing to note here is that the root mean squared error is the squared value squared value
error and house prices are again amounts which are larger value.
That is why the item is he is also a large of what you are asking is to bring it closer to zero.
The value is large because it is a house price.
If it was an interest rate, would have been a very small value.
So there is nothing to be scared about out of this particular value.
It's just the scale.
So next, what we are doing is we are implementing exhibits.
So here I have taken up an estimated one hundred and eighty two point zero eight and I have three in
this particular model.
And after cleaning I get the ingredients code as eighty one point three seven percent, which is almost
close to eighty five percent.
Eighty four percent of what we can do is this is just a simple implementation.
Using examples, suppressing what you will be doing is you can similarly implement a random forest,
extremely distressed, or you could implement the different algorithms got stuck together and these
could be I could achieve a lot more better result.
So that is something which you will have to do and you will have to implement more modules.
You will have to compare different models and then get better results out of the.