Contents
What is Boston House prediction?
The problem that we are going to solve here is that given a set of features that describe a house in Boston, our machine learning model must predict the house price. To train our machine learning model with boston housing data, we will be using scikit-learn’s boston dataset.
What is Ptratio?
For each data point (neighborhood): ‘RM’ is the average number of rooms among homes in the neighborhood. ‘LSTAT’ is the percentage of homeowners in the neighborhood considered “lower class” (working poor). ‘PTRATIO’ is the ratio of students to teachers in primary and secondary schools in the neighborhood.
What is Boston house price dataset?
The dataset for this project originates from the UCI Machine Learning Repository. The Boston housing data was collected in 1978 and each of the 506 entries represent aggregated data about 14 features for homes from various suburbs in Boston, Massachusetts. 16 data points have an ‘MEDV’ value of 50.0.
Where can I find the Boston Housing dataset?
This data was originally a part of UCI Machine Learning Repository and has been removed now. We can also access this data from the scikit-learn library. There are 506 samples and 13 feature variables in this dataset. The objective is to predict the value of prices of the house using the given features.
How to find the price of a house in Boston?
The attributes are defined as follows (taken from the UCI Machine Learning Repository1): CRIM: per capita crime rate by town ZN: proportion of residential land zoned for lots over 25,000 sq.ft. 20.2. Load the Dataset 124 PTRATIO: pupil-teacher ratio by town 12. B: 1000 (Bk−0.63)2 where Bk is the proportion of blacks by town 13.
How to train linear regression on Boston Housing dataset?
To split the data we use train_test_split function provided by scikit-learn library. We finally print the sizes of our training and test set to verify if the splitting has occurred properly. We use scikit-learn’s LinearRegression to train our model on both the training and test sets. We will evaluate our model using RMSE and R2-score.
What is the Rm value of Boston home prices?
1 data point has an ‘RM’ value of 8.78. This data point can be considered an outlier and has been removed. The features ‘RM’, ‘LSTAT’, ‘PTRATIO’, and ‘MEDV’ are essential. The remaining non-relevant features have been excluded.