Optimizing valuation accuracy in Kenya’s real estate market: Application of supervised machine learning models
Abstract
The real estate sector in Kenya plays a pivotal role in economic development yet traditional valuation methods often struggle to accurately reflect dynamic market conditions. This research explores the transformative potential of advanced data-driven techniques to enhance real estate valuation accuracy focusing on residentials within Nairobi metropolis for the period between 2009 to 2024. The research assesses the effectiveness of supervised machine learning models. The models evaluated included linear regression, lasso regression, ridge regression, gradient boosting, and random forest algorithms. Data was sourced from Highlands Valuers firm covering 521 records of residential properties. The research employed exploratory data analysis and model development. Lasso regression emerged as the best model due to its significant improvements in RMSE and R-squared values after hyperparameter tuning and regularization. This demonstrated superior accuracy and predictive capability. The most significant features were comparable sales, socio-economic status of the area, built-up area, number of floors, total number of rooms, rent, building age, residential development type, number of bedrooms, neighborhood characteristics, environmental considerations, and proximity to amenities. The research underscored the potential of machine learning to revolutionize real estate valuation practices in Kenya. The research outcomes are expected to inform stakeholders, policymakers, and practitioners and foster more informed decision-making, improve sector stability, and support sustainable growth in the Kenyan real estate market.
Full Text
Tables and figures are in the full-text PDF.
Introduction
The real estate faces multiple challenges, which, when compounded, they contribute to a significant gap in accuracy. This impact on the efficiency and reliability of the overall process of assessing the economic value of real estate. The conventional valuation methods often rely on a narrow set of data points, potentially overlooking essential variables that influence property values [1] . The failure to integrate a comprehensive range of factors, including socioeconomic factors, environmental considerations, and neighborhood dynamics, has limited accuracy in the real estate valuation process. Furthermore, the Kenyan real estate market exhibits dynamic and rapidly evolving trends, influenced by factors such as urbanization, economic fluctuations, and regulatory changes [2] . Consequently, traditional valuation methods may struggle to adapt to these shifts, resulting in assessments that do not adequately reflect the current market conditions. This lack of agility potentially raises the probability of outdated and inaccurate property valuations and created the need for more precise and up to date valuation methods. Traditionally, valuation in the real estate sector in Kenya, like many other parts across the world, relied mainly on conventional methods that did not fully capture the nuances and intricacies of the property market, which is highly dynamic. Valuers mainly depended on methods such as the Comparative Market Analysis (CMA), the Income Capitalization Approach (ICA), and the Cost Approach. In the Comparative Market Analysis (CMA), the property is compared to similar properties that have been sold in the same area.
Here, the principle of substitution is highly used, whereby, the value of property is determined by the cost of acquiring a similar property with the same utility. The Income Capitalization Approach (ICA) is used particularly for income-generating properties. In this approach, the value of the property is estimated based on its ability to generate income, typically through rent. The ICA involves calculating the Net Operating Income (NOI) of a property and then capitalizing this income using an appropriate capitalization rate. The Cost Approach estimates the property value based on the cost of building a similar structure at current prices minus depreciation, plus the land value. The approach is useful particularly for new constructions and properties with few comparable. While the traditional valuation methods provided robust commercial properties valuation frameworks and were proven, they are limited in their capacity to adapt to the multifaceted variables that influence property values. The Comparative Market Analysis (CMA), for instance, while practical and easy to understand, its effectiveness is often constrained by the availability and accuracy of comparable sales data. In addition, this approach may not account for unique property features or market conditions that could affect property values differently [4, 5, 6]. In the case of Income Capitalization Approach, the approach is limited by its reliance on accurate income projections and the appropriate selection of capitalization rates. Its reliability can also be impacted by economic conditions and market fluctuations [7,8,9] . The Cost Approach may not accurately reflect market conditions or the subjective value buyers place on properties [4,9,10] . These limitations increase the probability of outdated and inaccurate property valuations, which necessitate the need for more efficient valuation methods. Machine Learning (ML) has emerged as a key tool that can be used for property valuation especially in this era of big data. Over the time, advanced supervised machine learning models have proved effective. They harness data driven techniques to reduce and eliminate bias, increase accuracy and introduce a more transparent and efficient property assessment mechanism. These models improve accuracy and precision by integrating diverse data sources and adapting to dynamic market changes. Moreover, these models automate the valuation process, minimizing bias and subjectivity while ensuring transparency and traceability in valuation outcomes. These tools have garnered significant attention as powerful tools for large-scale data analysis [13] . Over the past decade, economists and data scientists have extensively utilized the tools to estimate property values, leveraging their ability to process vast datasets more precisely than traditional regression models [3,4,5] . These algorithms have the ability to handle the complexity and non-linearity of real estate data which make them well-suited for accurate property valuation. Prominent ML models in property valuation include Support Vector Machines (SVM) [6] , Decision Trees [7] , Random Forest (RF) [8] , Gradient Boosting Models (GBM), and Neural Networks [9] . These models have demonstrated superior accuracy in prediction outcomes compared to traditional methods. Random Forest and Gradient Boosting Models are particularly effective because of their ability to handle large datasets within high dimensionality and complex interactions between variables. They provide robustness against overfitting and can capture intricate patterns in the data. Convolutional Neural Networks (CNNs) have the advantage of extracting features from imagery, thus providing richer information for property valuation [10] . Convolutional Neural Networks are adept at processing visual data which makes them suitable for analyzing satellite images or photographs of properties. This allows for the incorporation of visual effects such as the condition of a building, surrounding landscape, and proximity to amenities. These factors are crucial in property valuation but are often difficult to quantify using traditional valuation methods. In addition, Recurrent Neural Networks (RNNs) have been employed to better capture the spatio-temporal patterns in the housing market, enhancing the accuracy of property price predictions [11] . Recurrent Neural Networks are particularly applicable in time series modelling and understanding changes in property values over time in response to market trends, economic conditions, and other temporal factors. This makes them valuable for forecasting future property prices and trends. These approaches have also been integrated into automated valuation systems to refine the valuation process further [10] . Automated systems utilizing machine learning can perform real-time valuations, provide consistent and objective assessments, and reduce the time and labor required for manual valuations. This integration enhances the scalability and efficiency of property valuation, making it accessible and practical for large-scale applications.
Literature Review 2.1 Real Estate Valuation: The general overview
The interest and significance of real estate valuation has increased along economic evaluation of development plans which makes the real estate sector safe and open and monitoring price changes occurring in the market. Real estate valuation is required in public applications such as exploration, privatizations, land, and land arrangement, urban transformation, taxation, and registration-based transactions, and individual applications, such as banking, insurance, lending, and purchase and sale. Both institutional and private investors aim to diversify their portfolios with real estate. Investments in commercial real estate sectors account for a significant share of this, which amounts to around $32 trillion globally [12] . The heterogeneity of commercial real estate contributes well to diversification, but it is also accompanied by characteristics such as illiquidity, opacity, and unwieldiness that make it difficult to thoroughly understand market dynamics. Consequently, the valuation of commercial properties involves a great deal of effort that justifies an appraisal industry worth billions of dollars. Despite the increasing complexity of pricing processes and more rapidly changing markets, the principal methods used by the valuation industry have largely remained unchanged for decades. However, this is slowly changing with the increasing availability of data and the emergence of artificial intelligence, which is fostering the use of innovative technologies in the real estate sector.
Determinants of Property Valuation
Real estate valuation is influenced by numerous factors. The factors included in valuation depend on the availability, accuracy and granularity of data sources. More precise valuations occur when high quality detailed data is available as the data makes it possible to capture the nuances of the market and the specific characteristics of individual properties. Integration of different data sources including economic indicators, historical sales data and environmental assessments improves the robustness of the valuation process. One of them is the property characteristics. Property characteristics entails the functional and physical characteristics that influence the value. The main attributes here include number of bedrooms, property age, land size, and building type. In this regard, larger properties command higher value while newer properties have higher value as a result of modern amenities and lower maintenance costs. Old properties on the other hand have lower value unless they have been well maintained or have historical significance [13] . Regarding the building type factors such as whether the house if single-family home, multi-family unit or commercial property determine the market value. The other factor that influences property value is the location. Location in this case reflect the neighborhood and accessibility factors. For instance, properties that have close proximity to central business district (CBD) have higher value as compared to properties located far from the CBD. Also, properties in neighborhoods that have access to public services increases desirability and the value. Additionally, properties located places with presence of green spaces and low crime rates are highly valued. Green spaces add aesthetics and recreational value. In low crime places, property value is higher in places with low crime rates. Properties in places with walkability are highly valued because they have easy access to daily necessities on foot [14] . Property value is also determined by market factors. In this case, the property values are determined by macroeconomic factors including Gross Domestic Product (GDP), interest rates, property price indices, and inflation rates. Growth in GDP increases disposable income and demand for property which in turn increases property value. High interest rates increase borrowing costs making mortgages less affordable and reducing demand for property [16] . Property price indices reflect market trends and influence the expectations of the buyers and sellers [40] . Regarding inflation, a rise in inflation leads to deterioration in currency value which in turn leads high property prices. This is because investors seek to hedge against inflation by investing in real estate [16] .
Traditional property valuation methods
The value of real estate cannot be determined using exact mathematical method. However, real estate valuation practices done based on intuition and experience require objective and scientific methods. Traditional valuation methods are used in this case. The valuation results obtained using the traditional methods differ and the results differ from the market values. For these differences to be prevented, there is a need to determine the criteria affecting the real estate value and determined e the method for objective results. The traditional valuation models are characterized by a procedural approach that follows predefined economic rules, known as 'prediction rules,' to obtain appraised commercial real estate values. Currently, the most common procedures in appraisal practices are the income approach, the salescomparison approach and the cost approach [17] . The income approach is more preferred when valuing commercial property valuation. This approach is based on the principle that property value is tied directly to the present value of its future cash flows. Here, two key factors are determined, that is net operating income (NOI) and the capitalization rate. Net operating income is the revenue generated form the property excluding operating expenses.
Capitalization rate reflects the return on investment considering the risks and potentials of the property. The assessment of the capitalization rate is complex and it is influenced multiple assumptions, often needing the use of comparable transactions of similar properties as a point of refence. However, relying on comparable sales is faced by challenges particularly in cases where the transaction data is limited. This approach is based on the rationale that the value of property should match the value a similar property that has been sold. This approach is valid in reflecting the current market conditions [15] . This is because, the valuation is based on recent transactions in the market. This approach is however dependent on the availability of comparable sales data which in most cases is scarce or outdated in highly unique property markets. The creates the need for adjustments that rely heavily on the appraiser's judgment which creates the potential for inaccuracies and bias. The cost approach bases the value of a property based on the cost of constructing a similar property at current prices putting into consideration the value of the land deducting for physical and functional depreciation. This method is based on the principle that an informed that an informed investor would not pay more for an existing property than the cost to build a new one, adjusted for depreciation. This method is particularly useful for new constructions or unique properties with few comparables [18] . However, the approach allows significant room for subjectivity, as adjustments for depreciation and unique property features require considerable judgment.
Limitations of Traditional Valuation Methods
While the traditional valuation methods have served the real estate well and have provided a good foundation for property appraisal have numerous limitations. In the case of income approach, reliance on the capitalization rate is highly sensitive to the appraiser's assumptions about market conditions and risk factors which leads to potential discrepancies in property valuations. Similarly, the sales comparison approach's effectiveness diminishes when comparable sales data is limited or outdated, necessitating adjustments that depend on subjective value judgments. The cost approach, while useful for new constructions, it requires numerous assumptions about construction costs, depreciation, and land value, each of which can introduce subjectivity and potential inaccuracies. The traditional valuation methods, while they have strong economic justifications and align with fundamental economic principles of substitution and investment value, it is challenging to adapt them in modern real estate markets' multifaceted and dynamic nature. For instance, in rea sectors characterized by high scarcity and distinctive property characteristics. This is because property prices are influenced more by supply and demand dynamics as compared to comparable sales and replacement costs. As a result of these limitations, there has been a need for the exploration of more advanced and data-driven valuation methods.
The integration of artificial intelligence in real estate valuation
The use of AI especially the machine has revolutionized real estate valuation. Machine learning algorithms enables handling and analysis of large data volumes offering more powerful and flexible estimation procedures. Machine learning algorithms leverage historical sales data, market trends and multiple other factors to produce highly reliable property valuations. This enables real estate professionals to handle complex datasets which enable more precise pricing models and enhanced forecasting. This does not only streamline the valuation process but also provides a more dynamic and adaptable approach which accommodates for the ever-evolving nature of real estate markets [18] . There are numerous sophisticated machine learning algorithms that are applied in real estate valuation which enable researchers to model highly complex relationships between dependent variables and features (explanatory variables). Researchers can employ machine learning to analyze data in various ways, including texts, photos, remote sensing images, and numerical data, and apply the results to generate predictions [43] . Moreover, researchers can now employ Optuna or other newly established optimization methods, such as BayesOpt, Hyperopt, and Ray, to tune hyperparameter values. The procedure of these new optimization methods can now be quickly completed with the high-speed processing capacity of modern computing devices.
Random Forest Methods
Random Forest model was introduced by Leo Breiman [19] . The model is used both in classification and regression problems. This model builds multiple decision trees and merges them to obtain a more accurate and stable prediction. The model has the ability to handle large datasets with higher dimensionality and to reduce the risk of overfitting through the averaging of multiple trees. As a result, it has demonstrated exceptional performance in different domains, including house price prediction. The suitability of Random Forest model has been established in a number of studies. In a study by Nguyen [34] using Boston and Ames house datasets, random Forest model emerged as the best model among seven machine learning algorithms. This method yielded notably low error rate of 0.0183 which signified accuracy and efficacy in forecasting house prices. Random forest model indicates robustness in dealing with diverse datasets and has high capability of capturing complex interactions among predictors. The superiority of Random Forest model also emerged in a study by Liu [46] in 2020 on house price prediction. In this analysis, different machine learning models were compared and Random Forest consistently outperformed other techniques in terms of accuracy and reliability. The model also demonstrated an advantage in handling multicollinearity and heteroscedasticity, two key challenges in real estate data. Additionally, Koktashev et al. [47] investigated house price prediction in the city of Krasnoyarsk using 1970 property transaction records whereby various housing characteristics including the number of rooms, overall area, and type of repair were assessed. Random Forest model outperformed Ridge regression and linear regression regarding mean absolute error. This highlighted the effectiveness of the model in capturing the complexity and variability of housing data.
Gradient Boosting
Gradient model was introduced by Jerome Friedman in 1999 and presents a consistent, interpretable method of real estate valuation [15] . This model is highly applicable in multiple machine learning tasks such as multistage classification, click prediction, and ranking. While the model is highly significant, in cases of big data, challenges are faced in balancing accuracy and performance. These challenges were addressed by Ke et al. [18] through the introduction of Light, a highly efficient gradient boosting framework that improves speed and reduces memory usage. Gradient model was evaluated in a study by Madhuri et al. [19] using performance measures including Mean Square Error (MSE) and Root Mean Square Error (RMSE) whereby the results highlighted the model's superior accuracy in predicting house prices. The model was also explored by Koktashev et al. [15] in a study on house price prediction in Krasnoyarsk. In this study, the model was compared with Random Forest, Ridge Regression, and Linear Regression. The Gradient Boosting offered the best balance between model complexity and predictive accuracy. Gradient Boosting model was also investigated in a study by Yilmazer [20] whereby, the results demonstrated significant improvement in the predictive power of the model as compared to traditional valuation methods. Further evaluations of Gradient Boosting Models were done by Singh et al. [21] and Akyuz et al. [22] . Singh et al. [21] evaluated Gradient Boosting, Random Forest, and Linear regression in prediction of real estate prices whereby Gradient Boosting model produced the most efficient results. Akyuz et al. [22] compared Gradient Boosting Model and other machine learning techniques with hybrid model developed to classify houses with unknown clusters and predicts prices. Gradient Boosting achieved significant improvements in accuracy and reliability.
Least Absolute Shrinkage and Selection Operator (Lasso) Regression
This regression model improved prediction accuracy and model predictability by imposing a constraint on the regression coefficients. Imposing constraints forces some coefficients to be zero which makes it possible to effectively perform variable selection and regularization simultaneously [23] . This model was evaluated together with other model in house prices prediction by Madhuri et al. [19] . Lasso regression was superior in handling multicollinearity and had the best model interpretability. Akyuz et al. [22] compared Lasso Regression with other machine learning models and established that the model has significant potential in real estate valuation. This was the case especially where selection feature was crucial.
Linear Regression
Linear regression model evaluates linear relationship between independent variables and the dependent variables. This model, despite its simplicity, it is applicable in numerous fields including real estate valuation. This model was used by Zhao [24] to predict real estate prices focusing factors that affect real estate value including physical conditions, location, and market trends. Also, Liu [11] compared linear regression model with other advanced models like Random Forest and Gradient Boosting and identified that linear regression had limitations such as the inability to capture non-linear interactions and relationships between variables.
Ridge Regression
Ridge Regression address the multicollinearity problem by adding a degree of bias to the regression estimates. To achieve this, a penalty equivalent to the sum of the squared coefficients to the regression equation is added. This shrinks the regression coefficients and to reduce variance in the model [25] . This model was applied by Helbich and Griffith [26] in real estate to evaluate spatial dependencies in property value predictions. The model was effective in handling spatially correlated data and it helped to address spatial autocorrelation issues. Also, Ahn and Byun [27] integrated the model to improve price prediction in real estate sector and it was effective in handling multicollinearity issues and improving predictive accuracy in the predictions.
Research methods
The methodology discussed in this paper is designed to predict housing prices for the given features to maximize the prediction accuracy. Several regression models were considered and applied to the housing market data to predict property prices. The research framework used included data collection, data preparation, feature processing, model training, and model evaluation. The blocks are illustrated as below;
Data Collection
Data was sourced from Highlands Valuers Firm in Nairobi. A questionnaire was administered to Senior Valuers to collect data on the general valuation processes. The initial insights obtained here helped to shape the subsequent phases of data collection. Data was them extracted from valuation reports. Data collected spanned the period between January 1, 2009 and April 30, 2024. Data was obtained from 521 records.
Exploratory Data Analysis
The data collected was thoroughly cleaned to ensure data completeness and to get rid of irrelevant columns. After data cleaning, an exploratory data analysis (EDA) was done to determine the inherent characteristics of the datasets and relationships. Univariate analysis was conducted using summary statistics, histograms, and boxplots. Summary statistics provided a numerical summary of each variable, while histograms and boxplots visually represented the distribution. Bivariate analysis was done to determine relationship between variables. For instance, scatter plots and correlation matrices were used to determine the relationship property size and valuation prices. This helped to determine the predictors of housing prices. The strength and direction of the linear relationship between variables was determined using Pearson Correlation Coefficient. For categorical variables, T-tests and Analysis of Variance (ANOVA) tests were used. T-tests were used to compare the means of the dependent variable (market value) between two groups of a categorical variable. ANOVA was used to compare means across different groups of categorical variables. This was used to determine whether there were statistically significant differences in property values across categories. Outliers were detected by use of boxplots. The box plots visually presented the data distribution making it easier to highlight outliers. The outliers were retained to reflect the real-world diversity of the property market. Missing values in the "Rent (In Ksh)" column were imputed using median values based on their respective residential development types. This helped to ensue data completeness while preserving the integrity of the dataset.
Data Pre-processing
Proper categorization of categorical features was done to ensure consistency and meaningful representation. Socioeconomic status, residential development type, number of bedrooms, ensuite status, building type, neighborhood characteristics, zoning designation, environmental considerations, ownership status, restrictions, and riparian area/reserve underwent categorization. In addition, columns such as the home security category, Outdoor features category, Interior features category, and Community amenities category, were defined as categorical factors due to their multiple options. Feature engineering was done to determine the most influential features of the dataset and eliminate less valuable ones. This resulted in a highly efficient and less complex model.
Feature Engineering
Feature engineering was done to determine the most influential features of the dataset and eliminate less valuable ones. This improved efficiency and reduced the complexity of the model. Feature encoding was done to transform categorical variables into numerical format that can be effectively processed by machine learning algorithms. Feature encoding ensured the data is compatible with algorithms that require numeric input data. OneHotEncoder transformer was used to encode categorical features of the data. Configuration was done to drop the category to prevent multi-collinearity and handle unknown categories. Numerical features were standardized using StandardScaler to scale them to a mean of 0 and a standard deviation of 1. This ensured that all features were on a consistent scale, which is essential for many machine-learning algorithms. Feature selection was done to determine the most crucial features before building the model. It gives a better understanding of the data, helped to select relevant features and to improve the performance of the model. This was done using multiple techniques including Random Forest Feature Importance, Permutation Importance, Correlation Analysis, and Recursive Feature Selection (RFE).
Model Training and Evaluation
Linear regression, Lasso regression, ridge regression, random Forest and Gradient Boosting were used and evaluated. Linear Regression. These models are well-suited for tasks involving continuous target variables, such as predicting market value. The models have the ability to handle different aspects of the data and provide robust predictions made them ideal candidates for this study. The performance of the models was assessed using metrics such as RMSE, MSE, and R-squared to determine their effectiveness in predicting real estate values. Linear Regression model used is stated as follows:
Where: Y is an observable random variable, β 0 is the intercept, β 1 , β 2 , . . . , β k are the regression coefficients for each independent variable, x 1 , x 2 , . . . , x k are the independent variables (observable non-random variables), ε is the error term (unobservable random variable).
The error term ε is assumed to be normally distributed with a mean of zero and a constant variance, that is, σ 2.
Lasso Regression
Least Absolute Regression Shrinkage and Selection Operator (Lasso) Regression is a regression model type that includes a regularization term in the loss function. This model helps in
Ridge Regression
Ridge regression model is used to analyze multiple regression data that has multicollinearity. This model includes a regularization term that penalizes the size of the coefficients. This helps to prevent overfitting. Ridge Regression is stated as follows;
where: β 2 is the L2 regularization term, which penalizes the sum of the squared values of the coefficient. λ is the regularization parameter, K j=1
When multi-collinearity occurs, least squares estimates are unbiased, but their variances are large, so they may be far from the true value. By adding a degree of bias to the regression estimates, Ridge Regression reduces the standard errors, aiming to produce more reliable estimates.
Random Forest Random Forest model constructs multiple decision trees during training and outputs the individual trees' mean prediction (for regression) or majority vote (for classification)
. Random forests create a diverse set of trees by using a different subset of the training data and features for each tree, which helps in reducing variance and improving model's generalization. The model is presented as follows;
(x) T where: yˆ is the predicted value, T is the number of trees in the forest, f t (x) is the prediction from the t-th tree.
Gradient Boosting
Gradient Boosting is an ensemble learning technique that builds models sequentially, with each new model attempting to correct the errors made by the previous models. It is potent for predictive modeling tasks. This model is comparable to Random Forest in that it involves combining multiple decision trees. The principles of the gradient boosting framework can theoretically be applied to stack any model, but applying it to decision trees is generally the most effective. Gradient Boosting Model is presented as follows;
• F m (x) is the updated model after m iterations, • F m-1 (x) is the model after (m-1) iterations, • h m (x) is the new model trained to predict the residual errors of F m-1 (x).
Data Splitting
To evaluate the regression models' performance, the dataset was split into training and testing sets using an 80/20 split. This means that 80% of the data was used for training.
Data Analysis Tools
Python was the primary programming language used. This tool is simple to use, it is readable and has extensive library support. Data manipulation was done using Pandas library. This included data cleaning, data transformation, and data aggregation. Preprocessing and model evaluation were done using Numpy. The machine learning models were developed and evaluated using Scikit-Learn tools. Data visualizations, the relationship between variables and model performance metrics were done using Matplotlib and Seaborn. Joblib was used to save and load trained models and for prediction of new data. The Streamlit was used to deploy the machine learning models. This helped to facilitate the seamless integration of the models and offered an interface for users to input new data and obtain predictions in real-time. Python code was written and executed in Jupyter Notebook. This interactive computing environment offers an interactive environment where code, visualizations, and narrative text can be combined which makes it easier to document and share the analysis process.
Results
Dataset Overview
Numerical variables evaluated were built-up area, number of floors, total rooms, comparable sales price, rent, market value, building age, proximity to amenities, and accessibility to transportation. Correlation of each of these variables with the market value were determined using correlation analysis. Categorical variables evaluated included area level, development type, bedroom ensuite status, building type, neighborhood characteristics, zoning designation, environmental factors, ownership status, restrictions, flood zone status, interior features, outdoor features, home security, and community amenities. Means and standard deviation were used to evaluate the average property values within different categorical segments.
Descriptive Statistics
The distribution of built-up area (in sq ft) was positively skewed and most properties have smaller built-up areas, with a few properties extending to much larger sizes. The interquartile range (IQR) is relatively small which indicates that the middle 50% of the data is tightly clustered. The presence of many outliers indicates significant variation in the upper range of built-up areas kurtosis. Log transformation normalized the data, reduced skewness to near zero and kurtosis to close to 3. The correlation between numerical variables is illustrated using a heat map. The visualization helps identify the features that are strongly related to each other and provide insights into potential multicollinearity and feature selection for modeling. Blue shades show positive correlation while red shades show negative correlation between variables.
Feature Importance Techniques
The most relevant predictors for real estate valuation models were identified through feature selection. The most important features per correlation analysis are shown on the heat map. The most important features were compared based on the feature techniques used The results of the most important features are presented as follows
Model Training and Evaluation
Linear regression, Lasso regression, Ridge regression, Random Forest and Gradient Boosting models were trained and tested to determine effectiveness. This was done using the coefficient of determination (R2), the Mean Squared Error (MSE), and the Root Mean Squared Error (RMSE). Liner regression and Ridge regression models demonstrated strong generalization capabilities. The models had low Root Mean Squared Error (RMSE) and high R-squared values on both the training and test sets. This indicates the ability of the models to capture the underlying patterns in the data. The models demonstrated the ability to provide reliable performance with minimal overfitting.
Hyperparameter Tuning and Regularization
The performance outcomes indicated the need for regularization and hyperparameter tuning in order to improve model performance. This helped to optimize the balance between bias and variance improving the ability of the models generalize and thus provide more reliable and accurate predictions.
Deployment of the Lasso Regression Model
Lasso Regression was deployed using Streamlit. Stremlit offers a powerful framework for building and sharing data applications. The interface designed for the Lasso regression model is presented on figure 6. When property features are input in the interface, the market value is predicted (in Ksh).
Implications
Real estate valuation firms should consider adopting advanced machine learning machine models particularly Lasso Regression to automate property valuations. These models help to reduce human errors and to improve in property valuation. Advanced machine learning models handle vast data volumes and provide a more holistic view of property values as compared to traditional methods. In addition, machine learning models offer real-time, objective predictions of property values which is crucial in the Kenyan market which is highly dynamic. The value predicted using machine learning modes reflect the prevailing market conditions making it hard for buyers to be misled. Policy makers at the national level are recommended to develop supportive frameworks to support the adoption machine learning models for real estate valuation. The frameworks should outline model validation guidelines and ensure transparency in the valuation processes. The frameworks should also incorporate economic indicators and demographic trends that are relevant to various regions. This also help to expand the scope of data used in valuation.
There is a need for collaboration between valuation firms, government agencies, and data providers in order to create centralized and comprehensive databases. Data collection and recording practices across various sources need to be standardized to ensure accuracy and consistency. These databases should integrate diverse datasets, such as property transactions, socio-economic indicators, infrastructure developments, and environmental factors in order for the property values to capture diversity in the real estate sector. Also, collaboration data providers, valuation firms and academic institutions can enhance data sharing and improve model performance across the country. This study was cross section creating the need for longitudinal in order to assess the long-term effectiveness of machine learning models in diverse market conditions across the country. Repeated studies will help to refine the models and ensure their continued relevance and accuracy.
In addition, there is a need for stakeholder education programs to emphasize ethical use of technology and integration of human judgment with automated systems to maintain professional standards. This would enable professionals to adapt to new technologies and preserve the integrity.
Conclusion
The study underscores the potential of machine learning in improving real estate valuation in Kenya. Advanced machine learning models provide more accurate, unbiased, and data-driven insights into property values. Among the machine learning models evaluated, Lasso Regression model demonstrated substantial improvements in accuracy and transparency compared to other models and traditional valuation methods. This model offered reliable property valuations. Lasso Regression Model demonstrated notable reduction in Root Mean Squared Error (RMSE) from 0.8070 to 0.2002 and increased R-squared from 0.0047 to 0.9388. Key determining features of property value included market value (in Ksh), comparable sales prices, socio-economic status, built-up area, number of floors, total number of rooms, rent (in Ksh), building age, residential development type, number of bedrooms, neighborhood characteristics, environmental considerations, and proximity to amenities.
Acknowledgement
AcknowledgmentsThis research was supported by Dr. Oscar Ngesa, Prof. Isaac Kipchirchir, and Dr. Phillip Gichuru. The work was also supported by Mr. B.K. Kimani, the Senior Valuer at Highlands Valuers Limited who allowed the research to be conducted at the firm. Further, the author wishes to express gratitude to family and colleagues who offered support and encouragement.
References
- Zhang W, Sun X, Zhang N. Machine learning-based approaches for price prediction in real estate: A review. International Journal of Computer Science and Artificial Intelligence. 2019;9(2):11-17.
- Liu Y. Big data: New tricks for econometrics [Hal R. Varian, 2014]; c2020.
- Hoerl AE, Kennard RW. Ridge regression: Biased estimation for nonorthogonal problems. Technometrics. 1970;12(1):55-67.
- Koktashev V, Makeev V, Shchepin E, Peresunko P, Tynchenko V. Pricing modeling in the housing market with urban infrastructure effect. Journal of Physics: Conference Series. 2019;1353(1):012139.
- Pérez-Rave JI, Correa-Morales JC, González-Echavarría F. A machine learning approach to big data regression analysis of real estate prices for inferential and predictive purposes. Journal of Property Research. 2019;36(1):5996.
- Madhuri CR, Anuradha G, Pujitha MV. House price prediction using regression techniques: A comparative study. In: 2019 International Conference on Smart Structures and Systems (ICSSS). IEEE; c2019. p. 1-5.
- Yilmazer Y, Kocaman S. Improving performance of mass real estate valuation through application of advanced statistical and machine learning techniques. Journal of Property Research. 2023;40(1):76-100.
- Özöğür Akyüz S, Eygi Erdogan B, Yıldız Ö, Karadayı Ataş P. A novel hybrid house price prediction model. Computational Economics. 2023;62(3):1215-1232.
- Tibshirani R. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society: Series B (Methodological). 1996;58(1):267-288.
- Zhao X, Yao Y. Real estate value prediction using linear regression. Journal of Real Estate Research. 2023;45(2):150-165.
- Helbich M, Griffith DA. Spatially varying coefficient models in real estate: Eigenvector spatial filtering and alternative approaches. Computers, Environment and Urban Systems. 2016;57:1-11.
How this paper connects to the literature. Drag to explore, click any node to open that paper.
