utils#

Utility functions for the Marketing Mix Modeling module.

Functions

apply_sklearn_transformer_across_dim(data, ...)

Helper function in order to use scikit-learn functions with the xarray target.

compute_sigmoid_second_derivative(x, alpha, lam)

Compute the second derivative of the extended sigmoid function.

create_new_spend_data(spend, ...[, ...])

Create new spend data for the channel forward pass.

estimate_menten_parameters(channel, ...)

Estimate the parameters for the Michaelis-Menten function using curve fitting.

estimate_sigmoid_parameters(channel, ...)

Estimate the parameters for the sigmoid function using curve fitting.

find_sigmoid_inflection_point(alpha, lam)

Find the inflection point of the extended sigmoid function.

generate_fourier_modes(periods, n_order)

Generate Fourier modes.

sigmoid_saturation(x, alpha, lam)

type alpha:

float | ndarray | ndarray[Any, dtype[float64]]

standardize_scenarios_dict_keys(d, keywords)

Standardize the keys in a dictionary based on a list of keywords.