Map continuous probabilities to discrete intervention tiers. A tier definition is an ordered list (highest risk first) of
list(name =, top_fraction =), where top_fraction is the CUMULATIVE share of the reference population in that tier or above;
the last tier takes the rest. list(list(name = "high", top_fraction = 0.10), list(name = "standard")) means "the riskiest 10%
get the nurse transition call". Freeze the cut-points from a reference set (e.g. validation-period scores): re-fitting on each
batch would hide drift. Mirror of Python omop_etl.risk_tiers.
Usage
fit_capacity_thresholds(reference_prob, tiers)
map_risk_tiers(prob, thresholds, as_category = FALSE)
tier_load(prob, thresholds, capacity = NULL, periods = 1)Arguments
- reference_prob
Reference probabilities in
[0, 1].- tiers
Ordered list of
list(name =, top_fraction =), the last withouttop_fraction.- prob
Probabilities in
[0, 1].- thresholds
list(list(name =, min =), ...)in any order (fromfit_capacity_thresholds()or a bundle'srisk_tiers). Tiers are[min, next_min)and the lowest must start at 0.- as_category
Return an ordered factor (lowest tier first) instead of a character vector.
- capacity
Optional named numeric: cases per period each tier's team can handle.
- periods
Number of days/weeks covered by
prob.
