Transmission model
GET
https://api.ai4mproject.com/v1/transmission/modelScope: risk_scoresReturns a compartmental transmission model fitted to monthly reported malaria cases in Kwara, Nasarawa and Zamfara, the three states with public monthly data.
Parameters
Section titled “Parameters”None.
Request
Section titled “Request”curl "https://api.ai4mproject.com/v1/transmission/model" \ -H "Authorization: Bearer $AI4M_API_KEY"model = client.get_transmission_model()for state in model["states"]: print(state["state"], state["months_with_infection_growing"])const model = await client.getTransmissionModel();for (const state of model.states) { console.log(state.state, state.months_with_infection_growing);}model, err := client.TransmissionModel(ctx)if err != nil { log.Fatal(err)}fmt.Println(model["status"], model["limits"])Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
status |
string | Always research |
assumed |
object | The two durations the model assumes, in months: how long an infection stays infectious and how long immunity lasts |
states[].state_code, state |
string | The state |
states[].fit_correlation |
number | Correlation of the fitted model with reported cases, 2015 to 2023 |
states[].months_with_infection_growing |
integer[] | Months in which each infection leads to more than one new infection |
states[].reproduction_number_by_month |
number[] | New infections per infection, for January to December. Above 1, infection is growing |
states[].share_of_transmission_year_round |
number | Share of transmission that does not depend on the season, from 0 to 1 |
states[].series[] |
array | Monthly reported and modelled confirmed cases per 1,000 people, by period |
projection_test |
object | Mean error, in cases per 1,000, projecting a year ahead, against two simple methods. held_back is a year scored once, after the design was fixed |
limits |
string[] | What the model does not show |
{ "status": "research", "assumed": { "infectious_months": 2, "immune_months": 12 }, "states": [ { "state_code": "KW", "state": "Kwara", "fit_correlation": 0.867, "months_with_infection_growing": [ 4, 5, 6, 7, 8, 9 ], "reproduction_number_by_month": [ 0.931, 0.943, 0.974, 1.029, 1.091, 1.133, 1.092, 1.042, 1.006, 0.943, 0.897, 0.912 ], "share_of_transmission_year_round": 0.78, "series": [ { "period": "2015-01", "reported": 0.01, "modelled": 0.09 }, { "period": "2015-02", "reported": 0.54, "modelled": 0.29 } ] } ], "projection_test": { "development_years": [ 2021, 2022, 2023 ], "development": { "months": 108, "mean_absolute_error": { "model": 4.02, "same_month_last_year": 4.66, "same_month_last_three_years": 3.95 }, "seasonal_shape_correlation": 0.76 }, "held_back_year": 2024, "held_back": { "months": 36, "mean_absolute_error": { "model": 4.94, "same_month_last_year": 6.25, "same_month_last_three_years": 4.74 }, "seasonal_shape_correlation": 0.81 } }, "limits": [ "Fitted to state totals in three states; it says nothing about other states or about LGAs.", "Reported cases rise with testing and reporting as well as with infection.", "It assumes how long an infection and immunity last; no mosquito data is used.", "A year ahead it is level with a three-year seasonal average, not better." ]}The example shows one of the three states and the first two months of its series.
Errors
Section titled “Errors”| Code | Status | When |
|---|---|---|
SCOPE_REQUIRED |
403 | The key does not include the scope this endpoint needs |
TRANSMISSION_DATA_UNAVAILABLE |
503 | The transmission data has not been loaded on the server |
Any request can also return 401 for a bad key and 429 when a limit is reached. See Errors.