fix(tradein/estimator): remove dead tier-aware-ratio path — truncation artifact + footgun (#2002) #2015
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#2015
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/tradein-remove-tier-ratio-footgun"
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
Removes the dormant
tier_aware_ratio_enabledprice-tier ratio path (#928) — a proven statistical artifact and a latent footgun. Behavior-neutral at default: the flag shippedFalse, so the active path is unchanged → the regression baseline is byte-identical (not in the diff). −780 lines of dead code.Why it's invalid (Monte-Carlo)
The tier derivation bins SOLD deals by sold-ppm² against ASKING-percentile bounds (t33/t66 of listings), then divides within-tier medians of mismatched populations — a ratio-of-truncated-medians artifact. A simulation with a constant true sold/asking = 0.84 reproduces the prod tier values (0.94/0.99/0.96) and the skewed deal split (57/27/15% vs listings 33/33/33) almost exactly → the 0.84→0.99 "premium sells closer to asking" gradient is 100% spurious. Correct binning (both sides by asking) is nearly flat (0.83→0.85).
Flipping the flag ON on a live 700-deal harness made prod worse: overall MAPE 14.6→17.2, эконом bias +5.8→+18.1 (it uniformly inflated
expected_sold). The valid conditioning for price-segment correction is non-price observables — the per-rooms blend + the hedonic year+area (#2004). Full diagnosis in #2002.Changes
estimator.py_get_asking_sold_ratio: deleted the entire tier branch (bounds read, t33/t66,asking_to_sold_ratios_tieredread, empirical-Bayes shrink) + the tier cache-key split; kept only the legacy per-rooms → global-1lookup. Artifact note added.config.py: removedtier_aware_ratio_enabled+tier_ratio_shrink_k(the only tier-only settings).asking_to_sold_ratio.py(daily task): removed the tiered re-derivation (5 SQL constants + executes + counters) — stops refreshing the dead tier tables. Legacy ratio refresh untouched.git grepfor all tier identifiers → zero remaining across app/tests/scripts.Not in scope
Tier tables (
asking_to_sold_ratios_tiered,asking_to_sold_tier_bounds, mig 098) left inert — a destructiveDROPmigration is an optional follow-up. The now-vestigialanchor_ppm2param is retained for call-site compat (documented).Test plan
test_search_cache_hit401, verified on clean base)Refs #2002