logo
Machine LearningMachine LearningCompleted

Jabodetabek House Price Prediction

Predicting property prices through machine learning

This Final Project for Machine Learning focused on predicting house prices in Jabodetabek using Random Forest, KNN, Linear Regression, and Gradient Boosting. The project covered the complete machine learning workflow, from data cleaning and feature engineering to model training, hyperparameter tuning, feature selection, and evaluation.

My Role
Machine Learning Engineer
Year
2025
Duration
1 month
Jabodetabek House Price Prediction
0.8835
Best R² Score
3,423
Clean Dataset
4
Algorithms
Random Forest
Best Model

The Journey

Understanding What Drives House Prices

Turning property data into meaningful predictions

House prices in Jabodetabek are influenced by many factors, including land size, building size, bedrooms, bathrooms, location, and property characteristics. The challenge was to build a regression model that could learn these relationships from real-world property listing data while dealing with missing values, categorical variables, and outliers. The project used several regression algorithms to understand which approach could provide the most reliable predictions.

Building the Machine Learning Pipeline

From raw property listings to trained regression models

I worked on the data preprocessing and Random Forest pipeline. The workflow included: • Cleaning missing and invalid data • Separating numerical and categorical features • Encoding property condition, certificate, furnishing, and city • Analyzing feature correlations • Handling outliers • Splitting the dataset into training and testing sets • Training multiple regression models • Evaluating models using MAE, MSE, RMSE, and R² • Tuning Random Forest hyperparameters using GridSearchCV After preprocessing and outlier handling, the dataset contained 3,423 clean records ready for model training.

Improving Random Forest Performance

Experimenting with tuning, scaling, and feature selection

For the Random Forest model, I compared several configurations: 1. Default Random Forest 2. Random Forest with hyperparameter tuning 3. Random Forest with feature scaling 4. Random Forest with selected features Hyperparameter tuning was performed using GridSearchCV with 5-fold cross-validation. The selected-feature approach focused on features such as: • Bedrooms • Bathrooms • Land size • Building size • Carports • Maid bedrooms • Maid bathrooms • Garages • City encoding Feature selection produced the strongest Random Forest result, achieving an R² Score of 0.883476.

Finding the Best Performing Approach

Random Forest achieved the strongest overall performance

The experiments showed that preprocessing strategies can have different effects depending on the algorithm. Random Forest with selected features achieved the best result with: • MAE: Rp641.2M • MSE: 2.4132 × 10¹⁸ • RMSE: Rp1.553B • R² Score: 0.883476 This was higher than the other evaluated models, including Gradient Boosting, KNN, and Linear Regression. The experiment also showed that normalization was particularly useful for distance-based algorithms such as KNN, while feature selection provided a noticeable improvement for tree-based models.

Technologies Used

Python
Pandas
NumPy
Scikit-learn
Matplotlib
Seaborn
Jupyter Notebook

Key Features

House price prediction for properties across Jabodetabek
Data cleaning and missing-value handling
Categorical feature encoding
Outlier detection and handling
Correlation-based feature selection
Comparison of Random Forest, KNN, Linear Regression, and Gradient Boosting
Hyperparameter tuning using GridSearchCV
Model evaluation using MAE, MSE, RMSE, and R² Score

Key Learnings

1

Real-world machine learning starts with careful data cleaning and preprocessing

2

Feature selection can improve both model performance and interpretability

3

Different algorithms respond differently to normalization and feature scaling

4

GridSearchCV can significantly improve model performance through systematic hyperparameter tuning

5

Model evaluation should use multiple metrics rather than relying on a single score

6

Understanding the dataset is just as important as choosing the machine learning algorithm

Interested in this project?

Feel free to explore the code or see it in action. I m always happy to discuss the technical details!