MMMIDataWrapper.get_channel_scale#
- MMMIDataWrapper.get_channel_scale()[source]#
Get channel scaling factor used during model fitting.
- Returns:
xr.DataArrayChannel scale values with dims matching channel dimensions. Typically has dims like (“channel”,) for simple models or (“country”, “channel”) for panel models.
- Raises:
ValueErrorIf 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())