feat(tradein-estimator): cohort filter + Tier 0 for analog selection quality #519

Merged
lekss361 merged 1 commit from feat/tradein-estimator-cohort-filter into main 2026-05-24 13:04:59 +00:00

1 commit

Author SHA1 Message Date
lekss361
1d4d58538d feat(tradein-estimator): cohort filter + Tier 0 for analog selection quality
Production audit (2026-05-24, estimate d4ec4610) showed analogs mixing
new high-rises (31-этаж, ~2015+) with target 1978 Khrushchev/Brezhnev-era
9-floor building — relevance_score gave too little weight to year mismatch.
Median price drifted; CV at 32%.

Add cohort hard-filter as new Tier 0 in fallback cascade:
  Tier 0 (NEW): 1km + ±15% area + year cohort match
  Tier A:       1km + ±15% area  (no cohort — graceful drop if Tier 0 < 5)
  Tier B:       2km + ±15% area
  Tier C:       2km + ±25% area

5 cohorts (khrushchev 1955-69, brezhnev 1970-89, late_soviet 1985-99,
2000s 2000-10, modern 2011+). target_year=None or out-of-range -> cohort
skipped, Tier 0 not attempted.

Listings with year_built IS NULL pass through cohort filter (gentle --
don't penalize scrapers with incomplete data).

No schema/API changes. relevance_score weights untouched (separate concern).
2026-05-24 15:51:15 +03:00