Skip to content

Integrate all estimators#1

Merged
absternator merged 30 commits into
masterfrom
integrate-all-estimators
Jun 26, 2026
Merged

Integrate all estimators#1
absternator merged 30 commits into
masterfrom
integrate-all-estimators

Conversation

@CosmoNaught

Copy link
Copy Markdown
Collaborator

estiMINT v1.4.0 — integrate all estimators

  • estiMINT is now the single home for all estimators: prevalence to EIR HBR to/from EIR bednet to dn0
  • Ported the bednet to dn0 mapping from minte (calculate_dn0, net_types)
  • Consolidated training data into one source (datasets/estimint_simulations_y9.parquet) built from the raw DuckDBs via models/consolidate.py
  • Verified a retrain reproduces the shipped EIR/HBR models 1:1
  • Restructured dev pipeline into two model folders (models/prevalence, models/hbr); removed output/ and the old scripts/
  • Deterministic data prep (filter + sort) — no row-order replay
  • Deps: add pyarrow, scipy
  • Version bump 1.3.1 to 1.4.0

CosmoNaught and others added 2 commits June 23, 2026 11:36
Single consolidated data source, two model folders, bednet->dn0 ported from minte.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@absternator absternator left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice works looks very good having it all here. just left ya some comments. Also thank you for the tests they are very helpfull.

If anything may take too long dw about it now can clean up later

  • Q - have you tried a local build and see its working?

  • For a python project having a src/estimint folder is a bit odd. if its easy id remove the src outer folder... so then you can do easy module runs like python -m estimint. plotting

  • models folder shoud probs be in estimint folder

  • noticed a decent amount of unused imports can those be cleanup up please

  • is train.py in src/estimint old now? thus deletable?

Comment thread .github/workflows/publish.yml Outdated
Comment thread .github/workflows/tests.yml
Comment thread .github/workflows/tests.yml Outdated
Comment thread .github/workflows/tests.yml
Comment thread .github/workflows/publish.yml
Comment thread pyproject.toml Outdated
Comment thread README.md
Comment thread datasets/README.md Outdated
Comment thread models/hbr/train_eir_to_hbr.py Outdated
Comment thread README.md Outdated

scenarios = [
dict(name="PBO nets, prevalence input, 60% more mosquitoes",
input="prevalence", value=0.30,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why is input param needed? how would mint web call this?

Comment thread src/estimint/scenarios.py
Comment thread src/estimint/scenarios.py
if not _MODELS:
_MODELS["prevalence"] = load_xgb_model("prevalence")
_MODELS["hbr"] = load_xgb_model("hbr")
return _MODELS

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

may as well add the other one "eir_to_hbr". and then when estimate_eir_with_mosquito_delta is called can get passed into it

Comment thread src/estimint/scenarios.py Outdated
delta = scn.get("mosquito_delta")
if delta is not None and mode == "prevalence":
r = estimate_eir_with_mosquito_delta(prevalence=value, mosquito_delta=delta, **feats)
eir_final, hbr_baseline, hbr_new = r["eir_new"], r["hbr_baseline"], r["hbr_new"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if mode is prevalence on line 65 thats a wasted run. beacuse it dosent get used. we actually should get eir baseline from here. so this should come first before that as an if statemebt value

Comment thread src/estimint/scenarios.py Outdated
cov = dict(eir=eir_final, dn0_use=dn0_use, dn0_future=dn0_use, Q0=Q0, phi_bednets=phi,
seasonal=seasonal, routine=0.0, itn_use=itn_use, irs_use=irs_use,
itn_future=itn_use, irs_future=irs_use, lsm=lsm)
row = dict(name=scn.get("name"), input_mode=mode, net=net or "none",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this row return needed? its not used at all

Comment thread .github/workflows/publish.yml Outdated
Comment thread src/estimint/scenarios.py Outdated
@absternator

Copy link
Copy Markdown
Contributor

can you also please make the variable names a bit more descreptive. its hard for me to follow code because of naming please

Comment thread models/hbr/prepare.py Outdated
Comment thread src/estimint/scenarios.py Outdated
) -> pd.DataFrame:
"""Run scenarios end-to-end (estiMINT EIR -> stateMINT emulator) -> DataFrame.

Each scenario: input ("prevalence"|"hbr"|"eir") + value; Q0, phi_bednets, seasonal,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the input param as stated is a bit odd since its the full pipeline run... if you think people will use full pipeline with hbr, eir then leave. else just default to all being prevalence (hence removing it and cleanup if statements)

Comment thread src/estimint/scenarios.py Outdated
Comment thread src/estimint/scenarios.py Outdated
Comment thread src/estimint/scenarios.py Outdated
Comment thread src/estimint/scenarios.py Outdated
Comment thread src/estimint/scenarios.py Outdated
Comment thread src/estimint/scenarios.py Outdated
Comment thread src/estimint/scenarios.py Outdated
Comment thread src/estimint/scenarios.py Outdated
CosmoNaught and others added 5 commits June 25, 2026 15:32
The publish workflow bumped pyproject.toml to 1.4.3 then 1.4.4 without
regenerating the lockfile, so uv.lock still pinned estimint 1.4.2. CI runs
`uv sync --locked`, which aborts when the lockfile is stale -- failing the
tests job before any test could run. Regenerated with the CI-pinned uv 0.11.18.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replaces the manual "verbump" edit (which bumped pyproject.toml but left
uv.lock stale, breaking `uv sync --locked` in CI). The script runs
`uv version --bump`, which rewrites pyproject.toml and uv.lock together,
then commits and tags. Pushing the tag stays a manual step since it
triggers the irreversible PyPI publish.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@absternator absternator merged commit 49cb57c into master Jun 26, 2026
3 checks passed
@absternator absternator deleted the integrate-all-estimators branch June 26, 2026 08:12
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