Downloads · 30 days
0
woonstadrotterdam/woningwaardering-ml
woningwaardering-ml is a machine learning model from woonstadrotterdam. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
A gradient boosting regression model for predicting Dutch housing valuation points (woningwaardering points) based on property characteristics.
Downloads · 30 days
0
Access
Public
Updated Oct 2, 2026
Repo size
220 MB
Likes
2
Public
Click a slice to open those files.
.json64.4 MB · 99%
From the Hugging Face model README
A gradient boosting regression model for predicting Dutch housing valuation points (woningwaardering points) based on property characteristics.
This project is done for learning and educational purposes. It is not intended to be used for real-world applications.
This is a gradient boosting regression model that predicts Dutch housing valuation points (woningwaardering points) based on property characteristics. The model uses XGBoost's XGBRegressor with hyperparameter tuning.
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies
uv pip install -e .
# Install as package (recommended)
pip install -e .
# Or just install dependencies
pip install -r requirements.txt
train.ipynb notebookfrom woningwaardering_ml import WoningwaarderingPredictor
import pandas as pd
# Initialize predictor (loads model and preprocessing components)
predictor = WoningwaarderingPredictor()
# Prepare your data
new_property = pd.DataFrame({
'year_built': [1990],
'number_of_rooms': [5],
'number_of_bedrooms': [3],
'indoor_area': [120],
'outdoor_area': [50],
'energy_label': ['B'],
'property_value': [350000]
})
# Make prediction
predictions = predictor.predict(new_property)
print(f"Predicted woningwaardering points: {predictions.iloc[0]}")
# Batch prediction
multiple_properties = pd.DataFrame({
'year_built': [1990, 2010, 1985],
'number_of_rooms': [5, 4, 6],
'number_of_bedrooms': [3, 2, 4],
'indoor_area': [120, 90, 150],
'outdoor_area': [50, 30, 80],
'energy_label': ['B', 'A', 'C'],
'property_value': [350000, 280000, 420000]
})
batch_predictions = predictor.predict(multiple_properties)
print(batch_predictions)
from woningwaardering_ml import load_model, load_preprocessing_components, preprocess_data
import pandas as pd
# Load model and preprocessing components
model = load_model('woningwaardering_model.json')
energy_label_encoder, feature_cols = load_preprocessing_components()
# Prepare your data
new_property = pd.DataFrame({
'year_built': [1990],
'number_of_rooms': [5],
'number_of_bedrooms': [3],
'indoor_area': [120],
'outdoor_area': [50],
'energy_label': ['B'],
'property_value': [350000]
})
# Preprocess data
new_property_processed, _ = preprocess_data(
new_property,
energy_label_encoder=energy_label_encoder
)
# Select features in the same order as training
X_new = new_property_processed[feature_cols]
# Make prediction
prediction = model.predict(X_new)
print(f"Predicted woningwaardering points: {prediction[0]}")
# Interactive mode
python main.py
# With JSON input
python main.py --property '{"year_built":1990,"number_of_rooms":5,"number_of_bedrooms":3,"indoor_area":120,"outdoor_area":50,"energy_label":"B","property_value":350000}'
# With input file
python main.py --input properties.json --output predictions.csv
The model requires the following features:
year_built (int): Year the property was builtnumber_of_bedrooms (int): Number of bedrooms.indoor_area (float): Total indoor area in m², including storage space and garage.outdoor_area (float): Total outdoor area in m².energy_label (str): Most recent valid energy label. One of: G, F, E, D, C, B, A, A+, A++, A+++, or A++++ (ordered worst to best). A missing energy label is treated as the worst label (G).property_value (float): Most recent official property value (WOZ waarde), as issued by the government, in euros.woningwaardering-ml/
├── woningwaardering_ml/ # Python package
│ ├── __init__.py # Package initialization
│ ├── preprocessing.py # Data preprocessing utilities
│ ├── model.py # Model loading utilities
│ └── inference.py # High-level inference API
├── train.ipynb # Main training and evaluation notebook
├── main.py # CLI entry point for inference
├── push_to_hub.py # Script to push model to Hugging Face Hub
├── pyproject.toml # Project dependencies (uv)
├── requirements.txt # Alternative requirements file (pip)
├── PUBLISHING_GUIDE.md # Guide for publishing to Hugging Face
├── README.md # This file
├── LICENSE # MIT License
├── .gitignore # Git ignore rules
│
├── Generated files (after training):
├── woningwaardering_model.json # Trained model
├── energy_label_encoder.pkl # Energy label encoder
├── feature_columns.json # Feature column names (order matters)
└── model_metadata.json # Model metadata and hyperparameters
For detailed dataset information, see the dataset card.
description, single_family_home, number_of_rooms, organization columnsenergy_label (G to A++++) → energy_label_encodedyear_builtnumber_of_bedroomsindoor_areaoutdoor_areaproperty_valueenergy_label_encodedThe model was evaluated on a held-out test set of 4,856 samples.
| Organization | Test samples | MAE | MAPE |
|---|---|---|---|
| Woonstad Rotterdam | 3,059 | 2.85 | 1.77% |
| Thuisvester | 1,057 | 2.59 | 1.45% |
| Beveland Wonen | 740 | 2.40 | 1.50% |
| Total | 4,856 | 2.72 | 1.66% |
indoor_area and outdoor_area.energy_label is now predicted as the worst label (G).pyproject.toml or requirements.txt for dependenciesThe model uses a fixed random seed (42) for reproducibility. This is set for:
Currently, the main training and evaluation is done in the train.ipynb notebook. The notebook includes:
Or use the notebook cell to push directly.
If you use this model, please cite:
@software{woningwaardering_ml,
title = {Woningwaardering ML Model},
author = {Gabay, Tomer},
organization = {Woonstad Rotterdam},
year = {2025},
url = {https://huggingface.co/woonstadrotterdam/woningwaardering-ml}
}
MIT
Contributions are welcome! Please feel free to submit a Pull Request.
For more information about the dataset, see the dataset card.