AI 中文总结
本研究构建机器学习流程预测达喀尔住宅租金,优化后的XGBoost模型表现最佳,为当地租赁市场提供可解释基准,同时揭示了特征重要性评估的方法学差异。
AI 中文摘要
达喀尔的住宅租赁市场尽管具有经济和社会重要性,但相关记录仍不完善:54.4%的家庭是租客,而全国这一比例为23.3%。本研究开发了一套完整的机器学习流程,用于预测达喀尔的住宅租金,涵盖从数据收集到模型解释的全流程。通过系统性网络爬虫构建了包含1507条租赁房源的原始数据集,并建立了规范的清洗流程,随后添加了4个专门构建的特征,包括豪华度评分和基于关键词的质量评分。对比了五种模型:线性回归、Random Forest(基线模型)、XGBoost,以及通过Optuna进行贝叶斯优化的LightGBM,其中位置特征采用无泄漏KFold目标编码。优化后的XGBoost模型表现最佳,R²为0.847,平均绝对误差(MAE)为210902西非法郎(XOF),均方根误差(RMSE)为324195西非法郎(XOF)。通过XGBoost原生增益和SHAP值评估了特征重要性,发现位置特征的排名存在显著差异:按增益衡量时为次要预测因子,但按SHAP值衡量时是第二具影响力的变量。这一结果对使用目标编码分类变量的享乐主义研究具有方法论意义。本研究为达喀尔租赁市场提供了可解释的基准,并指出了若干改进方向,包括整合地理空间特征和共形预测。
英文摘要
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.
Comments19 pages, 16 figures, 4 tables