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
Key Features
Key Learnings
Interested in this project?
Feel free to explore the code or see it in action. I m always happy to discuss the technical details!
