washingtonpost / elex-live-model

a model to generate estimates of the number of outstanding votes on an election night based on the current results of the race
48 stars 5 forks source link

Conformal bootstrap model #76

Closed lennybronner closed 1 year ago

lennybronner commented 1 year ago

Description

This is a work in progress PR for the new bootstrap election model. This should hopefully start the code review process,

Things that still need happen:

  1. here are a few changes in the data handlers that will be superseded by the Estimandizer and I'll make sure to replace the code.
  2. continue adding unit tests
  3. merging new OLS/QR from elex-solver
  4. Finalize last model decisions

I would recommend reading the code to try and understand the new model alongside the technical walkthrough posted on the insights channel.

Jira Ticket

https://arcpublishing.atlassian.net/browse/ELEX-2677

Test Steps

Make sure you're on the corresponding branch in elex-solver, so in that repo do:

git pull
git checkout elex-2771-update-quantile-regression

Then in the elex-model repo after checking out this branch:

pip install {path to elex-solver}
elexmodel 2020-11-03_USA_G --office_id=P --estimands=margin --geographic_unit_type=county --pi_method=bootstrap --percent_reporting=30 --aggregates=postal_code --features=baseline_normalized_margin --fixed_effects=county_classification

This should also work from the bootstrap_model_testbed branch in the testbed repo.