apply_sklearn_transformer_across_dim#

pymc_marketing.mmm.utils.apply_sklearn_transformer_across_dim(data, func, dim_name, combined=False)[source]#

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

Parameters:
data
funcscikit-learn method to apply to the data
dim_nameName of the dimension to apply the function to
combinedFlag to indicate if the data coords have been combined or not
Returns:
xr.DataArray