Epic: a stable and reliable US local-area dataset, measured by ESS and calibration fit

未关闭
#1,730 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
8/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
python
领域
data

调研方向

This is an epic with open design decisions, not a starting task. The only concrete step is Step 0: on the first build from #1719, report the listed measures and add ESS at equal weights per district and county. Start from the linked sub-issues #1727, #1728, #1720 and #1729, and from the experiment write-up linked in the body. Done means the baseline numbers are posted here.

由索引模型根据 Issue 内容生成。

描述

Goal

Make the US local-area dataset stable and reliable for states, congressional districts and counties. Two measures decide it:

  • the effective sample size (ESS) in each area;
  • calibration performance, on the targets in the fit and on held-out targets.

#1676 and #1719 move the national and local builds to policyengine-us 2.145.3. This epic starts from the files they produce. It does not block them.

Why

The local file has many records, but few of them carry the weight. The file pools two sets of rows: the national release's households (the donor rows) and ACS PUMS households.

  • September release (1,588,854 households, 4,459 targets; experiment write-up):
    • National ESS is 13,646.
    • The median district ESS is 33. Of the 436 districts, 352 are below 50.
    • The 57,240 donor rows hold 68% of the weight after calibration.
  • County proof of concept (#1647): the median county ESS is 5.95. Of the 3,144 counties, 3,038 have grade D (the grades are provisional).
  • Results that show it:
    • District poverty does not track the ACS district estimates: r = 0.08 over 30 districts (#1673).
    • State slices have 11% too many children and 6% too few adults (#1528).

Measures

Every build reports these for states, districts and counties.

Measure What it shows
ESS on distinct source households: national, median area, lowest area, number of areas below the floor How many records carry each area
ESS after calibration against the ESS of the starting weights What the solve costs
Share of the weight on donor rows Which rows carry the areas
Share of targets within 10%, by family and by level Fit
Error on held-out targets (folds) Whether the fit holds outside the targets in the loss
Checks outside the loss: ACS district poverty and median income (#1673), state age groups (#1528) Accuracy that the loss cannot see

This epic does not set the floors yet. Two starting points exist:

  • the gate that #1078 adopted: no district below a quarter of its starting ESS, and none below 15;
  • the shared gate that the UK local build uses: 50 rows, ESS 50 and 50 distinct source households in each area.

The floors are chosen after the baseline (decision 4).

What we know

  1. The starting weights set the limit. --acs-share 0.5 gives the donor rows half the mass. A penalty cannot lift ESS above the ESS of the starting weights.

    ACS share Starting national ESS Starting median district ESS
    0.5 (today) 36,288 80
    0.7 96,034 215
    0.9 479,159 1,111
    In proportion to households 778,061 1,822
  2. A higher ACS share costs fit on tax targets. At share 0.9, ESS after calibration is 93,524 and no district is below 50. The held-out error rises from 0.130 to 0.177, mostly on SOI targets. The ACS rows carry tax detail only as a transfer from the donor rows.

  3. The L2 penalty exists and is a small lever. #1078 added a chi-square basis to the shared solver for this lane. At λ 0.03, ESS goes from 13,646 to 20,690. The local tool has the flags, and the default is 0.

  4. A mix study recommends a different pool. #1067: three CPS years plus ACS to 1.2M households, seeded in proportion to households (ESS 276,474). Its write-up says the local mix is not chosen yet.

  5. The local build fits a different target set from the national build. The national build fits 6,102 national and state targets. The local build fits 4,867, with no national rows and no age rows.

  6. ACS rows carry many default values. #1720 lists them. Where a target needs a value that only donor rows carry, the solve moves weight to the donor rows.

  7. The new national donor is dense. Nothing above is measured on it.

Work

Step 0, in this issue: the baseline. On the first build from #1719:

  • report every measure in the table above;
  • add the ESS at equal weights for each district and county. This number is the ceiling that the records allow. It separates a weight problem from a record problem.

Sub-issues:

Workstream Issue Main question
Starting weights and county support #1727 How do donor and ACS rows share the starting mass, and how does a county get enough records?
Target alignment #1728 Which targets does the local build fit, at each level?
ACS record quality #1720 Which default values push weight to donor rows?
Shared calibration machinery #1729 Which solver options and gates move to shared code?

Order

  • Pick λ and the gate floors last. λ is in units of the loss, so it changes when the targets or the starting weights change.
  • These can start now, in parallel: the data work for targets, the #1720 items, and the shared machinery. The shared machinery changes no output until a build turns it on.
  • A change that moves outputs needs a build to measure it. Group such changes into few builds.

Decisions needed

  1. The rule for the starting weights and the mix of the pool, after step 0.
  2. Whether the local build fits the national and state target set of the national build.
  3. The county support design and the final grade thresholds (#922).
  4. λ, the family multipliers, the ESS floors, and whether the ESS gate blocks a release.

Not in this epic

  • Build stability: the build host (#1645), memory, the size of engine bumps, certification time (#1595). This is a parallel lane. It has no issue yet.
  • Delivery of the County Files: #922. This epic feeds it.
  • State legislative districts: #625.
  • Quality of the national build itself: #578, #880, #958.

Related

  • Evidence: #1078, #1104, #1067.
  • Symptoms: #1673, #1528, #403.
  • Earlier work on the local file: #512, #449.
  • Shared code: #1585, #611.
主要语言
Python
星标
0
派生
6
平均合并
1 天 17 小时
30 天内合并 PR
190

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

PolicyEngine/microcosm 的其他 Issue

查看 PolicyEngine/microcosm 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。