align_planned_controls#
- pymc_marketing.mmm.utils.align_planned_controls(planned, window_controls, future_dates)[source]#
Align planned control values to the window dates after training ends.
- Parameters:
planned (
DataArray) – Planned values, as returned byplanned_controls_to_dataarray().window_controls (
DataArray) – The window’s_controlvariable, fromcreate_zero_dataset().future_dates (
DatetimeIndex) – The window dates after the training data ends. Every one of them needs a value; other planned dates are ignored.
- Return type:
xr.DataArray- Returns:
The planned values on future_dates, in the dims and coordinate order of window_controls.
- Raises:
ValueError – If planned has dim labels the window does not, or no value (or NaN) on one of future_dates.