reject_unknown_coords#
- pymc_marketing.mmm.optimization_variables.reject_unknown_coords(da, coords, *, label)[source]#
Refuse coordinate labels the model does not have.
Split out of
align_to_model_coords()because the two halves of that function are wanted separately: every consumer must reject unknown labels, sincereindexdrops them silently and the input is then consumed positionally against a tensor that never saw them, but only some consumers can demand full coverage.MediaVariable.pack()is one exception – a plan may legitimately omit a cell that is masked out of the optimization, so it scopes its own missing-value check to the mask – andPowerPriceResponse.reference_spendanother: a cell it leaves out takes the reference derived from the fitted model.- Parameters:
- Raises:
ValueError – If the input carries coordinates the model does not have.