products
Define products
Classes
| Name | Description |
|---|---|
| Dx | Generic class for diagnostics |
| Product | Generic product implementation |
| Tx | Treatment products change fundamental properties about People, including their prognoses and infectiousness. |
| Vx | Vaccine product |
| simple_vx | Create a simple vaccine product that affects the probability of infection. |
Dx
products.Dx(df=None, hierarchy=None, *args, **kwargs)Generic class for diagnostics
Methods
| Name | Description |
|---|---|
| administer | Administer a testing product. |
administer
products.Dx.administer(uids, return_format='dict')Administer a testing product.
Returns:
if return_format=='array': an array of length len(inds) with integer entries that map each person to one of the result_states
if return_format=='dict': a dictionary keyed by result_states with values containing the indices of people classified into this state
Product
products.Product(name=None, label=None, **kwargs)Generic product implementation
Methods
| Name | Description |
|---|---|
| administer | Adminster a Product - implemented by derived classes |
administer
products.Product.administer(uids)Adminster a Product - implemented by derived classes
Tx
products.Tx(df=None, *args, **kwargs)Treatment products change fundamental properties about People, including their prognoses and infectiousness.
Methods
| Name | Description |
|---|---|
| administer | Loop over treatment states to determine those who are successfully treated and clear infection |
administer
products.Tx.administer(uids, return_format='dict')Loop over treatment states to determine those who are successfully treated and clear infection
Vx
products.Vx(diseases=None, *args, **kwargs)Vaccine product
Methods
| Name | Description |
|---|---|
| administer | Apply the vaccine to the requested uids. |
administer
products.Vx.administer(uids)Apply the vaccine to the requested uids.
simple_vx
products.simple_vx(**kwargs)Create a simple vaccine product that affects the probability of infection.
The vaccine can be either “leaky”, in which everyone who receives the vaccine receives the same amount of protection (specified by the efficacy parameter) each time they are exposed to an infection. The alternative (leaky=False) is that the efficacy is the probability that the vaccine “takes”, in which case that person is 100% protected (and the remaining people are 0% protected).
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| efficacy | float | efficacy of the vaccine (0<=efficacy<=1) | required |
| disease | int / str / list | the disease to modify (if None, modify all) | required |
| leaky | bool | see above | required |