Data Mining Project

Classifying Saudi Real Estate with Machine Learning

A comparative analysis of Logistic Regression, Decision Trees, and Random Forest to predict property value categories ("Affordable" vs. "High-Value") aligned with Vision 2030 housing trends.

87.6% Model Accuracy
5K+ Listings Analyzed

Project Tech Stack

Python (Pandas/Scikit-Learn)
Random Forest Classifier
Data Preprocessing (IQR)
GridSearchCV Tuning

Data Methodology

1. Cleaning & Encoding

Handled Arabic text (UTF-8-SIG), encoded City names to integers, and managed missing values in critical columns.

2. Outlier Removal

Applied Interquartile Range (IQR) method to remove extreme property sizes (commercial/palaces) that skewed results.

3. Target Engineering

Converted continuous Price into a binary classification target: 0 (Affordable) vs. 1 (High-Value).

Feature Correlation

Data Distribution (Outliers)

Model Performance

Random Forest Results (Winner)

An ensemble of 50 decision trees (Max Depth=10) voting on the outcome.

87.61% Accuracy
0.95 AUC Score
Analysis: The ensemble approach effectively handled the "Majlis" (Livings) feature and Location encoding, reducing variance and improving prediction stability.

Deep Dive: Why Random Forest Won

Feature Importance

The model identified "Area" and "City" as the primary price drivers.

ROC Curve Analysis

AUC of 0.95 indicates excellent class separation capability.

Confusion Matrix Details

137
Correct Affordable
24
False Positives
17
False Negatives
153
Correct High-Value