ModelTerm#
- class pymc_marketing.terms.ModelTerm[source]#
Base class for composable model terms.
Subclass
ModelTermto define reusable PyMC subgraph recipes. Custom terms compose with the built-ins (Parameter,Intercept,Dot,Transform) via+,*, and-and use the same helpers (collect_coords,register_data,build_param,set_data) — no framework changes required. See the module docstring Extending section for the full contract and an example.Methods
Add coordinates to the model during
register_data.Build the term's tensor contribution.
Return coordinates needed for this term.
Register shared data variables as
pmd.Data.ModelTerm.set_data(ds[, model])Update shared data variables for out-of-sample prediction.