Django Club

House Price Prediction

Using Linear Regression Model

After submitting the form, wait at least 10 seconds for the model to calculate and show the result.

Model Description:

Regression is a supervised machine learning method for understanding the relationship between independent variables or features and a dependent variable or outcome. One of the algorithms used for regression is the “Linear Regression”.
Here, we use the house-prices.csv dataset for regression purposes and you can download the dataset from the link on top of this page. This dataset has 6 features:
Bedrooms”, “Bathrooms”, “House Area (SqFt)”, “Offers”, “Brick” and “Neighborhood
And the prediction variable is: “House Price”.
In the above form, you enter the values of 6 features and the model returns the house price in a pop-up form. As 2 features of our dataset are Categorical and 4 of them are Numerical, for using Linear Regression for this mixed dataset, we need to convert categorical features to numerical labels and then we could use the Linear Regression method.
Notice that the values and ranges of each feature are as below:

1400 < House Area (SqFt) < 2600
2 < Number of Bedrooms < 5
2 < Number of Bathrooms < 4
1 < Number of Offers < 6
Brick → 0 (No) or 1 (Yes)
Neighborhood → 0 (East) or 1 (North) or 2 (West)
The sample code used to train a “Linear Regression” model, is provided in the link on top of this page. Each time you run this form and predictions happen, the values will store in the database, and with the link “result” on top of this page, you will see the previous results of the model prediction. Your recent run will be added to the end of this list.