# RECORD b922ab81201881b47779769df9e76de174e13df7 # TITLE: Comparing traditional and machine learning techniques in apartments mass appraisal in Fortaleza, Brazil # YEAR: 2025.0 VENUE: Aestimum DOI: 10.36253/aestim-15344 # AUTHORS: Antônio Augusto Ferreira de Oliveira; Fabián Reyes-Bueno; M. A. Stumpf González; Everton Nunes da Silva # PAGES: 18 CANDIDATE TABLE PAGES (1-based): [7, 16, 17, 18] # ABSTRACT: Mass appraisal has significant applications, such as urban planning, real estate appraisal, and property tax. Due to the challenges of analyzing massive models, they are often developed using semi-automatic assessment methods and machine learning techniques. This article explores different appraisal model methods that utilize statistics and machine learning. It also looks at incorporating spatial information to see if the chosen method can effectively capture the typical spatial dependency of the real estate market. This can help reduce the spatial autocorrelation observed in the residuals. The study compared nine machine learning methods with traditional statistical approaches using a dataset of over 43,000 apartments in Fortaleza, Brazil. The results of the machine learning algorithms were similar. The XGBoost minimized spatial autocorrelation. The easiest interpretations were with MRA, M5P, and MARS techniques. Although, these techniques had the greatest residual spatial autocorrelations. There is a trade-off between the methods, depending on whether the aim is to improve accuracy or provide a clear explanation for property taxation. ===== PAGE 1 (score 5, numeric-paren 0, table-words 0, var-words 5) ===== Aestimum 85: 21-38, 2024 Firenze University Press www.fupress.com/ceset ISSN 1592-6117 (print) | ISSN 1724-2118 (online) | DOI: 10.36253/aestim-15344 A E S T I M U M CENTRO STUDI DI ESTIMO E DI ECONOMIA TERRITORIALE - Ce.S.E.T. Citation: Oliveira, A. A. F., Reyes- Bueno, F., González, M. A. S. & Silva, E. (2024). Comparing traditional and machine learning techniques in apartments mass appraisal in For- taleza, Brazil. Aestimum 85: 21-38. doi: 10.36253/aestim-15344 Received: November 15, 2023 Accepted: July 2, 2024 Published: February 14, 2025 © 2024 Author(s). This is an open access, peer-reviewed article pub- lished by Firenze University Press (https://www.fupress.com) and distrib- uted, except where otherwise noted, under the terms of the CC BY 4.0 License for content and CC0 1.0 Uni- versal for metadata. Data Availability Statement: The datasets used and/or analyzed during the current study are available from the corresponding author on reason- able request. Conflicts of Interest: The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results. ORCID: AAFO: 0000-0003-3890-4219 FRB: 0000-0002-5646-0263 MASG: 0000-0002-1975-0026 EdS: 0000-0001-9724-8384 Comparing traditional and machine learning techniques in apartments mass appraisal in Fortaleza, Brazil Antônio Augusto Ferreira de Oliveira1, Fabián Reyes-Bueno2, Marco Aurelio Stumpf González3,*, Everton da Silva4 1 Municipal treasury auditor of Fortaleza, Brazil 2 Facultad de Ciencias Exactas y Naturales, Universidad Técnica Particular de Loja, Loja, Ecuador 3 Polytechnic School, Universidade do Vale do Rio dos Sinos, São Leopoldo, Brazil 4 Geosciences Department, Universidade Federal de Santa Catarina, Florianópolis, Brazil E-mail: augusto.oliveira@sefin.fortaleza.ce.gov.br; frreyes@utpl.edu.ec; mgonzalez@ unisinos.br; everton.silva@ufsc.br *Corresponding author Abstract. Mass appraisal has significant applications, such as urban planning, real estate appraisal, and property tax. Due to the challenges of analyzing massive mod- els, they are often developed using semi-automatic assessment methods and machine learning techniques. This article explores different appraisal model methods that utilize statistics and machine learning. It also looks at incorporating spatial information to see if the chosen method can effectively capture the typical spatial dependency of the real estate market. This can help reduce the spatial autocorrelation observed in the resid- uals. The study compared nine machine learning methods with traditional statistical approaches using a dataset of over 43,000 apartments in Fortaleza, Brazil. The results of the machine learning algorithms were similar. The XGBoost minimized spatial auto- correlation. The easiest interpretations were with MRA, M5P, and MARS techniques. Although, these techniques had the greatest residual spatial autocorrelations. There is a trade-off between the methods, depending on whether the aim is to improve accuracy or provide a clear explanation for property taxation. Keywords: semi-automatic assessment methods, mass appraisal techniques, machine learning. JEL codes: O18, R33. 1. INTRODUCTION The real estate market is a segment of the economy, and as such, the importance of traded goods is measured through the sales prices reached because of buyer and seller agreements. This market presents macro and microeconomic aspects. Macroeconomic aspects are related to government decisions, the conduct of the economy, international influences, interest rates, ===== PAGE 7 (score 33, numeric-paren 0, table-words 2, var-words 25) ===== 27 Comparing traditional and machine learning techniques in apartments mass appraisal in Fortaleza, Brazil sion Splines (MARS) and M5 pruned (M5P); Deep Learning; Ensemble Decision Trees, like Random Forest (RF); Quantile Random Forest (QRF); Gradient Boosting Machine (GBM) and its optimized implementations such as XGBoost, CATBoost, and LightGBM. All of them are essential alternatives. In general, ML models provide better accuracy in their predictions than hedonic pricing models and their variants, as long as they are trained with a large vol- ume of high-quality data that is representative of the population under study. They are capable of identifying complex non-linear patterns that traditional methods may not capture. They have high scalability for deploy- ment in environments that require quick and accurate responses, such as those in governmental property taxa- tion departments. On the other hand, such models are known as “black boxes” because they are difficult to interpret, making it impossible in some cases to directly extract the marginal contribution of each explanatory variable to the observed price under “ceteris paribus” conditions. Additionally, ML models can overfit the training data, losing the ability to generalize to new data (overfitting). 3.3.3. Decision trees In direct words, a Decision Tree (DT) is a non- parametric supervised learning approach used in sta- tistics and machine learning to develop classification and regression as a predictive model to conclude a set of observations by partitioning the feature space (if-else conditions). Tree models in which the target variable can assume a discrete set of values are called classifica- tion trees. In these structures, leaves are class labels, and branches represent connections of features that lead to those class labels. Decision trees where the tar- get variable can be continuous (usually real numbers) Table 2. Description and descriptive statistics of the predictor variables assessed in the models. Variable Description Min Median Mean Max age Age in years 0 5.74 10.60 66.76 distpv Nearest distance to main urban amenities in m 1 272.47 363.46 2,795.92 distassp Distance to the nearest precarious settlement 1 224.15 282.46 1,379.06 distsh Distance to the nearest shopping center in m 1 1,136.34 1,367.98 6,231.17 distbm Distance to the beach (north of the city) in m 1.79 4,144.86 5,185.59 16,442.75 income The mean income of the head of the family in Brazilian minimum wage 0.63 5.74 7.13 29.96 landarea The total area of the land parcel in m² 143 4,580.52 6,286.20 5,7718 maxind Maximum allowed floor area ratio (FAR) 0.47 2.5 2.32 3 parcelarea The proportional area of a land plot in m² related to the apartment 4.5 43.46 77.80 40,012.5 privarea Private property size in m² 30 76.66 96.58 883.32 test Length in m of the front of the land parcel. 5.5 61 73.60 379.32 totalarea Total area in m² 32.16 126.97 152.56 2,278.95 vertdens Verticalization density measure. Indicates the concentration of unities in the neighborhood 0.01 0.1587 0.24 0.9982 xcen X coordinates in UTM of the normalized geographic position -1.06 0.28 0.17 0.98 ycen Y coordinate in UTM of the normalized geographic position -0.98 0.4 0.25 0.91 bedroom Number of bedrooms 1 3 3 7 floor Apartment’ floor 0 5 7 31 garage Number of garages 0 2 2 15 nfloors Total number of floors in the building 2 14 13 32 elev Presence of one or more elevators - dummy 0 1 0 or 1 1 pool Presence of swimming pool - dummy 0 1 0 or 1 1 lastfloor Property is on top floor position - dummy 0 0 0 or 1 1 standardi Finishing standard - set of dummies (1-rustic, 2-proletarian, 3-economical, 4-simple, 5-medium, 6-superior, 7-fine, 8-luxury).     1-8   yeari Real estate transaction year - set of dummies for 2017-2021     0 or 1   sale Effective sale – dummy     0 or 1   listing List price – dummy: 0 = sale’s price; 1 = asking price     0 or 1   Source: Authors. ===== PAGE 8 (score 4, numeric-paren 0, table-words 0, var-words 4) ===== 28 Antônio Augusto Ferreira de Oliveira et al. are called regression trees. DT has the advantage of being more intuitive and easier to interpret than other machine learning models. Depending on the number of nodes and depth, each decision criterion chosen by the algorithm can be easily visualized graphically, facilitat- ing the understanding of the entire decision-making process. However, they can easily overfit the training data, capturing noise and leading to poor performance on new data. Pruning and ensemble decision trees (e.g., Random Forest and XGBoost) are techniques necessary to mitigate this problem. The more robust algorithms described below were used in this research instead of this approach. 3.3.4. Multiple adaptive regression splines Multiple Adaptive Regression Splines (MARS) is a decision tree that combines recursive partitioning with spline fitting to model the relationship between a set of input (predictive) variables and dependent variables (Friedman, 1991; Friedman and Roosen, 1995). Data is modeled by separate piecewise linear segments (splines) of differing slopes known as essential functions. MARS generates basis functions by searching stepwise, where an adaptive regression algorithm selects the locations of the knot (endpoints of the segment) (Reyes-Bueno et al., 2018). The regions between submarkets are continuous. Some recent studies using MARS include Al-Qawas- mi (2022), Reyes-Bueno et al. (2018), and Wang and Li (2019). For the model used in MARS, the best combina- tion of hyperparameters was obtained using the “Rand- omizedSearchCV” method with ten folds for cross-vali- dation, with a maximum degree of interaction (degree) from 1 to 3, and a maximum number of terms in the pruned model (“nprune”) from 1 to 100. The strategy to evaluate the performance was the lowest RMSE. The best results were obtained with a “nprune” of 21 and a degree of 1. Although MARS can capture non-linear relation- ships more flexibly than M5P, the resulting model still lacks the ability to capture complex interactions com- pared to ensemble techniques due to its reliance on local linear fits. 3.3.5. M5 pruned M5 pruned (M5P) is a model tree algorithm devel- oped to predict continuous variables by applying regres- sion that can exploit the local linearity of the data. For this purpose, model trees generate subsets by choos- ing attributes to minimize the intra-subset variation in the class values down each branch and maximize the expected error reduction (Zurada et al., 2011). There are three significant steps when applying the M5P meth- odology: (1) tree construction, (2) tree pruning, and (3) tree smoothing (Reyes-Bueno et al., 2018). The regions between submarkets are often discrete. For the model used in this research, the best combination of hyperpa- rameters was obtained using the “RandomizedSearch- CV” method with ten folds for cross-validation, with a range of minimum number of instances from 0 to 1000. The strategy to evaluate the performance was the lowest RAE. The best results were 50 as the minimum num- ber of cases per leaf. Inside subM5P generates segments and exploits the local linearity of the data within those segments, which can be a limitation in situations where the relationships between variables are not locally lin- ear, as it does not adequately capture the true nature of the interactions between variables. Within each submar- ket, M5P exploits the local linearity of the data, which can be a limitation in situations where the relationships between variables are not locally linear, as it does not adequately capture the true nature of the interactions among variables. 3.3.6. Random Forests Random forests (RF) or random decision forests are an ensemble learning method for classification, regres- sion, and other tasks that operate by building several decision trees at training time. For classification tasks, the output of the RF is the class selected by most trees. For regression tasks, the mean or average prediction of the individual trees is returned. Random decision for- ests correct for decision trees’ habit of overfitting to their training set. RF outperforms regular decision trees, but their accuracy is lower than gradient-boosted trees. Data characteristics, however, can affect their performance. Random Forests, like other machine learning and deep learning algorithms, are often named “black box” mod- els because they generate reasonable predictions for a wide range of data while requiring little configura- tion. However, the analyst cannot understand the logic behind them. RF is a combination of predictor trees such that each tree depends on the values of a random vector assessed independently and with the same distribution for each of these. It is a substantial modification of bagging that builds a vast collection of uncorrelated trees and aver- ages them. The method combined the idea of applying the general technique of bootstrap aggregating (bag- ging) technique to develop trees and the random subset of attributes to build a collection of decision trees with controlled bias and variance. The selection of a random ===== PAGE 16 (score 80, numeric-paren 53, table-words 5, var-words 6) ===== 36 Antônio Augusto Ferreira de Oliveira et al. APPENDIX A. RESULTS OF MRA, SER, AND MARS MODELS. Table A1. Regression Results for MRA and SER models Variable Coefficients Variable Coefficients MRA (OLS) SER (GMM) MRA (OLS) SER (GMM) intercept 8.8663 * 8.8529 * bedroom 0.0084 (0.0015) 0.0163 * parcelarea -1.24E-05 * -1.26E-05 * garage 0.0317 * 0.0305 * income 0.0120 * 0.0118 * ln_privarea 0.3680 * 0.3670 * vertdens 0.1830 * 0.1919 * ln_totalarea 0.3021 * 0.3061 * distpv -8.40E-06 (0.0137) -1.09E-05 (0.1556) lastfloor 0.0689 * 0.0799 * distassp 4.88E-05 * 3.93E-05 * floor 0.0065 * 0.0065 * distbm -1.34E-05 * -1.49E-05 * age -0.0097 * -0.0098 * elev 0.0372 * 0.0488 * a2018 0.0095 * 0.0026 (0.3697) pool 0.1085 * 0.0938 * a2019 0.0075 (0.0335) 0.0003 (0.9242) nfloors 0.0104 * 0.0103 * a2020 0.0230 * 0.0187 * standard3 0.0989 * 0.1833 * a2021 0.0792 * 0.0719 * standard4 0.3631 * 0.3979 * sale -0.0626 * -0.0759 * standard5 0.5058 * 0.5163 * listing 0.0528 * 0.0407 * standard6 0.6890 * 0.6667 * Lambda (λ) n/a 0.6389 * standard7 0.8583 * 0.8574 * R-squared 0.9386 0.9380 standard8 1.1789 * 1.1219 * Observations 32,688 32,688 Source: Authors. Notes: The dependent variable is the natural logarithm from price. *Shows P-values < 0.01; otherwise, values in parenthe- ses are the P-values. Table A2. Regression Results for MARS model Variable Coefficients Variable Coefficients Variable Coefficients Intercept 7.7533639 h(14.68-income) -0.0090807 h(1-floor) -0.0329661 districtPAPICU -0.1488743 h(income-14.68) 0.0087215 h(floor-1) 0.0058125 pool 0.1010973 h(0.0908-vertdens) -1.8229510 h(27.56-age) 0.0175039 of 0.1154500 h(vertdens-0.0908) 0.1308400 h(age-27.56) -0.0016117 h(2020-year) -0.0081761 h(distbm-125.04) 0.0032095 h(4.8820-ln_privarea) -0.4324477 h(year-2020) 0.0691490 h(1708.96-distbm) 0.0033438 h(ln_privarea-4.8820) 0.6268375 h(0.38-ycen) -0.1600824 h(distbm-1708.96) -0.0032261 h(4.40769-ln_areaed) -0.2502487 h(ycen-0.38) -0.4244964 h(18-pvtp) -0.0235340 h(ln_areaed-4.40769) 0.2851514 h(53.31-cotat) -0.0051410 h(2-garage) -0.0236326 h(cotat-53.31) -0.0000217 h(garage-2) 0.0693027 Source: Authors. ===== PAGE 17 (score 26, numeric-paren 11, table-words 1, var-words 1) ===== 37 Comparing traditional and machine learning techniques in apartments mass appraisal in Fortaleza, Brazil APPENDIX B. PRELIMINARY RESULTS OF DEVELOPED MODELS IN THE TEST SET Table B. Regression Results for MRA and SER models (p-values between parentheses) # Model Median Ratio COD (%) PRD PRD Status PRB PRB Status RMSE RMSLE MAE MAPE (%) R² Global Moran’s I* (P) 1 MRA 1.00 13.89 1.038 Regressivity -0.019 Regressivity between +/- 5% 197,400.28 0.18 77,416.86 13,90 0.88 0.37474 (0.001) 2 SER 1.00 11.01 1.025 Normal -0.011 Regressivity between +/- 5% 137,965.35 0.15 60,292.53 11.02 0.94 0.38433 (0.001) 3 MARS 1.00 14.19 1.045 Regressivity -0.022 Regressivity between +/- 5% 177,807.97 0.19 75,590.82 14.20 0.90 0.32921 (0.001) 4 M5P 0.99 13.78 1.026 Normal -0.007 Regressivity between +/- 5% 164,919.99 0.20 71,138.19 13.67 0.92 0.28474 (0.001) 5 RF 1.01 8.98 1.019 Normal -0.011 Regressivity between +/- 5% 121,314.74 0.13 48,558.11 9.05 0.96 -0.0097 (0.010) 6 QRF 1.00 9.18 1.018 Normal -0.009 Regressivity between +/- 5% 129,928.75 0.14 49,908.67 9.18 0.95 -0.01903 (0.001) 7 GBM 1.00 9.24 1.018 Normal -0.011 Regressivity between +/- 5% 113,640.60 0.13 50,229.93 9.25 0.96 -0.01252 (0.001) 8 LightGBM 1.01 10.52 1.022 Normal -0.016 Regressivity between +/- 5% 114,551.80 0.14 54,026.65 10.60 0.96 0.00919 (0.006) 9 CatBoost 1.01 9.15 1.020 Normal -0.013 Regressivity between +/- 5% 127,548.82 0.13 48,832.36 9.21 0.95 -0.02712 (0.001) 10 XGBoost 1.00 8.98 1.020 Normal -0.013 Regressivity between +/- 5% 116,633.77 0.13 48,542.72 8.96 0.96 -0.001 (0.404) 11 Deep Learning 1.01 12.09 1.051 Regressivity -0.045 Regressivity between +/- 5% 138,462.94 0.17 61,889.17 12.25 0.94 0.15635 (0.001) Source: Authors. Notes: *Global Moran’s I was performed over the training sample; values in parentheses show P-values. ===== PAGE 18 (score 64, numeric-paren 55, table-words 2, var-words 0) ===== 38 Antônio Augusto Ferreira de Oliveira et al. APPENDIX C – WILCOXON TEST Table C. Wilcoxon signed-rank test on residuals (p-values in parentheses).   MRA SER MARS M5P RF QRF GBM LightGBM CatBoost XGBoost Deep Learning MRA 28654871 (0.002) 29287516.5 (0.222) 10764694 (0.000) 28273101 (0.000) 29387804 (0.359) 29621056 (0.836) 28776431.5 (0.005) 28924854 (0.020) 28080357 (0.000) 29606772.5 (0.802) SER 29152309 (0.102) 8112396 (0.000) 26330696 (0.000) 28932765 (0.021) 29264854 (0.197) 26362893 (0.000) 26818224 (0.000) 28868465 (0.012) 28811277 (0.008) MARS 12006409.5 (0.000) 29140611 (0.095) 29377956 (0.344) 29292579.5 (0.228) 29551878.5 (0.677) 29140611 (0.095) 28617181.5 (0.000) 29509893 (0.586) M5P 4378069 (0.000) 6370087.5 (0.000) 6920394 (0.000) 5432615 (0.000) 4378069 (0.000) 5506569.5 (0.000) 8206475 (0.000) RF 24311550 (0.000) 28713742 (0.003) 28938424 (0.022) 28360664 (0.0000) 19623564.5 (0.000) 27151928 (0.0000) QRF 29681109.5 (0.981) 2779046 (0.000) 27826249 (0.000) 27070630.5 (0.000) 29682344 (0.984) GBM 29051187.5 (0.052) 29067581 (0.056) 28791992 (0.006) 29447044.5 (0.4619) LightGBM 29497222 (0.559) 24482096.5 (0.000) 26983269.5 (0.000) CatBoost 1644228 (0.000) 5852011 (0.000) XGBoost 28031575 (0.000) Deep Learning Note: Bolded values represent significance with p-value < 0.01.