gendesign/tradein-mvp/backend/app
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
..
api fix(tradein-photos): sanitize uploaded images via Pillow re-encode (#511) 2026-05-24 11:32:04 +00:00
core feat(tradein): postgres_fdw live read of gendesign.cad_buildings (replaces snapshot) (#493) 2026-05-24 08:57:30 +00:00
schemas feat(tradein): in-app scheduler — UI-managed schedule (replaces SSH crontab) (#482) 2026-05-23 14:54:25 +00:00
services feat(tradein-estimator): cohort filter + Tier 0 for analog selection quality 2026-05-24 15:51:15 +03:00
tasks fix(tradein): geocode backfill + remove Avito exclusion from estimator (#490) 2026-05-23 20:03:48 +00:00
__init__.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
main.py feat(tradein): postgres_fdw live read of gendesign.cad_buildings (replaces snapshot) (#493) 2026-05-24 08:57:30 +00:00