# RECORD ecb8bacfa12ff5fad71503a1b459329f9f420bc4 # TITLE: A House Price Modeling Based on Clustering and Kriging: The Medellín Case # YEAR: 2022.0 VENUE: The Review of Regional Studies DOI: 10.52324/001c.66198 # AUTHORS: H. Villada-Medina; J. F. Rendón-García; C. Ramírez-Dolores; G. Alcalá # PAGES: 23 CANDIDATE TABLE PAGES (1-based): [11, 12, 15] # ABSTRACT: In this study, house prices are modeled using a mixed two-stage model for mass appraisal employing valuations of second-hand housing units conducted in Medellín, Colombia. In the first stage, submarkets of houses that share non-spatial attributes are created using clustering; in the second stage, the spatial dependency is incorporated into the house price estimation using kriging. The best results were obtained when the sample was divided into three submarkets using property area and age as the classification criterion and later applying a Matérn kriging model to submarket 1, a spherical kriging model to submarket 2, and a circular kriging model to submarket 3. These results may provide further guidance to enhance mass appraisal practice in other Latin American cities as well as potentially other cities in developing countries. ===== PAGE 1 (score 6, numeric-paren 0, table-words 0, var-words 6) ===== (2022) 52, 321–343 A House Price Modeling Based on Clustering and Kriging: The Medell´ın Case ∗ Hern´an D. Villada-Medinaa, Juan F. Rend´on-Garc´ıaa, C´esar A. Ram´ırez-Doloresb, and Gerardo Alcal´ac aFacultad de Ciencias Econ´omicas y Administrativas, Instituto Tecnol´ogico Metropolitano, Colombia bInstituto de Energ´ıas Renovables, Universidad Nacional Aut´onoma de M´exico, M´exico cCentro de Investigaci´on en Recursos Energ´eticos y Sustentables, Universidad Veracruzana, M´exico Abstract: In this study, house prices are modeled using a mixed two-stage model for mass appraisal employing valuations of second-hand housing units conducted in Medell´ın, Colombia. In the first stage, submarkets of houses that share non-spatial attributes are created using clustering; in the second stage, the spatial dependency is incorporated into the house price estimation using kriging. The best results were obtained when the sample was divided into three submarkets using property area and age as the classification criterion and later applying a Mat´ern kriging model to submarket 1, a spherical kriging model to submarket 2, and a circular kriging model to submarket 3. These results may provide further guidance to enhance mass appraisal practice in other Latin American cities as well as potentially other cities in developing countries. Keywords: clustering; geostatistics; k-means; kriging; mass appraisal; value map. JEL Codes: C21, R12, R32 1. INTRODUCTION House prices are estimated individually or collectively. According to Ling and Archer (2018), traditional approaches for individual appraisal of real estate can be classified into three main categories: the cost approach, the income approach, and the sales comparison approach. The cost approach is used mainly to appraise newly built properties, and the income approach is for commercial and investment real estate. The sales comparison approach consists of comparing the prices of a sample of residential properties sold in the area of the subject ∗We wish to thank two anonymous referees for providing helpful comments. All remaining errors are our own. Villada-Medina and Rend´on-Garc´ıa are Full-time Professors at Instituto Tecnol´ogico Metropolitano, Colombia. Ram´ırez-Dolores is an Assistant Professor at Universidad Nacional Aut´onoma de M´exico, M´exico, and Alcal´a is a Full-time Professor at Universidad Veracruzana, M´exico. Corresponding Author: Gerardo Alcal´a, E-mail: galcala@uv.mx (c) Southern Regional Science Association 2022 ISSN 1553-0892, 0048-49X (online) www.srsa.org/rrs ===== PAGE 11 (score 39, numeric-paren 0, table-words 7, var-words 7) ===== VILLADA-MEDINA et al: MODELING BASED ON CLUSTERING AND KRIGING 331 Table 2: Descriptive statistics of the different clusters. Case Clustering Submarket Submarket Average Average Average Average Average Type of criterion ID price [COP] area [m2] age [years] number number of property of bedrooms bathrooms apartment-house Case A 1 1 1 519,400,000 164.50 21.77 3.19 2.73 74-17 2 2 166,086,677 64.77 12.76 2.54 1.63 175-27 2 submarkets 2 1 3 519,400,000 140.00 26.43 3.12 2.46 92-27 2 4 166,086,677 65.44 8.12 2.48 1.63 157-17 3 1 5 394,000,000 138.13 24.92 3.23 2.46 98-31 2 6 195,000,000 62.40 8.19 2.35 1.59 151-13 4 1 7 391,000,000 136.60 23.41 3.19 2.51 110-29 2 8 185,262,248 58.82 8.47 2.33 1.48 139-15 5 1 9 400,800,000 135.90 23.61 3.20 2.49 108-31 2 10 162,980,576 58.99 8.19 2.31 1.50 141-12 Case B 1 1 11 394,800,000 202.40 21.20 3.29 3.00 27–8 2 12 167,000,000 131.90 21.37 3.09 2.41 63-12 3 submarkets 3 13 656,500,000 60.51 12.09 2.49 1.59 159-24 2 1 14 405,446,667 182.80 19.77 3.24 2.86 43-15 2 15 149,893,490 96.54 30.86 2.90 2.03 59-12 3 16 593,900,000 64.59 7.45 2.49 1.63 147-17 3 1 17 207,000,000 174.96 17.89 3.26 2.82 49-16 2 18 193,146,395 100.16 30.18 3.14 2.08 55-17 3 19 579,400,000 60.69 7.83 2.33 1.56 145-11 4 1 20 214,277,778 162.23 25.30 3.20 2.77 71-16 2 21 177,743,646 53.35 8.39 1.74 1.35 78-5 3 22 493,300,000 77.31 13.50 3.09 1.82 100-23 5 1 23 158,168,081 148.00 26.17 3.25 2.57 73-31 2 24 201,390,715 48.45 9.90 2.03 1.01 66-13 3 25 421,100,000 80.25 9.58 2.76 2.09 110-0 Case C 1 1 26 109,749,367 211.30 21.37 3.30 3.00 19–8 2 27 257,780,079 51.43 10.22 2.29 1.43 115-14 4 submarkets 3 28 679,300,000 88.35 17.23 2.97 1.99 60-13 4 29 118,561,633 144.80 21.94 3.14 2.61 55-9 2 1 30 250,069,288 168.40 15.14 3.16 2.72 45-12 2 31 451,976,562 74.76 24.43 2.82 1.74 42-19 3 32 587,900,000 60.17 6.24 2.41 1.59 130-8 4 33 154,327,869 151.10 36.32 3.19 2.60 32-5 3 1 34 177,529,049 185.00 20.18 3.31 2.95 40-15 2 35 362,000,000 75.26 8.55 3.09 1.83 79-13 3 36 597,400,000 53.83 7.92 1.73 1.38 78-4 4 37 222,174,543 102.19 31.44 3.03 2.09 52-12 4 1 38 163,084,765 185.00 20.34 3.28 3.06 40-13 2 39 221,046,875 47.99 9.71 2.00 1.01 66-11 3 40 607,100,000 78.25 6.94 2.70 2.07 90-2 4 41 110,457,143 103.60 29.49 3.18 2.07 53-18 5 1 42 258,226,182 147.48 26.24 3.10 2.65 83-0 2 43 230,704,225 46.04 8.82 1.57 1.02 50-1 3 44 442,638,554 73.11 8.92 2.78 1.91 116-0 4 45 121,425,490 115.90 20.81 3.33 1.93 0-43 circular and Mat´ern ones (80% and 10%, respectively). In addition, according to Table 3, the best variogram was obtained for clustering criterion 2. For both submarkets, the best fit model was the circular one. Nevertheless, submarket 2 was adjusted to an R-Squared value of 0.5832; and submarket 1, to 0.12. The cutoff distance and lag width of submarket 2 were 7741 m and 968 m, respectively. In Case B (three submarkets), Table 4 indicates that the circular model was the most common option (40%), followed by the Gaussian, exponential, Mat´ern, and spherical mod- els (26.7%, 13.3%, 13.3%, and 6.7%, respectively). Additionally, as shown in Table 3, the variogram best described a submarket was obtained for clustering criterion 2. Submarket 3 was best fitted using the circular model (with an R-Squared value of 0.5811), while sub- markets 1 and 2 were best fitted using the Mat´ern and spherical models (with an R-Squared value of -0.1258 and 0.2201, respectively). This negative value suggests that the null model’s prediction is more accurate than that of kriging. ©Southern Regional Science Association 2022. ===== PAGE 12 (score 26, numeric-paren 0, table-words 5, var-words 7) ===== 332 The Review of Regional Studies 52(3) Table 3: Models Selected via Leave-One-Out Cross-Validation. Case Clustering Submarket Submarket Model Lag Cutoff R-Squared RMSE MAPE Observation Criterion ID Width Distance [%] Points (Np) Case A 1 1 1 Mat´ern 701 5608 0.0037 200821692 33.23 86 2 2 Circular 645 3871 0.4478 80970818 36.94 177 2 submarkets 2 1 3 Circular 561 5608 0.1200 225096888 53.41 109 2 2 4 Circular 968 7741 0.5832 101771961 36.02 154 3 1 5 Circular 623 5608 0.1816 215563505 49.76 119 2 6 Circular 774 3871 0.5121 103455828 37.44 144 4 1 7 Circular 1051 8412 0.1628 210399681 47.76 131 Case A 2 8 Circular 1003 9031 0.4336 95228844 38.16 132 5 1 9 Circular 1051 8412 0.1813 210224706 47.94 130 2 10 Mat´ern 1290 6452 0.4748 93068789 37.46 133 Case B 1 1 11 Gaussian 1202 8412 -0.1893 209728785 28.05 32 2 12 Gaussian 565 4522 0.2326 127167193 29.02 72 3 submarkets 3 13 Mat´ern 1290 9033 0.3944 73197888 34.47 159 2 1 14 Mat´ern 1930 9650 -0.1258 208438795 26.82 54 2 15 Spherical 1594 7972 0.2201 86942896 42.34 65 2 3 16 Circular 1106 7743 0.5811 98650579 32.87 144 3 1 17 Exponential 1206 9650 -0.1006 198375039 26.48 60 2 18 Gaussian 759 6834 0.2918 86607028 34.97 66 3 19 Gaussian 1807 9033 0.5287 95304322 39.36 137 4 1 20 Circular 2103 8412 0.1359 205963996 35.01 82 2 21 Circular 954 7630 0.5008 93897000 40.65 71 3 22 Exponential 748 5984 0.4838 100414468 33.73 110 5 1 23 Circular 623 5608 0.1711 222583902 48.66 97 2 24 Circular 1908 7630 0.4721 65323203 32.32 66 3 25 Circular 486 3400 0.5527 105530392 30.75 100 Case C 1 1 26 Spherical 1103 5515 -0.0403 178616456 22.51 26 2 27 Exponential 430 3871 0.2737 55315971 30.44 110 3 28 Circular 971 6795 0.3968 91120137 32.20 67 4 submarkets 4 29 Circular 1574 7872 0.0995 159473948 29.25 60 2 1 30 Spherical 526 3158 0.0605 188054416 26.46 56 2 31 Exponential 499 3492 0.1456 72819134 41.23 55 3 32 Circular 717 6452 0.5286 92037204 33.71 119 4 33 Circular 1402 5608 0.0166 147003301 32.82 33 3 1 34 Gaussian 981 9814 -0.1942 220260213 29.10 51 2 35 Gaussian 532 4787 0.6244 99754816 30.22 83 3 36 Circular 2225 8902 0.5565 90656313 38.97 71 3 4 37 Spherical 340 3395 0.2171 89545708 34.30 58 4 1 38 Mat´ern 1052 4206 -0.0618 192524506 25.89 50 2 39 Circular 1908 7630 0.4761 65452585 34.23 65 3 40 Circular 876 4381 0.5250 106857235 32.79 84 4 41 Circular 629 5659 0.2603 103575352 34.67 64 Case C 5 1 42 Spherical 342 3417 0.1736 199870272 43.01 78 2 43 Circular 1090 7630 0.5219 73716461 35.25 44 4 submarkets 3 44 Circular 798 4788 0.5221 103316140 32.89 104 4 45 Circular 885 5313 0.1645 250953969 50.10 37 Note: The clustering criteria include five different variables (area, age, bedrooms, bathrooms, and type of property). Clustering criterion 1 considers the first variable (area); clustering criterion 2, the first two variables (area and age); and so on. The best-modeled submarket is shown in bold, and its corresponding clustering criterion rows use grey background. Table 4: Summarized Results of the Models Selected From Table 3. Number of Lag width Cutoff distance Exponential Gaussian Spherical Circular Mat´ern Clusters [m] [m] [%] [%] [%] [%] [%] All cases 45 1018 6418 6.7 15.6 11.1 55.6 11.1 Case A 10 867 6461 0 0 0 80 20 Case B 15 1219 7434 13.3 26.7 6.7 40 13.3 Case C 20 944 5634 5 15 20 55 5 In Case C (four submarkets), Table 4 shows that the circular model was the most common one (55%), followed by the spherical, Gaussian, exponential, and Mat´ern (20%, 15%, 5%, and ©Southern Regional Science Association 2022. ===== PAGE 13 (score 50, numeric-paren 0, table-words 20, var-words 9) ===== VILLADA-MEDINA et al: MODELING BASED ON CLUSTERING AND KRIGING 333 5%, respectively). Also, according to Table 3, the variogram that best described a submarket was obtained by applying clustering criterion 3. The best fit model for submarket 2 was the Gaussian one (with an R-Squared value of 0.6244, a cutoff distance of 4787 m, and a lag width of 532 m); for submarket 1, the Gaussian model (with an R-Squared value of -0.1942); for submarket 3, the circular model (with R-Squared values of 0.5565); and for submarket 4, the spherical model (with R-Squared values of 0.2171). According to Table 3 for the grey highlighted clustering criteria, Case A showed only one of the two submarkets properly modeled (a relatively high R-Squared value). For Case B there was a relatively high R-Squared value, an intermediate value, and a low value for each of the three submarkets. For Case C, clustering criteria 3, yielded two submarkets properly modeled with the highest R-Squared values (0.62 and 0.56, respectively). Submarkets and Clustering Criterion Effect The effect of the number of submarkets is observed by considering the weighted average values for the R-squared and MAPE values for each of the three cases (Table 5). Since the weighted average includes poorly modeled submarkets, high MAPE and low R-squared values are obtained. The best behavior is found for Case B, with mean R-Squared and MAPE values of 0.3446 and 35.05, respectively. The clustering criterion effect is observed by taking the weighted average of the five different clustering criteria (Table 6). When comparing clustering criterion 1 (area) and clustering criterion 2 (area and age), it can be noticed an improvement in the modeling as the R-Squared increases from 0.2720 to 0.3409. It means that the variable of age provides additional and valuable information for the model. On the other hand, clustering criteria 3 and 4, present no substantial improvement com- pared to clustering criterion 2. A similar explanation could be that the number of bedrooms and bathrooms depends on the area variable. Finally, clustering criterion 5 presents the highest R-Squared value, which means that prediction results are improved if the model is provided with information about the type of housing unit (i.e., apartment or house). Table 5: Weighted Average Values for Cases Obtained from Table 3 Case Mean R-Squared Mean MAPE[%] Case A 0.3370 41.51 Case B 0.3446 35.05 Case C 0.3164 33.54 From this point on, we will present a complete analysis (as shown in Figure 3) of Case B (three submarkets) using clustering criterion 2 (area and age), as these two factors produce the best models according to the criteria discussed previously. Figure 4 shows the spatial distribution of the three different submarkets in Medell´ın, Colombia, in Case B. Moreover, Table 7 provides a spatial description of the three submarkets defined ap- plying clustering criterion 2 and includes the following information: submarket, number of data (ND), data density, number of paired comparisons among data, percentage of paired ©Southern Regional Science Association 2022. ===== PAGE 15 (score 24, numeric-paren 0, table-words 9, var-words 4) ===== VILLADA-MEDINA et al: MODELING BASED ON CLUSTERING AND KRIGING 335 Table 7: Spatial Data Statistics of Case B (Three Submarkets) Using Clustering Criterion 2 (Area and Age) Submarket Number of Data Paired Percentage of Paired Distance Within Which Mean SD of Mean SD of Data Density Comparisons Comparisons Within 50 % of Paired Distance Distance Log(Price) Log(Price) (NP) (NP/m2) 1 km Comparisons Can Be Found (m) (m) (COP) (COP) 1 54 0.5376 1431 4.40 8225 4041 2755 20.1481 0.36760714 2 65 0.6471 2080 3.65 8202 4515 2407 19.0574 0.54374478 3 144 1.4335 10296 3.65 11510 4979 2510 18.8644 0.70816505 Figure 5 shows selected semi-variograms of the three models analyzed in this study (i.e., Mat´ern, spherical, and circular) and the modeling parameters (nugget, range, and partial sill) for the three submarkets. Additionally, the validation indexes obtained via LOOCV are presented in Table 8, which is actually a subset of Table 3. Figure 5 indicates that the three submarkets are best modeled using large cutoff distance values and lag widths. Nevertheless, only submarket 3 yields proper results according to the R-Squared index. Figure 5: Selected Semi-variogram Models for the Set with Three Submarkets Using Clustering Criterion 2 (Area and Age). Table 8: Leave-One-Out Cross-Validation of the Model Selected for Case B (Set with Three Submarkets) Using Clustering Criterion 2 (Area and Age). Submarket Cluster ID Model Lag Cutoff R-squared RMSE MAPE Width Distance 1 14 Mat´ern 1930 9650 -0.1258 208438795 26.82 2 15 spherical 1594 7972 0.2201 86942896 42.34 3 16 circular 1106 7743 0.5811 98650579 32.87 The selected variograms were used to obtain the mean values on the residential property map, as shown in Figure 6 shows the interpolated kriging map (which is masked by the transport network) of each cluster in Medell´ın. This is an example of the isoline maps that can be obtained from kriging interpolation; in this case, it shows the results of 3 submarkets applying criterion 2 (area and age). In Table 8, the mean absolute percentage error (MAPE) of submarkets 1, 2, and 3 reached 26.82%, 42.34%, and 32.87%, respectively. ©Southern Regional Science Association 2022. ===== PAGE 16 (score 7, numeric-paren 1, table-words 1, var-words 4) ===== 336 The Review of Regional Studies 52(3) Figure 6: Map of Predicted Property Prices (Set With 3 Clusters) Obtained Applying Criterion 2 (Area and Age) Figure 7 shows the Multidimensional Index of Living Conditions (MILC) according to the Encuesta de Calidad de Vida (Quality of Life Survey) 2 in the year 2018 of the 16 comunas (districts) of Medell´ın. This index serves as a global indicator of living conditions (on a scale from 1 to 100) for each district (Alcald´ıa de Medell´ın, 2019). According to the isoline maps of Figure 7, the southeast area of the city, which is district 14 (El Poblado), concentrates the most expensive housing. In fact, the MILC of district 14 is the highest. The two-stage methodology approach offers interesting insights into the behavior of each submarket in relation to the living standards in the area of the dwellings. According to Figure 6, a dwelling of the submarkets 1 or 2 can cost up to three times more for being located in an area with a high MILC (such as in the southeast of the city), rather than being located in the northern side of the city (districts 1 to 7), where the MILC is under the average of the city (49.3). These differences in prices are much more noticeable for properties of submarket 3 (typically recently built and small apartments, according to Table 2). In this case, a dwelling can cost up to six times more for being located in the district with the highest MILC. The predictions plotted in Figure 8 show the discrepancies in prices (log was applied for the sake of visualization) between Medell´ın Property Price Register and the values predicted for the third cluster, which is the best fit by a line with intercept 5.86 and slope 0.69. The fact that the dashed line (adjusted to the points) is above the solid line in the early phases of the chart indicates that, when property values are estimated, the kriging method overestimates low values and underestimates high ones. 2The Encuesta de Calidad de Vida (Quality of Life Survey) is an instrument whose purpose is to monitor and measure the socioeconomic conditions of the inhabitants of the 16 districts and 5 townships that make up the city of Medell´ın. It is a primary source of information that allows knowing indices on issues of marked importance such as population, housing, households, education, workforce, health, and social security. ©Southern Regional Science Association 2022.