data_vars#
- pymc_marketing.terms.data_vars(param)[source]#
List the dataset variables a term tree reads, at any depth.
A term that reads shared data declares it through
ModelTerm.data_vars(Dotdeclares the variable it wraps). This walks compositions and term wrappers such asNamedandTransform, so a covariate nested inside a recipe is still found. Order is first-seen and names are unique.- Parameters:
param (
Any) – The term tree to inspect.- Return type:
- Returns:
Names of the dataset variables the tree reads.
Examples
recipe = Parameter( "p_base", prior=Prior("Beta", alpha=1.5, beta=20) ) * Transform(Dot(var_name="market_size", prior=Prior("Normal")), ptx.math.exp) data_vars(recipe) # ['market_size']