fit_data_exponential_curve¶
-
fit_data_exponential_curve
(covid19_data: pandas.core.frame.DataFrame, parent_region: str, region: str, data_set: str = 'confirmed') → Dict[str, Union[lmfit.model.ModelResult, pandas.core.frame.DataFrame]][source]¶ Implementation of fit_data_model, with setting specific to the exponential curve model
- Parameters
covid19_data (pd.DataFrame) – Full covid19 data from a data_source
parent_region (str) – parent_region of the data which should be fitted, needs to be in covid19_region_data.parent_region
region (str) – region which data should be fired, needs to be in covid19_region_data.region
data_set (str, optional) – which subdata schold be fitted, need to be of value [“confirmed”, “recovered”, deaths], by default “confirmed”
- Returns
Result dict with keys “model_result” and “plot_data”.
- model_result: lmfit.model.ModelResult
result of the fit, with optimized parameters
- plot_data: pd.DataFrame
Same as covid19_region_data, but with an resetted index and and added fir result
- Return type
Dict[str, Union[lmfit.model.ModelResult, pd.DataFrame]]
See also
fit_data_model()