MMMIDataWrapper.get_channel_scale#

MMMIDataWrapper.get_channel_scale()[fuente]#

Get channel scaling factor used during model fitting.

Returns:
xr.DataArray

Channel scale values with dims matching channel dimensions. Typically has dims like («channel»,) for simple models or («country», «channel») for panel models.

Raises:
ValueError

If channel_scale not found in constant_data

Examples

>>> channel_scale = mmm.data.get_channel_scale()
>>> # Convert original scale value to scaled space
>>> max_scaled = 1000 / float(channel_scale.mean())