We followed one question as far as it would go: are homes getting harder to afford, and can a machine see it coming? Four weeks, one dataset about housing in 26 countries from 1977 to 2024, and a new method every week: cleaning, prediction, clustering and neural networks. This is the whole course in one story: what we built, what worked, and what didn’t.

Four numbers sum up the course. 31 house prices hidden as zeros. 4 market moods found without labels. A neural network and a straight line that scored 3.22 and 3.28. And 1,953 parameters: all the network needed to tie with that straight line.

Week 1 · Data cleaning and exploration
The data looked perfect. It wasn’t.
We started with a Kaggle table: house prices and incomes for 26 countries over 51 years. No missing values, no duplicates, every country complete. Then we looked closer, and every problem we found became part of the story.

Affordability here means house prices divided by income: higher is harder to afford. Because every series is an index that reaches 100 in 2024, you compare how the lines move, not how high they sit. So we also compared each decade with each country’s own normal.

Clean data, clear trends. Next question: could we see next year coming?
Week 2 · Supervised learning
The hardest rival was doing nothing.
We trained models to forecast next year’s affordability from what is known this year. Before any model, we wrote down the laziest forecast possible: next year will be the same as this year. Prices move slowly, so that guess is already close. It became the bar almost nothing could clear.

Splitting by time mattered. Neighbouring years of a country are almost identical, so a random shuffle lets a model peek at its own future: it looked 13% better than it really was.

A forecast is one number. We wanted a vocabulary for what a market is going through.
Week 3 · Unsupervised learning
Housing markets have moods.
This time nobody told the computer what to look for. For every country-year we gave it four measures: price growth, income growth, momentum, and how expensive the market is compared with its own history. K-Means found four groups, and every one of them could be named.


The moods are not just labels, they tell you what comes next. After a boom year, affordability gets worse again 80% of the time. After a correction year, it keeps improving 85% of the time. And the same sequence repeats across countries and decades.

Then the question every AI course asks: would a neural network do better?
Week 4 · Neural networks
We built a small brain. It tied with a straight line.
We gave the week 2 forecast to a neural network: same data, same inputs, same test years. A multi-layer perceptron with 26 inputs, two hidden layers of 32 neurons and one output. 1,953 parameters, trained in about 30 seconds on a laptop.

One decision mattered more than all the tuning: predicting the change instead of the level. The rest made no measurable difference. On the test years, the network and Ridge ended in a draw, and both missed the same year.

Splitting the errors by the week 3 moods closes the loop between the weeks: booms are the hardest to read for every model. And a what-if for Spain shows how both models react when prices rise faster.

Four weeks, one dataset, one question. After the course, a separate one-week hackathon asked us to put these skills into practice on something completely new: an app that turns photos of Barcelona into music. It uses its own data and its own model, so it has its own post: Chroma: Hear the Place You Are In.
Lessons — what one term taught us
Four things we’ll keep.
Four weeks, four methods, one dataset. These are the lessons we will carry into whatever we build next.

Group 08: Akshat Dayal, Bhavini Manot, Bo De Roeck · Master in AI for Architecture and the Built Environment 2026–27 · AI Methods I
Code and models: GitHub repository, weeks 1–4 · Hugging Face collection
Housing data: Kaggle, likely based on the Dallas Fed International House Price Database, CC BY-SA 4.0. Affordability values are indexes: compare movements over time, not levels between countries.