Git Product home page Git Product logo

toronto_house_prices's Introduction

Toronto_House_Price

Data

We delve into the task of predicting housing prices in Toronto using different models. The dataset used is sourced from the Canada Mortgage and Housing Corporation (CMHC) and covers the housing market data for the last 4 years. Specifically, we focus on apartments and townhouses in Toronto. The average size of Toronto houses is approximately 1600 square feet, which can allow us to analyze the change in rates per square foot.

The housing market data used in this analysis was obtained from the Canada Mortgage and Housing Corporation. You can access the data tables and research reports from their website: CMHC Housing Market Data. https://www.cmhc-schl.gc.ca/en/professionals/housing-markets-data-and-research/housing-data/data-tables/housing-market-data.

To ensure data reliability and accuracy, we consider only the average values of houses sold in new constructions for each month. In cases where insufficient houses were sold or the sale price was confidential, we replace the average value with null. For predictive modeling purposes, we focus on areas with over 40 price values, ensuring a sufficient sample size for robust analysis.

Stationary and Non-Stationary Data

We begin by conducting the Augmented Dickey-Fuller (ADF) test to determine the stationarity of the data. The housing prices in Toronto are found to be stationary, while the prices in Milton are non-stationary. To handle non-stationary data, we apply data transformations, including the use of the logarithmic function, and employ differencing techniques to make the data stationary. We applied various models including ARIMA, SARIMA, and RandomForestRegressor to predict housing prices in Toronto and Milton.

Result

  1. Unlike many other locations, Toronto does not exhibit a consistent upward trend in real estate pricing across the entire city. Instead, specific areas within Toronto experience notable variations in pricing trends.

image

image

image

  1. The XGBoost model demonstrated robust performance in predicting housing prices in Toronto, irrespective of the stationarity of the data. Utilizing XGBoost eliminates the need for explicit stationarity checks, simplifying the modeling process.

The mean absolute percentage error (stationary data): 0.0910546488062614

The mean absolute percentage error(non-stationary data): 0.21738003036827325

  1. The ARIMA time series model consistently outperformed other models for both stationary and non-stationary data, showcasing its effectiveness in capturing and forecasting housing price patterns in Toronto.

Stationary Data

  1. The SARIMA and ARIMA model has the best performance in the case of stationary data (City of Toronto). The absolute mean percentage error is 0.045 and the root mean square error of 94396.

image

  1. The Random Forest Regressor gives a lower mean square error but the absolute mean error and root mean square are higher.

image

Non-Stationary Data

  1. The ARIMA model provides better results in comparison. The root mean square error is 0.097 and the mean absolute percentage error is 1.27

image

Predictions

image

House price prediction using Random Forest Regressor

image

House Price prediction using XGBoost

toronto_house_prices's People

Contributors

rl16193 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.