# Identifying Real Estate Opportunities Using Machine Learning
## 6 Conclusions  
The real estate market constitutes a good setting for investing, due to the many aspects governing the prices of real estate assets and the variances that can be found when looking at local markets and small-scale niches. In this paper, we have explored the application of diverse machine learning techniques with the objective of identifying real estate opportunities for investment. In particular, we have focused first on the problem of predicting the price of a real estate asset whose features are known, and have modeled it as a regression problem. We have performed a thorough cleansing and exploration of the input data, after which we have decided to build machine learning models using four different techniques: ensembles of regression trees, \(k\)-nearest neighbors, support vector machines for regression and multi-layer perceptrons. Cross-validation of five folds have been used in order to avoid biases resulting from the split in train and test subsets. Because we understand that the parameterization of the different techniques can drive significant variations in the performance, we have identified some of the potentially most influencing parameters and tested different setups for those. We have also reported results on the use of the algorithms after data normalization. After training and evaluating the models, we have thoroughly studied the results, revealing findings on how different setups impact the performance. Results prove that outperforming models are always those consisting of ensembles of regression trees. In quantitative terms, we have \begin{table}
\begin{tabular}{l l l l l} \hline
**ML Algorithm** & **Parameter** & **Value** & **Train Time (s)** & **Predict Time (s)** \\ \hline Support vector regression & – & – & 0.500 (0.022) & 0.093 (0.0015) \\ \hline \multirow{4}{*}{Ensembles of regression trees} & 10 & 0.999 (1.068) & 0.0011 (0.00006) \\  & n\_estimators & 20 & 2.037 (2.185) & 0.0021 (0.00011) \\  & & 50 & 5.192 (5.587) & 0.0049 (0.00024) \\ \cline{2-5}  & \multirow{2}{*}{bootstrap} & true & 1.752 (2.250) & 0.0026 (0.0015) \\  & & false & 3.734 (4.905) & 0.0028 (0.0017) \\ \cline{2-5}  & \multirow{2}{*}{criterion} & mea & 5.337 (4.195) & 0.0027 (0.0016) \\  & & mse & 0.149 (0.103) & 0.0027 (0.0016) \\ \hline \multirow{4}{*}{\(k\)-nearest neighbors} & & 5 & 0.0016 (0.0014) & 0.013 (0.0038) \\  & n\_neighbors & 10 & 0.0017 (0.0015) & 0.014 (0.0036) \\  & & 20 & 0.0017 (0.0016) & 0.015 (0.0031) \\  & & 50 & 0.0016 (0.0015) & 0.018 (0.0016) \\ \cline{2-5}  & \multirow{2}{*}{weights} & distance & 0.0017 (0.0015) & 0.015 (0.0035) \\  & & uniform & 0.0016 (0.0014) & 0.015 (0.0037) \\ \cline{2-5}  & \multirow{2}{*}{metric} & cosine & 0.00027 (0.000012) & 0.018 (0.0013) \\  & & minkowski & 0.0030 (0.00038) & 0.012 (0.0031) \\ \hline \multirow{2}{*}{Multi-layer perceptron} & \multirow{2}{*}{hidden\_layer\_sizes} & (128, 64, 32) & 1.727 (1.104) & 0.00076 (0.00013) \\  & & (256, 128) & 3.045 (1.487) & 0.0011 (0.000061) \\  & & (1024) & 8.376 (0.094) & 0.0021 (0.000061) \\ \hline \end{tabular}
\end{table} 
Table 5: Average (and standard deviation) of training and prediction times for different machine learning configurations. found that the smallest mean absolute error is 338,715 euros, and the best median absolute error is 94,850 euros. These errors can be considered high within the scope of financial investment, but are relatively small under the fact that data comprise only assets with values over one million euros. In fact, when the mean and median absolute errors are compared with the mean and median of the distribution of prices, relative errors of 16.80% and 5.71% are obtained, respectively. These errors are significantly smaller than the ones provided by a classical linear regression model, therefore highlighting the advantage of more complex machine learning algorithms. In this sense, it is worth mentioning that the fact of the mean being much larger than the median can be explained due to the presence of outliers.