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 (DataArray)

  • func (scikit-learn method to apply to the data)

  • dim_name (Name of the dimension to apply the function to)

  • combined (Flag to indicate if the data coords have been combined or not)

Return type:

xr.DataArray