products
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
self, df=None, hierarchy=None, *args, **kwargs) products.Dx(
Generic class for diagnostics
Methods
Name | Description |
---|---|
administer | Administer a testing product. |
administer
='dict') products.Dx.administer(uids, return_format
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
self, name=None, label=None, **kwargs) products.Product(
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
self, df=None, *args, **kwargs) products.Tx(
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
='dict') products.Tx.administer(uids, return_format
Loop over treatment states to determine those who are successfully treated and clear infection
Vx
self, diseases=None, *args, **kwargs) products.Vx(
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
self, **kwargs) products.simple_vx(
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 |