# Identifying Real Estate Opportunities Using Machine Learning
## 4 Machine Learning Proposal  
In the previous section, we have seen how different variables correlate with the asset price, with the constructed area being the attribute with a larger influence on the price. We have also graphically seen how a linear regression model considering only the constructed area is insufficient for successfully predicting the price. Moreover, in the previous section, we have also shown how several inputs are economically and statistically meaningful explaining house prices with a mutivariate OLS model. In this work, we will use machine learning to build and train more complex models for carrying out price prediction. As we explain before, this problem will be tackled as a multi-variate regression problem, with the price being the output, where features can be binary (such as whether there is a swimming pool or a lift), categorical (such as the asset location) or continuous (such as the constructed area). To be able to use many machine learning techniques, we will convert all categorical features \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multicolumn{6}{c}{**Price**} \\ \cline{2-6}
**Dependent Var.** & \multicolumn{3}{c}{**Non-Robust**} & \multicolumn{3}{c}{**HC0**} \\ \cline{2-6}
**Method: OLS** & **Coef.** & **Error** & \(p\)**-Value** & **Error** & \(p\)**-Value** \\ \hline Floor number & 0.045 & 0.023 & * & 0.038 & – \\ Constructed area & 0.004 & 0.002 & ** & 0.001 & *** \\ Usable area & 0.001 & 0.002 & – & 0.002 & – \\ Is penthouse & 0.090 & 0.090 & – & 0.090 & – \\ Is duplex & \(-\)0.258 & 0.284 & ** & 0.107 & ** \\ Room number & \(-\)0.057 & 0.037 & – & 0.037 & – \\ Bath number & 0.156 & 0.053 & ** & 0.053 & *** \\ Has lift & \(-\)0.055 & 0.470 & – & 0.756 & – \\ Has box room & 0.011 & 0.163 & – & 0.061 & – \\ Has swimming pool & 0.050 & 0.243 & – & 0.095 & – \\ Has garden & 0.143 & 0.251 & – & 0.079 & * \\ Has parking & 0.260 & 0.244 & – & 0.086 & *** \\ Is apartment & \(-\)0.143 & 0.235 & – & 0.302 & – \\ Is villa & \(-\)0.065 & 0.278 & – & 0.264 & – \\ \hline Location (dummy) & Yes & – & – & – & – \\ Postal code (dummy) & Yes & – & – & – & – \\ Street (dummy) & Yes & – & – & – & – \\ \hline Observations & 2266 & – & – & – & – \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Ordinary least squares estimations—in Column 1 “non-robust” estimation. Column 2 represents a “robust” estimation (HC0) following White [16], price in millions. Stars indicate \(p\)-Value. Legend: * = \(p<0.1\), ** = \(p<0.5\), *** = \(p<0.01\). Figure 8: Polynomial regression between the constructed area and the asset price. using one-hot encoding. This means that any categorical feature with \(N\) values will be transformed into a total of \(N\) binary features. In addition, we know that the values for some of the features remain unknown in some instances. This happens with the street name, the street number, the construction year, the parking price and the community costs. Since the first feature is categorical, the problem of null values is resolved after performing one-hot encoding (since all binary features can take the value \"false\"). As for the other variables, we have decided to remove them from the data. This is especially important for the street number, since it is not a relevant feature but could lead to overfitting (in some cases, the street name and number identify an asset). Bearing in mind with these constraints, some algorithms are not particularly useful to solve this problem. For example, naive Bayes or Bayesian networks do not often perform well when applied to regression problems [18]. In the case of regression trees, we have considered to not include individual models, since ensembles often perform better. Because of these reasons, in the end, we have considered the use of four different machine learning techniques, which belong to different categories: kernel models, geometric models, ensembles of rule-based models (regression trees) and neural networks (universal function approximators).