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. |