Skip to content

CodingSelim/doha-rent-forecast

Repository files navigation

Doha Rent Forecast

First public ML model for Qatar's residential rental market. Predicts monthly rent with a median error of 724 QAR across 12,463 listings scraped from PropertyFinder.qa and Bayut.qa.

Results

Weighted ensemble of XGBoost, LightGBM, GradientBoosting, and CatBoost.

Metric Value
R-squared 0.69
MAE 1,609 QAR
Median Error 724 QAR
MAPE 18.0%

Predicted vs Actual

Model Comparison

Data

23,402 raw listings collected March 2026. No HTML parsing needed. PropertyFinder data was extracted from __NEXT_DATA__ JSON blobs. Bayut data was pulled through their public Algolia search API. After cleaning and deduplication: 12,463 listings with 100% coordinate coverage.

Dataset Overview

Geographic Distribution

Key Findings

Maid room carries the largest amenity premium at +72%. Pool adds +58%, balcony +43%, gym +42%. Furnished units rent 31% higher than unfurnished. The Pearl Island has the most listings (3,059) and among the highest rents.

Amenity Impact

Neighborhoods

Features

38 features total. The biggest model improvement came from target-encoding 112 neighborhoods using 5-fold CV (+0.503 correlation with log rent). Geo-distance features were computed via haversine formula to all 37 Doha Metro stations, 8 landmarks (airport, Souq Waqif, West Bay, Corniche, malls), and 16 coastline reference points.

Metro Station Map

Feature Importance

SHAP Analysis

Pipeline

make scrape      ->  23,402 listings from PropertyFinder + Bayut
make features    ->  38 features (geo-distance, interactions, target encoding)
make prepare     ->  train/test split (9,970 / 2,493), log target transform
make train       ->  8 baselines + 300 Optuna trials + 3 ensemble methods
make predict     ->  evaluate on held-out test set

API

FastAPI server with Docker support.

# Local
uvicorn api.main:app --port 8000

# Docker
docker compose up --build
curl -X POST localhost:8000/predict -H "Content-Type: application/json" -d '{
  "bedrooms": 2, "bathrooms": 2, "area_sqm": 120,
  "property_type": "apartment", "neighborhood": "The Pearl Island",
  "furnished": true, "has_pool": true, "has_gym": true
}'
{
  "predicted_rent_qar": 9250,
  "predicted_rent_yearly_qar": 111000,
  "confidence_range_low_qar": 7862,
  "confidence_range_high_qar": 10637
}

Setup

git clone https://github.com/CodingSelim/doha-rent-forecast.git
cd doha-rent-forecast
python -m venv venv && source venv/Scripts/activate
pip install -r requirements.txt
cp .env.example .env
make all

Requires Python 3.11+. No GPU needed. Full pipeline runs in about 2 hours.

License

MIT

About

A Machine Learning Pipeline for Predicting Residential Rental Prices in Qatar

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages