Predicting Residential Rents in Dakar Using Machine Learning

2026-08-31Artificial Intelligence

Artificial Intelligence
AI summary

The authors studied the rental housing market in Dakar, where more than half of households rent homes. They collected 1,507 rental listings online and created new features like a luxury score to help predict rents using machine learning. They tested several models and found that a specially tuned XGBoost model predicted rents well. They also explored which features mattered most and found that looking at feature importance in different ways gave different results, especially for the location factor. Their work offers a clear method for analyzing Dakar's rental prices and suggests ways to improve future studies.

residential rentsmachine learningXGBoostfeature importancetarget encodingKFold cross-validationBayesian optimizationSHAP valueshedonic pricingrental market
Authors
Amadou Tidiane Kassa Diallo
Abstract
Dakar's residential rental market remains poorly documented despite its economic and social importance: 54.4% of households are renters, compared to 23.3% nationally. This study develops a complete machine learning pipeline to predict residential rents in Dakar, from data collection to model interpretation. An original dataset of 1,507 rental listings was built through systematic web scraping and a documented cleaning pipeline, then enriched with four purpose-built features, including a luxury score and a keyword-based quality score. Five models were compared: linear regression, Random Forest (baseline), XGBoost, and LightGBM optimized through Bayesian optimization with Optuna, using leakage-free KFold target encoding for location. The optimized XGBoost model achieved the best performance with an $R^2$ of 0.847, an MAE of 210,902 XOF, and an RMSE of 324,195 XOF. Feature importance was assessed using native XGBoost gain and SHAP values, revealing a substantial difference in the ranking of location, which appears as a minor predictor by gain but as the second most influential variable by SHAP. This result carries methodological implications for hedonic studies using target-encoded categorical variables. This study provides an interpretable benchmark for Dakar's rental market and highlights several avenues for improvement, including the integration of geospatial features and conformal prediction.