"Smart Rent: Predicting Apartment Prices Using ML & PCA"
This project applies machine learning techniques to accurately predict apartment rental prices using various housing features like square footage, number of bedrooms, bathrooms, and location. It is built using a clean pipeline that includes data cleaning, feature transformation, dimensionality reduction (PCA), and regression modeling.
We used the Random Forest Regressor as the primary model, supported by comparison with Gradient Boosting Regressor and XGBoost. The model achieved strong predictive performance with an R² score of 0.90, proving its practical use in real estate analytics.
- Faryal Zahra
- Ayesha Noor
- Hira Khalid Department of Computer Science National University of Computer and Emerging Sciences, Lahore
-
Data Collection Sourced from publicly available apartment rental listings via UCI ML Repository.
-
Preprocessing
- Missing value imputation
- Frequency encoding for categorical data
- Outlier treatment with log transforms/capping
-
Exploratory Data Analysis (EDA)
- Correlation matrix
- Scatter plots
-
Dimensionality Reduction
- Applied Principal Component Analysis (PCA) to retain 95% variance
-
Model Development
- Used Random Forest Regressor
- Comparison with Gradient Boosting and XGBoost
-
Evaluation Metrics
- R² Score: 0.90
- Mean Absolute Error (MAE): 0.0035
- Root Mean Squared Error (RMSE): 0.0092
- Square footage and room count are significant indicators of price.
- PCA significantly reduced model complexity while maintaining high accuracy.
- Random Forest Regressor provided the most robust results.
- Explore time-series forecasting for rental trends.
- Try deep learning models (e.g., Neural Networks).
- Cluster-based approaches like K-Means for market segmentation.