Search papers, labs, and topics across Lattice.
This study addresses the lack of documentation in Dakar's residential rental market by developing a comprehensive machine learning pipeline to predict rents, utilizing a dataset of 1,507 listings collected through web scraping. The research compares five models, ultimately finding that an optimized XGBoost model outperforms others with an $R^2$ of 0.847, while revealing significant discrepancies in feature importance rankings between traditional gain metrics and SHAP values. These findings not only offer a benchmark for understanding Dakar's rental market but also suggest methodological advancements for future hedonic studies involving target-encoded categorical variables.
An optimized XGBoost model reveals that location is a surprisingly minor predictor by traditional metrics but crucial when interpreted through SHAP values, challenging conventional wisdom in rent prediction.
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.