Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fit separate model for contest #117

Merged
merged 6 commits into from
Oct 27, 2024
Merged

Conversation

lennybronner
Copy link
Collaborator

Description

We add a parameter where we can pass in states for which we fit a separate intercept and separate params. ie. this would be useful if a specific state is swinging in a different direction than all the others (ie. Florida in 2022) but don't want to blocklist the entire state because we still want to fit a model for it.

Jira Ticket

Test Steps

elexmodel 2020-11-03_USA_G --estimands=margin --office_id=P --geographic_unit_type=county --pi_method bootstrap --features baseline_normalized_margin --percent_reporting 20 --model_parameters "{'contests_for_separate_model': ['FL', 'GA']}"

@lennybronner lennybronner requested a review from a team as a code owner October 23, 2024 23:55
@dmnapolitano dmnapolitano self-assigned this Oct 24, 2024
Copy link
Contributor

@dmnapolitano dmnapolitano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!! 🎉 🎉

src/elexmodel/handlers/data/Featurizer.py Outdated Show resolved Hide resolved
@lennybronner lennybronner merged commit 787a136 into develop Oct 27, 2024
3 checks passed
@lennybronner lennybronner deleted the fit-separate-model-for-contest branch October 27, 2024 13:51
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.

2 participants