fit_data_logistic_curve

fit_data_logistic_curve(covid19_data: pandas.core.frame.DataFrame, parent_region: str, region: str, data_set: str = 'confirmed', sigma: Union[int, float] = 5) → Dict[str, Union[lmfit.model.ModelResult, pandas.core.frame.DataFrame]][source]

Implementation of fit_data_model, with setting specific to the logistic 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 fitted, 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”

  • sigma (int, optional) – initial value for the parameter ‘sigma’ of the logistic curve model, by default 14

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()