In the last tutorial, we completed the Data Pre-Processing step. We saw pre-processing techniques applied in transformation and variable selection, dimensionality reduction, and sampling for machine learning throughout this previous tutorial. 

Business Problem Definition

Let’s create a predictive model that can predict the price of homes based on some variables (characteristics) on several homes in a Boston neighborhood. Based on a series of attributes, we will indicate a numeric value through regression. 

# MSE - Mean Squared Error

# Import modules

from pandas import read_csv

from sklearn.model_selection import train_test_split

from sklearn.metrics import mean_squared_error

from sklearn.linear_model import LinearRegression