june.infection.transmission_xnexp¶
-
class
june.infection.transmission_xnexp.
TransmissionXNExp
(max_probability: float = 1.0, time_first_infectious: float = 2.6, norm_time: float = 1.0, n: float = 1.0, alpha: float = 5.0, max_symptoms: str = None, asymptomatic_infectious_factor: float = None, mild_infectious_factor: float = None)¶ Class that defines the time profile of the infectiousness to be of the form x^n exp(-x/alpha)
- max_probability:
value of the infectiousness at its peak. Used to control the number of super spreaders
- time_first_infectious:
time at which the person becomes infectious
- norm_time:
controls the definition of x, x = (time_from_infection - time-first_infectious)/norm_time
- n:
exponent of x in the x^n exp(-x/alpha) function
- alpha:
denominator in exponential
- max_symptoms:
maximum symptoms that the person will ever have, used to lower the infectiousness of asymptomatic and mild cases
- asymptomatic_infectious_factor:
multiplier that lowers the infectiousness of asymptomatic cases
- mild_infectious_factor:
multiplier that lowers the infectiousness of mild cases
-
__init__
(max_probability: float = 1.0, time_first_infectious: float = 2.6, norm_time: float = 1.0, n: float = 1.0, alpha: float = 5.0, max_symptoms: str = None, asymptomatic_infectious_factor: float = None, mild_infectious_factor: float = None)¶ Class that defines the time profile of the infectiousness to be of the form x^n exp(-x/alpha)
- max_probability:
value of the infectiousness at its peak. Used to control the number of super spreaders
- time_first_infectious:
time at which the person becomes infectious
- norm_time:
controls the definition of x, x = (time_from_infection - time-first_infectious)/norm_time
- n:
exponent of x in the x^n exp(-x/alpha) function
- alpha:
denominator in exponential
- max_symptoms:
maximum symptoms that the person will ever have, used to lower the infectiousness of asymptomatic and mild cases
- asymptomatic_infectious_factor:
multiplier that lowers the infectiousness of asymptomatic cases
- mild_infectious_factor:
multiplier that lowers the infectiousness of mild cases
-
_modify_infectiousness_for_symptoms
(max_symptoms: str, asymptomatic_infectious_factor, mild_infectious_factor)¶ Lowers the infectiousness of asymptomatic and mild cases, by modifying self.norm
- max_symptoms:
maximum symptom severity the person will ever have
-
classmethod
from_file
(time_first_infectious: float, n: float, alpha: float, max_symptoms: Optional[june.infection.symptom_tag.SymptomTag] = None, config_path: str = PosixPath('/home/sadie/JUNE/configs/defaults/transmission/XNExp.yaml')) → june.infection.transmission_xnexp.TransmissionXNExp¶ Generates transmission class from config file
- time_first_infectious:
time at which the person becomes infectious
- n:
exponent of x in the x^n exp(-x/alpha) function
- alpha:
denominator in exponential
- max_symptoms:
maximum symptoms that the person will ever have, used to lower the infectiousness of asymptomatic and mild cases
class instance
-
classmethod
from_file_linked_symptoms
(time_to_symptoms_onset: float, max_symptoms: Optional[june.infection.symptom_tag.SymptomTag] = None, config_path: str = PosixPath('/home/sadie/JUNE/configs/defaults/transmission/XNExp.yaml')) → june.infection.transmission_xnexp.TransmissionXNExp¶ Generates transmission class from config file
- time_first_infectious:
time at which the person becomes infectious
- n:
exponent of x in the x^n exp(-x/alpha) function
- alpha:
denominator in exponential
- max_symptoms:
maximum symptoms that the person will ever have, used to lower the infectiousness of asymptomatic and mild cases
class instance
-
classmethod
object_from_config
()¶ Loads the default Transmission class from the general.ini config file and returns the class as object (not as an instance). This is used to set up the epidemiology model in world.py via configs if an input is not provided.
-
update_infection_probability
(time_from_infection: float)¶ Performs a probability update given time from infection
- time_from_infection:
time elapsed since person became infected (in days).
-
alpha
¶
-
n
¶
-
norm
¶
-
norm_time
¶
-
probability
¶
-
time_first_infectious
¶
-
june.infection.transmission_xnexp.
update_probability
(time_from_infection: float, time_first_infectious: float, norm: float, norm_time: float, alpha: float, n: float) → float¶ Determines how the infectiousness profile is updated over time
- time_from_infection:
time from infection
- time_first_infectious:
time from infection at which the person becomes infectious
- norm:
multiplier to the infectiousness profile
- norm_time:
controls the definition of tau
- alpha:
demominator in exponential for xnexp function
- n:
exponent of x in xnexp
Value of infectiousness at time
-
june.infection.transmission_xnexp.
xnexp
(x: float, n: float, alpha: float) → float¶ Implementation of x^n exp(-x/alpha)
- x:
x variable
- n:
exponent of x
- alpha:
denominator in exponential
evaluation fo xnexp function