Skip to content

Measure what the estimator's one-off weighted resample costs - #20

Draft
juaristi22 wants to merge 3 commits into
conditional-fit-testfrom
subsampling-check
Draft

juaristi22 wants to merge 3 commits into
conditional-fit-testfrom
subsampling-check

Conversation

@juaristi22

@juaristi22 juaristi22 commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #19.

Whether this goes in the paper is for Max to rule in #21, which lists the tests run since the 25 November review. This PR holds test 3 of that list. The package-side question is in PolicyEngine/microcosm#1798.

What this adds

  • A diagnostic variant of the estimator. The estimator applies the weights by resampling its donor rows once per forest. The variant has no such resample, and each tree samples the donor rows by weight. This is how scikit-learn samples from version 1.9, reproduced under the pinned 1.8. Gates, chaining, the draw and every seed are unchanged.
  • The variant stays outside the method registry, beside the one Add a direct test of conditional fit within each survey #19 adds. No sweep and no existing table includes it. It runs only when a command names it.
  • Runs. The variant on the three survey tasks, 30 seeds, with the estimator rerun as a control. And imp seed-stability, which holds SCF donors fixed, imputes onto the population view's 20,000 CPS households, and changes only the estimator's seed.
  • Text. Two sentences in Section 3.1 on how the resample is drawn, one paragraph in 3.2 and one in 3.5, a new Section 5.8 with Table 11, one paragraph each in Sections 6.1 and 6.4, one item reworded in 6.5, and one paragraph in the conclusion.

What it shows

  • What the resample reads. On the SCF it is expected to keep 51% of the distinct donor rows (63% under equal weights) and 7% of the rows above the weighted 99th percentile of net worth.
  • Classifier. Sampling in each tree lowers the paired classifier AUC by 0.015, 0.012 and 0.012 (SCF 2022, SCF 2025, CPS), in 21, 23 and 28 of the 30 seeds. That equals the unweighted ablation's score on SCF 2022 and the CPS, and covers about half of the distance to it on SCF 2025. So the resample accounts for most of the unweighted ablation's lower AUC, which Address author review notes: harness as first application, plain-language pass, limitations #17 lists as unexplained.
  • Dollars. The measures change little and not in one direction. The variant's net-worth totals are 1.04 and 0.98 times the survey's, against 0.98 and 1.00.
  • Order of methods. Unchanged. The constrained hot deck keeps the lowest AUC. With two uses per donor, the variant Add a direct test of conditional fit within each survey #19 adds, it scores 0.563, 0.562 and 0.550, against 0.546, 0.552 and 0.522 with per-tree sampling.
  • Fixed donors. As shipped, the imputed 99th percentile of net worth lay more than 25% from its split's median in 11 of 120 fits (4 of 60 on the 2022 wave, 7 of 60 on the 2025 wave). With the variant it did so in none. The typical value is the same with either sampling.

What it does not change

Status of these results

These runs were made after the 2025 replication had been scored, and the text says so. The paper fixes no rule for them. In the diagnosis that preceded them, a rule written before the comparisons were read (twice the standard error, the same sign in 80% of seeds, and at least one standard deviation of the test's null) counted the classifier difference on the CPS only. The text gives sizes and seed counts and claims no more than that.

Checks

🤖 Generated with Claude Code

The estimator applies donor weights by resampling its donor rows once per
forest. This adds a diagnostic variant that samples by weight inside each
tree instead, and an experiment that holds the donors fixed and changes
only the estimator's seed.

- The variant (`populace_fit_per_tree`) is kept out of the method
  registry, so no sweep or existing table includes it. It runs when a
  command names it.
- `imp conditional-fit` runs it on the three survey tasks with the
  estimator as a control, into `runs/conditional-fit-*-per-tree`.
- `imp seed-stability` fixes an SCF donor split, imputes onto the
  population view's CPS receivers, and varies the estimator's seed.
- `imp tables` writes the panels of a new table, and refuses to unless
  the control's rows equal those of the conditional-fit runs.
- Section 5.8 reports the results. Sections 3.1, 3.2, 3.5, 6.1, 6.4, 6.5
  and the conclusion point to it.

No existing table changes, and the estimator the paper evaluates is
unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
juaristi22 and others added 2 commits November 27, 2026 16:35
Brings in the explanation of the constrained hot deck's lead and the
limitation on the hot decks' defaults. Both diagnostic variants now sit
in one `DIAGNOSTICS` table. Section 5.8 gains one sentence that sets the
per-tree variant beside the hot deck with two uses per donor.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Brings in the constrained hot deck's population-view runs and the text
that reports them. The PDF is rebuilt.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant