GPDataTerm#
- class pymc_marketing.terms_gp.GPDataTerm(*, var_name='date', name='hsgp', X_mid=None, dims=None, demeaned_basis=False, time_resolution=None)[source]#
Shared data lifecycle for GP terms.
Resolves the time reference
var_nameto a numeric index, registers it aspmd.Data, freezes the centering value (X_mid) at the first registration, and collects coordinates for the time dimension and any extra coefficient dims.var_namenames the time reference in the dataset and is read withds[var_name], which works for both coordinates and data variables. The numeric index is always registered aspmd.Dataunder{name}_index; useindex_varfor that name.Methods
GPDataTerm.__init__(*[, var_name, name, ...])Add coordinates to the model during
register_data.Build the GP curve through the wrapped HSGP class.
Collect coordinates from the time reference and extra dims.
GPDataTerm.named(name[, dims])Record this expression as a named deterministic model variable.
Register the numeric time index as
pmd.Dataand freezeX_mid.GPDataTerm.set_data(ds[, model])Update the shared time index for out-of-sample prediction.
GPDataTerm.sum(dim)Sum this expression over one named dimension.
Attributes
Dataset variables this term reads as shared data.
Dims beyond the time dimension.
Deterministics this term freezes for out-of-sample evaluation.
Name of this term's registered numeric index data variable.