feat(tradein/backtest): full-spine prediction + range-coverage/calibration/segment metrics (#1966 PR 2/3) #1983
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#1983
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/tradein-backtest-full-spine"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
#1966 PR 2/3. Upgrades the read-only backtest harness from the asking-median core to the full deterministic spine via
_price_from_inputs(the #1976 extraction), and adds range-coverage, confidence-calibration, and per-price-segment MAPE (on top of per-rooms).Real prod numbers (full engine, freshest deals since 2025-10-01, n=371 matched / 400)
expected_soldvs actual rosreestr ДКП sold:Overall: MAPE 18.4%, bias −1.2% (well-centered; ≈ asking-core corrected 19.6%, spine slightly better).
Per-price-segment — the honest picture (confirms strategic audit 0627):
→ the engine overvalues эконом and systematically UNDERvalues the expensive segments (бизнес/элит) — exactly where the trade-in money is. Now measured, not hand-waved.
Per-rooms: студия +23.7% / 1к −7% / 2к −8.3% / 3к +5% (MAPE 12.4%, best) / 4+ +10.8%.
Range coverage 56.6% overall — the predicted range is miscalibrated (too narrow for honest coverage); R2 risk now quantified. Sharpness (median rel width) 0.47.
Calibration inconclusive in this run: confidence ≈ always "low" (backtest doesn't resolve
target_house_id→ same-building Tier-A anchor never fires → high/medium buckets n=1/n=3). Documented caveat.Headline ask vs sold spread +19.2% (vs +31% asking-core — the spine pulls the headline toward sold).
Caveat (standing): CURRENT listings vs PAST deals → time-mismatched → this is a regression baseline, not an absolute SLA. Network valuation layers (on-demand Avito-IMV / Yandex / Cian) excluded for hermeticity.
What's in
_select_analogs_full: byte-faithful replication ofestimate_quality's analog tier ladder (Tier 0 cohort → A → wide → widearea) via_fetch_analogs(full lot dicts)._price_from_inputscomposition with injectedratio_resolver/ quarter lookups + a syntheticGeocodeResult(client-coords fast path)._range_coverage,_calibration_metrics,_segment_metrics,_sharpness(55 tests in the module; full suite 2488 passed, ruff clean).--engine {full,asking-core}(defaultfull);--json.PRICE_SEGMENTS_PPM2= documented tunable EKB bands.Unblocks PR 3/3 (wire these metrics as a CI regression gate on a frozen
backtest_baseline.json).Part of #1966 (PR 2/3). Refs #1966.