sid.virus_strains¶
Module Contents¶
Functions¶
|
Prepare the information on virus strains and factors for infectiousness. |
|
Combine factorized infections where the first has precedence. |
|
Convert factorized infections with virus strains to a categorical. |
|
Factorize multiple boolean or categorical infections. |
|
Factorize boolean or categorical infections. |
|
Factorize boolean infection. |
|
Factorize a categorical variable indicating virus strains. |
-
prepare_virus_strain_factors(virus_strains: Dict[str, List[str]], params: pd.DataFrame) → Dict[str, Union[List[str], np.ndarray]][source]¶ Prepare the information on virus strains and factors for infectiousness.
This function recreates the dictionary to not change the original value in partialed function and adds the factors.
-
combine_first_factorized_infections(first: np.ndarray, second: np.ndarray) → np.ndarray[source]¶ Combine factorized infections where the first has precedence.
-
categorize_factorized_infections(factorized_infections: Union[pd.Series, np.ndarray], virus_strains: Dict[str, Any]) → pd.Series[source]¶ Convert factorized infections with virus strains to a categorical.
-
factorize_initial_infections(infections: pd.DataFrame, virus_strains: Dict[str, Any]) → pd.DataFrame[source]¶ Factorize multiple boolean or categorical infections.
-
factorize_boolean_or_categorical_infections(infections, virus_strains)[source]¶ Factorize boolean or categorical infections.