This project aims to create a machine-learning model to predict the price of houses in Melbourne.
Like to code:
AI_ML/Melbourne_housing_price_prediction.ipynb at main · Srihari293/AI_ML
Methodology
- Preprocessing - We start by removing unnecessary data. This is followed by feature engineering, where we calculate the “price per square meter” to compare properties. Next, we remove outliers in the bedroom feature by setting limits on mean and standard deviation. We also remove houses that have more bathrooms than bedrooms. Lastly, we one-hot-encode the location. and drop dummies
- Model - We split the dataset into train and test batches. This is followed by analysis using regression models from the sklearn library. We compare the test accuracy scores of linear regression, lasso regression, and decision tree models. We further test linear and lasso regression using the K fold cross-validation to assess how a statistical analysis results will generalize to an independent data set. Yet again, there is only a marginal difference in the accuracy of the models.
- Finally, we tested on real-world data, where we got a 98% accuracy compared to the real listing.