Skip to content

Instantly share code, notes, and snippets.

@stevevance
Created July 2, 2026 00:44
Show Gist options
  • Select an option

  • Save stevevance/5386c063a0b2ae89e154bd08f352544a to your computer and use it in GitHub Desktop.

Select an option

Save stevevance/5386c063a0b2ae89e154bd08f352544a to your computer and use it in GitHub Desktop.
CCAO residential model: gain importance of bedrooms (char_beds) and rooms (char_rooms) for fair market value

How much do bedrooms and rooms matter to Cook County home values?

Feature importance of char_beds and char_rooms in the Cook County Assessor's residential model

This reproduces the Cook County Assessor's Office (CCAO) residential automated valuation model (ccao-data/model-res-avm) locally to measure how much the number of bedrooms and total rooms actually drive assessed fair market value.

Setup

Item Value
Model CCAO residential AVM (LightGBM gradient-boosted trees)
Data year 2026 assessment (public inputs from CCAO's S3 bucket)
Training rows ~400K arms-length residential sales
Predictors 95 features (structural, location, proximity, census)
Hyperparameters CCAO defaults (cross-validation disabled; does not affect the importance ranking)
Metric LightGBM built-in gain importance (each feature's share of total loss reduction across all tree splits)

LightGBM gain importance

Top 20 features by gain

Rank Feature Share of total gain
1 meta_nbhd_code (neighborhood) 15.6%
2 loc_school_elementary_district_geoid 12.9%
3 char_bldg_sf (building square feet) 10.0%
4 loc_census_tract_geoid 9.1%
5 char_class (property class) 6.3%
6 loc_school_secondary_district_geoid 5.5%
7 acs5_median_income_per_capita_past_year 4.1%
8 char_fbath (full baths) 3.5%
9 meta_township_code 2.0%
10 char_yrblt (year built) 2.0%
11 time_sale_day 1.7%
12 char_frpl (fireplaces) 1.7%
13 acs5_percent_education_high_school 1.5%
14 acs5_median_income_household_past_year 1.5%
15 prox_num_foreclosure_per_1000_pin_past_5_years 1.3%
16 loc_latitude 1.3%
17 char_land_sf (land square feet) 1.2%
18 char_rooms (total rooms) 1.0%
19 time_sale_year 0.9%
20 char_beds (bedrooms) 0.9%

Focus: bedrooms and rooms

Feature Rank (of 95) Gain share Cover Frequency
char_rooms 18 1.00% 1.43% 1.63%
char_beds 20 0.90% 1.32% 1.24%

Bottom line

Bedrooms and rooms are minor predictors of assessed fair market value. Each contributes under 1% of the model's total gain, ranking 18th and 20th out of 95 features.

For comparison:

  • Building square footage matters ~10x more than either (10.0% vs ~0.9%).
  • Full bathrooms matter ~3.5x more (3.5%).
  • Location dominates everything: neighborhood (15.6%), elementary school district (12.9%), and census tract (9.1%) alone account for ~38% of total gain.

The likely reason bedroom and room counts carry so little independent weight: they are highly collinear with building square footage, which the model already has. Once a tree model knows a home's size and location, the marginal information in "how many rooms" is small. This matches CCAO's own published guidance, which ranks importance as location > size > bedrooms/bathrooms, and notes strong diminishing returns ("the value added by a second bedroom is much more than the value added by a twentieth bedroom").

Method notes

  • Model trained with pipeline/01-train.R; importance read from the trained LightGBM booster via lightgbm::lgb.importance() (the same call CCAO uses in pipeline/04-interpret.R).
  • The linear baseline model in stage 01 was skipped (memory-heavy, and irrelevant to the LightGBM feature importance).
  • Gain = share of total loss reduction attributable to splits on each feature. Cover = share of observations touched by those splits. Frequency = share of all splits that use the feature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment