California Housing Intelligence · A 1990 census model, explained

Estimate the median home value of a 1990 California neighbourhood, as a Random Forest sees it.

The model was trained on census block groups from 1990. It estimates an area’s median value, not the price of an individual home, and it is not a current valuation.

Describe a block group

A census block group is a small, neighbourhood-sized area, usually home to 600 to 3,000 people.

Synthetic profile. The median of each feature, not a real block group.

Location

Click or drag on the map to move the area. With the map focused, arrow keys move it by 0.05° (Shift: 0.5°).

Moves only the location to the city centre; the other inputs stay as they are.

Typical: 32.68–40.63°N

Typical: −123.22 to −116.29°

Income and people
MedInc

Typical: $10,696–$105,965 a year

Typical: 88–5,806 people

AveOccup

Typical: 1.54–5.39 people

Housing stock
HouseAge

Typical: 4–52 years

AveRooms

Typical: 2.58–10.36 rooms

AveBedrms

Typical: 0.87–2.13 bedrooms

What the model receives

These eight numbers are everything the model knows about an area. Income is sent in tens of thousands of dollars.

MedInc
3.5348
HouseAge
29
AveRooms
5.2291
AveBedrms
1.0488
Population
1166
AveOccup
2.8181
Latitude
34.26
Longitude
-118.49

All eight values are valid.

Predicted median home value

Asking the model…

In 1990 dollars, for the synthetic median profile.

  • Median of all training areas: $179,850

Pin this estimate, then change inputs to compare.

On 4,128 areas it never saw during training, the model’s estimates were off by $32,800 on average. That is an average across many areas, not a range for this estimate.

How the model responds

The model’s estimate as one input changes across its typical range, with the other seven held at their current values.

Estimate, 1990 dollars · Updating…

—

Method and limits

How the model was built and tested, and what it can’t tell you.

What it predicts

Each of the 20,640 rows in the data describes one California census block group in 1990: an area, not a house. The model estimates the area’s median home value, the value half its homes are below and half above, in 1990 dollars.

It is a Random Forest: 100 decision trees, each trained on a random resample of the training areas. Each tree sorts an area through a series of yes-or-no questions about the eight inputs and lands on a value learned from similar training areas. The estimate is the average of the 100 trees’ answers.

Because every answer comes from values seen in training, the model can never estimate below the lowest or above the highest value it was trained on.

How it was evaluated

The areas were split at random: 16,512 to learn from and 4,128 held back to test on. The score is the mean absolute error (MAE): the average size of a miss, ignoring whether it was too high or too low. An MAE of $32,800 means the estimates were off by that much on average; some misses were much larger, some much smaller.

Average error on the 4,128 test areas (lower is better)
ModelAverage error
Always guess the medianA baseline that predicts $179,850 for every area
$87,404
Linear regression
$53,320
Random forestThe model used here
$32,773

The random forest’s error is 63% lower than always guessing the median.

Random forest: familiar areas vs unseen ones
ModelAverage error
Areas it trained on
$12,210
Areas it never sawThe fair measure
$32,773

On unseen areas the error is about 2.7 times larger. The model partly memorised its training areas (overfitting), which is why only the test error is a fair measure of how it does on new data.

How the tree depth was chosen

Before the final test, the training areas were split again (13,209 to learn from, 3,303 to validate on) to compare how deep each tree may grow. Unlimited depth did best, narrowly, and was kept.

Validation error by maximum tree depth
Maximum depthValidation error
5$49,855
10$37,788
15$34,893
20$34,571
Unlimited (used)$34,475

What it can’t tell you

  • It describes 1990, not today

    Prices, incomes and neighbourhoods have changed since the 1990 Census. Estimates are in 1990 dollars, not adjusted for inflation, and are not a valuation of any property today.

  • It estimates areas, not homes

    Each estimate is the median value of a whole block group. It says nothing about the price of any particular house in it.

  • It can’t see above $500,000

    965 areas were recorded at the $500,001 cap, so their true values are unknown, and the model can never estimate higher. Income is capped at $150,001 and house age at 52 years in the same way.

  • Changing an input isn’t cause and effect

    The model learned patterns that existed together in the 1990 data. Changing an input shows how the model’s estimate responds, not what would happen to real prices if that thing changed.

  • Its error is probably higher for unfamiliar places

    The test areas were picked at random, so many sit right next to areas the model trained on. Areas unlike anything in the training data would likely see larger errors than the average reported here.

  • The test set was used more than once

    During development the same test areas were used to compare models before the final one was chosen, so the reported error isn’t a perfectly untouched final check.

  • No uncertainty for a single estimate

    The model returns one number. It doesn’t provide a confidence range, and the average error above is not a range for any individual estimate.