用机器学习精准预测达喀尔房租,数据+模型全链条可复现。
Predicting Residential Rents in Dakar Using Machine Learning

- 构建1507条房源数据集,加入豪华度与质量评分等新特征
- 优化后的XGBoost模型$R^2$达0.847,误差仅21万西非法郎
- 揭示位置在模型中作用被低估,适合城市研究与政策制定者
尽管达喀尔的住房租赁市场具有重要的经济和社会意义(54.4%的家庭为租户,高于全国23.3%),但其仍缺乏系统记录。本研究构建了从数据采集到模型解释的完整机器学习流程:通过系统性网络爬取建立包含1,507条租赁信息的原创数据集,并经过标准化清洗流程,再引入四个自定义特征(包括豪华度评分和基于关键词的质量评分)。对比五种模型(线性回归、随机森林、XGBoost、LightGBM),采用无泄漏的KFold目标编码处理地理位置信息,通过Optuna进行贝叶斯优化。最优XGBoost模型取得$R^2$=0.847,MAE=210,902 XOF,RMSE=324,195 XOF。利用原生XGBoost增益与SHAP值评估特征重要性,发现位置变量在增益中排名靠后,但在SHAP分析中位列第二,提示目标编码类别变量在享乐研究中的方法论风险。该研究为达喀尔租赁市场提供可解释基准,并指出可改进方向,如整合地理空间特征与置信区间预测。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。