validate_planned_control_dates#

pymc_marketing.mmm.utils.validate_planned_control_dates(planned_dates, training_end, future_dates)[source]#

Check that planned controls only cover dates after the training data.

An optimization window keeps the observed controls wherever the training data reaches, so planned values apply only to the window dates after it.

Parameters:
  • planned_dates (DatetimeIndex) – Dates of the planned control values.

  • training_end (Timestamp) – Last date of the training data.

  • future_dates (DatetimeIndex) – The window dates after training_end, through the end of the carry-over.

Raises:

ValueError – If planned_dates includes a date up to training_end, or the window has no dates after it.