gendesign/tradein-mvp/backend/app/core
bot-backend 7d9ecb117f feat(tradein/estimator): hedonic year+area correction on expected_sold (#2002)
Held-out fit (n=2366 prod deals, 2026-06-27) of
log(actual_sold/expected_sold) ~ year + ln(area) gives a multiplicative
factor that corrects systematic mis-estimation by building era + unit size
(underestimates newer buildings, mis-handles large units).

factor = exp(b0 + b_year*(year-2000)/20 + b_larea*ln(area)), clamped
[0.75, 1.30]; applied to the expected_sold point BEFORE the calibrated PI
range block (so the range follows the corrected point). Headline/asking is
untouched. Gated behind estimate_hedonic_correction_enabled (OFF => exact
old behavior, proven by the regression gate).

Frozen baseline regenerated: overall expected_sold MAPE 18.63->14.24;
per-segment median_bias_pct moves toward 0 (бизнес -21.5->-9.2,
комфорт -8.0->-3.6, эконом 17.2->4.3); элит mildly better, no harm.

Tests that assert the exact ratio relation (expected_sold == headline x
ratio) hold the orthogonal hedonic layer OFF.
2026-06-27 18:45:10 +03:00
..
__init__.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
auth.py feat(tradein/auth): expire praktika trial access + trial-ended screen (contact Artem) 2026-06-27 13:30:28 +03:00
config.py feat(tradein/estimator): hedonic year+area correction on expected_sold (#2002) 2026-06-27 18:45:10 +03:00
db.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
fdw.py feat(tradein): postgres_fdw live read of gendesign.cad_buildings (replaces snapshot) (#493) 2026-05-24 08:57:30 +00:00
ratelimit.py fix(tradein): bypass rate-limit for authenticated pilots + configurable limit (#655) (#669) 2026-05-29 15:56:30 +00:00