estimate_menten_parameters#
- pymc_marketing.mmm.utils.estimate_menten_parameters(channel, original_dataframe, contributions, **kwargs)[source]#
Estimate the parameters for the Michaelis-Menten function using curve fitting.
This function extracts the relevant data for the specified channel from both the original_dataframe and contributions DataArray resulting from the model. It then utilizes scipy’s curve_fit method to find the optimal parameters for an Menten function, aiming to minimize the least squares difference between the observed and predicted data.
- Parameters:
channel (str) – The name of the marketing channel for which parameters are to be estimated.
original_dataframe (Union[pd.DataFrame, Any]) – The original DataFrame containing the channel data.
contributions (xr.DataArray) – An xarray DataArray containing the contributions data, indexed by channel.
- Returns:
The estimated parameters of the extended sigmoid function.
- Return type:
List[float]