# Using Machine Learning Models and Actual Transaction Data for Predicting Real Estate Prices
## 4 Data Collection and the Proposed Real Estate Appraising Framework  
### Data Collection  
The data were collected from actual transaction price data of Taichung, Taiwan (https://lvr. land.moi.gov.tw/) from 2016/04 to 2019/04. Real estates with buildings served as objectives of this study. Due to blank, unclear and outlier data, data cleansing was conducted before using the data. Blank and unclear data were deleted, and the interquartile range technique was performed to deal with outlier data. After data cleansing, in total 32,215 data observations were used in this study. In addition, the real estate attributes were rearranged, and we finally utilized a total of twenty-three independent variables and one dependent variable to forecast real estate transaction prices. For example, the real estate addresses were transformed into geographical coordinates by the Taiwan Geospatial One-Stop system ([[https://www.tgo.tw/tgos/Web/Address/TGOS_Address.aspx](https://www.tgo.tw/tgos/Web/Address/TGOS_Address.aspx)]([https://www.tgo.tw/tgos/Web/Address/TGOS_Address.aspx](https://www.tgo.tw/tgos/Web/Address/TGOS_Address.aspx))) provided by the Ministry of the Interior of Taiwan. Three attributes namely \"non-urban use land zone\", \"urban use land zone\", and \"non-urban land use compilation\" were integrated into an attribute of \"purpose of land use\". Ages of real estate were generated from attributes of transaction dates and completion dates of buildings. Table 1 depicts variables used in this study. Moreover, the Pearson correlation coefficient was used to select independent variables with significant coefficient of correlation. Pearson correlation coefficients of independent variables to the real estate price are listed in Table 2. Independent variables with absolute values of Pearson correlation coefficients larger than 0.1 were left. Totally, eleven independent variables were selected.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Types of Variables** & **Codes of Variables** & **Descriptions Variables** & **Data Types** \\ \hline \multirow{9}{*}{Independent Variables (Pearson Correlation Coefficient)} & X\({}_{1}\) & City or Township & Categorical \\  & X\({}_{2}\) & With or without parking space & Categorical \\  & X\({}_{3}\) & Longitude & Numerical \\  & X\({}_{4}\) & Latitude & Numerical \\  & X\({}_{5}\) & Transaction area of land & Numerical \\  & X\({}_{6}\) & Purpose of land use & Categorical \\  & X\({}_{7}\) & Ages of buildings & Numerical \\  & X\({}_{8}\) & Transaction amount of property & Numerical \\  & X\({}_{9}\) & Transaction floors & Numerical \\  & X\({}_{10}\) & Total floors of buildings & Numerical \\  & X\({}_{11}\) & Types of buildings & Categorical \\ Independent Variables & X\({}_{12}\) & Use of buildings & Categorical \\  & X\({}_{13}\) & Materials of buildings & Categorical \\  & X\({}_{14}\) & Total transaction areas of buildings & Numerical \\  & X\({}_{15}\) & Number of bedrooms & Numerical \\  & X\({}_{16}\) & Number of living rooms & Numerical \\  & X\({}_{17}\) & Number of bathrooms & Numerical \\  & X\({}_{18}\) & With or without compartments & Categorical \\  & X\({}_{19}\) & With or without management committee & Categorical \\  & X\({}_{20}\) & Prices per square meter & Numerical \\  & X\({}_{21}\) & Types of parking space & Categorical \\  & X\({}_{22}\) & Area of parking space & Numerical \\  & X\({}_{23}\) & Prices of parking space & Numerical \\ The Dependent & Y & Transaction prices & Numerical \\ Variable & Y & Transaction prices & Numerical \\ \hline \hline \end{tabular}
\end{table}
Table 1: Depictions of variables.  
\begin{table}
\begin{tabular}{c c c} \hline \hline  & X\({}_{1}\)(0.01158), X\({}_{2}\)(0.4097), X\({}_{3}\)(\(-\)0.043), X\({}_{4}\)(\(-\)0.0184), X\({}_{5}\)(0.3518), \\  & X\({}_{6}\)(\(-\)0.0319), X\({}_{7}\)(\(-\)0.2897), X\({}_{8}\)(0.00