fit_subsets¶
-
fit_subsets
(fit_function: Callable, covid19_data: pandas.core.frame.DataFrame, row: pandas.core.series.Series, subsets: Iterable, data_source: str, fit_func_kwargs: dict = {}) → Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame][source]¶ Function to fit the subsets of a regional covid data
- Parameters
fit_function (Callable) – Implementation of a model with fit_data_model
covid19_data (pd.DataFrame) – Full covid19 data from a data_source
row (pd.Series) – Row of of a dataframe only containing unique value pairs for “region” and “parent_region”
subsets (Iterable) – Iterable of subset names
data_source (str) – name of the data source, only needed to print debug information
fit_func_kwargs (dict, optional) – Additional kwargs passed to fit_function, by default {}
- Returns
fitted_region_plot_data, fitted_param_subset
- fitted_region_plot_data:
actual fitted data, which can be used for plotting
- fitted_param_subset:
fit parameters for a region
- Return type
Tuple[pd.DataFrame, pd.DataFrame]
See also