Discovering Data
  • Home
  • Blog
  • become_a_data_scientist
  • Code-examples

Using machine learning to predict house prices

1/14/2017

0 Comments

 
The code is on my code blog. To test the script I used some new property listings not included in the training data. I used the script to try to predict house prices based on property type, rates* and number of bedrooms. I got the results below.

*Rates are annual tax raised by local government in Northern Ireland. The amount payable is closely related to property value and function (commercial, residential, religious and so on.)

Test 1
htype = 5; bedrooms = 3; rates = 729.9
predicted price = 104,199 to nearest int (-2.6%)
actual price = 107,000
Test 2
htype = 3; bedrooms = 5; rates = 1946.4 (+27%)
predicted price = 323,717 to nearest int
actual price = 255,000
Test 3
htype = 6; bedrooms = 3; rates = 462.27 (-16.6%)
predicted price = 60,071 to nearest int
actual price = 71,995
Test 4
htype = 3; bedrooms = 3; rates = 932.65
predicted price = 136,448 to nearest int (+5%)
actual price = 129,950
Test 5
htype = 0; bedrooms = 2; rates = 729.9
predicted price = 91,187 to nearest int (+30.3%)
actual price = 70000
Test 6
htype = 4; bedrooms = 3; rates = 811
predicted price = 116,909 to nearest int (+8.7%)
actual price = 127,995

Half the tests are within 10% of the actual price. I believe the results could be improved by increasing the amount of training data especially at the extremes (cheapest and most expensive properties). Increasing the number of features might improve the accuracy. This experiment used linear regression to make the predictions, the relationship between the price and the features may not be linear at the extremes. 
0 Comments



Leave a Reply.

    Archives

    October 2018
    September 2018
    June 2018
    May 2018
    December 2017
    November 2017
    September 2017
    August 2017
    July 2017
    June 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016

    RSS Feed

Proudly powered by Weebly
  • Home
  • Blog
  • become_a_data_scientist
  • Code-examples