Views
No views yet
q gives calibrated predictive
intervals in addition to a point (median) estimate.| Model | Predictor | Target |
|---|---|---|
hbr_y9-eir | hbr_y9 | eir |
prev_y9-eir | prev_y9 | eir |
eir-hbr_y9 | eir | hbr_y9 |
| Position | Name | Notes |
|---|---|---|
| 0 | <predictor> | eir, prev_y9, or hbr_y9 — whichever the model is keyed on |
| 1 | dn0_use | |
| 2 | Q0 | |
| 3 | phi_bednets | |
| 4 | seasonal | |
| 5 | itn_use | |
| 6 | irs_use |
hbr_y9-eir expects
hbr_y9, dn0_use, Q0, phi_bednets, seasonal, itn_use, irs_use.1from estimint.v2.models.rqs import ConditionalRQS
2
3# from a local export directory
4artifact = ConditionalRQS.from_pretrained("artifacts/hbr_y9-eir", predictor="hbr_y9", target="eir")
5
6# from this Hub repo
7artifact = ConditionalRQS.from_pretrained("<org>/<repo>", predictor="hbr_y9", target="eir")
8
9X_raw = [
10 {"hbr_y9": 12.4, "dn0_use": 0.5, "Q0": 0.92, "phi_bednets": 0.80,
11 "seasonal": 0, "itn_use": 0.40, "irs_use": 0.00},
12 {"hbr_y9": 3.1, "dn0_use": 0.3, "Q0": 0.90, "phi_bednets": 0.70,
13 "seasonal": 1, "itn_use": 0.20, "irs_use": 0.10},
14]
15
16artifact.predict(X_raw) # median prediction, shape (2,)
17artifact.quantile(X_raw, 0.9) # single quantile
18artifact.interval(X_raw, alpha=0.10) # (lower, upper) 90% predictive intervalX_raw may be:(batch, 7) array of raw values, already in the order above.interval() currently returns the raw [alpha/2, 1-alpha/2] quantile
band; the conformal calibration offset computed during training is not yet
carried over to exported artifacts, so intervals from from_pretrained models
are not conformally corrected.