Regression model to predict house prices

In this section, we will build a regression model using the housing dataset from the previous sections. We begin by loading the housing prices dataset and preparing it for modeling. We then train a linear regression model and proceed to evaluate this model in a simple but intuitive manner. We shall conclude by using this model to make predictions.

We load the libraries that we will need to use and also import the dataset. As observed in previous sections, we are aware of the fact that there are a number of neighborhoods in this dataset that contain very few observations. To eliminate this, we would use this model only for neighborhoods with more than 30 observations. To do this, we need to use the ...

Get Become a Python Data Analyst now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.