gendesign/tradein-mvp/backend/tests/fixtures/backtest_baseline.json
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

154 lines
3 KiB
JSON

{
"calibration": {
"high": {
"coverage_pct": null,
"mape_pct": null,
"n": 0,
"n_covered": 0
},
"low": {
"coverage_pct": 82.18,
"mape_pct": 14.24,
"n": 275,
"n_covered": 226
},
"medium": {
"coverage_pct": 100.0,
"mape_pct": 11.76,
"n": 2,
"n_covered": 2
}
},
"confidence_order": [
"high",
"medium",
"low"
],
"expected_sold": {
"overall": {
"mape_pct": 14.24,
"median_bias_pct": -2.62,
"n": 277,
"n_no_analogs": 0,
"p25_pct": -14.43,
"p75_pct": 13.18
},
"per_rooms": {
"0": {
"label": "студия",
"mape_pct": 19.38,
"median_bias_pct": 18.1,
"n": 37,
"n_no_analogs": 0,
"p25_pct": 1.66,
"p75_pct": 33.53
},
"1": {
"label": "1к",
"mape_pct": 10.97,
"median_bias_pct": -3.47,
"n": 93,
"n_no_analogs": 0,
"p25_pct": -12.48,
"p75_pct": 6.98
},
"2": {
"label": "2к",
"mape_pct": 17.39,
"median_bias_pct": -11.71,
"n": 74,
"n_no_analogs": 0,
"p25_pct": -23.37,
"p75_pct": -0.36
},
"3": {
"label": "3к",
"mape_pct": 8.41,
"median_bias_pct": 1.72,
"n": 43,
"n_no_analogs": 0,
"p25_pct": -9.8,
"p75_pct": 7.98
},
"4": {
"label": "4+",
"mape_pct": 20.27,
"median_bias_pct": 8.86,
"n": 30,
"n_no_analogs": 0,
"p25_pct": -3.77,
"p75_pct": 23.54
}
},
"per_segment": {
"бизнес": {
"mape_pct": 12.87,
"median_bias_pct": -9.15,
"n": 46,
"p25_pct": -21.89,
"p75_pct": -0.74
},
"комфорт": {
"mape_pct": 11.93,
"median_bias_pct": -3.63,
"n": 104,
"p25_pct": -15.64,
"p75_pct": 8.13
},
"премиум": {
"mape_pct": 68.92,
"median_bias_pct": -68.92,
"n": 1,
"p25_pct": -68.92,
"p75_pct": -68.92
},
"эконом": {
"mape_pct": 15.58,
"median_bias_pct": 4.28,
"n": 120,
"p25_pct": -6.11,
"p75_pct": 26.09
},
"элит": {
"mape_pct": 31.85,
"median_bias_pct": -31.85,
"n": 6,
"p25_pct": -42.08,
"p75_pct": -22.4
}
}
},
"headline": {
"ask_median_ppm2": 147545.8502510892,
"deal_median_ppm2": 125063.0,
"spread_pct": 17.98
},
"range_coverage": {
"overall": {
"coverage_pct": 82.31,
"n": 277,
"n_covered": 228
},
"per_confidence": {
"high": {
"coverage_pct": null,
"n": 0,
"n_covered": 0
},
"low": {
"coverage_pct": 82.18,
"n": 275,
"n_covered": 226
},
"medium": {
"coverage_pct": 100.0,
"n": 2,
"n_covered": 2
}
}
},
"sharpness": {
"median_rel_width": 0.743,
"n": 277
}
}