Virtual bioreactor fitting

Function to create and fit virtual bioreactor simulation models to data. It uses optimization algorithms to minimize the difference between the model predictions and the experimental data. Here there are more fitting options compared to the clone model fitting, and will use all available data to fit the model.

bioreactormodelling.biosim.new_vb_fit.fit_reactor_model(data: DataFrame, column_map: ColumnMapping, fit_config: FitConfiguration, feed_compositions: list[Feed] | None = None, metabolic_rates: DataFrame | None = None, user_defined_growth_factor: Callable[[float, dict[str, float], dict[str, float], dict[str, float]], float] | None = None)

Fit a bioreactor model to the data

Parameters:
  • data (pandas.DataFrame. The data to fit the model to)

  • column_map (ColumnMapping. The mapping of the columns in the data to the model variables)

  • fit_config (FitConfiguration. The configuration for the fitting)

  • feed_compositions (list[Feed], optional. The feed compositions, by default None)

  • metabolic_rates (pandas.DataFrame, optional. The metabolic rates, by default None)

  • user_defined_growth_factor (GrowthFactorFunction, optional. A user defined growth factor function, by default None)

Returns:

  • model_parameters (dict)

  • The fitted model parameters

  • productivity (dict)

  • The fitted productivity parameters

  • fit_statistics (dict)

  • The statistics of the fit

  • simulated_data (pandas.DataFrame)

  • The simulated data using the fitted parameters