WeeklyFourier#

pydantic model pymc_marketing.mmm.fourier.WeeklyFourier[source]#

Weekly fourier seasonality.

(Source code, png, hires.png, pdf)

../../_images/pymc_marketing-mmm-fourier-WeeklyFourier-1.png
n_orderint

Number of fourier modes to use.

prefixstr, optional

Alternative prefix for the fourier seasonality, by default None or “fourier”

priorPrior | VariableFactory, optional

Prior distribution or VariableFactory for the fourier seasonality beta parameters, by default Prior("Laplace", mu=0, b=1)

namestr, optional

Name of the variable that multiplies the fourier modes, by default None

variable_namestr, optional

Name of the variable that multiplies the fourier modes, by default None

Methods

WeeklyFourier.__init__(**data)

Create a new model by parsing and validating input data from keyword arguments.

WeeklyFourier.apply(dayofperiod[, sum])

Apply fourier seasonality to day of year.

WeeklyFourier.from_dict(data)

Deserialize the Fourier seasonality.

WeeklyFourier.get_default_start_date([...])

Get the start date for the Fourier curve.

WeeklyFourier.plot_curve(curve[, n_samples, ...])

Plot the seasonality for one full period.

WeeklyFourier.plot_curve_hdi(curve[, ...])

Plot full period of the fourier seasonality.

WeeklyFourier.plot_curve_samples(curve[, n, ...])

Plot samples from the curve.

WeeklyFourier.sample_curve(parameters[, ...])

Create full period of the Fourier seasonality.

WeeklyFourier.sample_prior([coords])

Sample the prior distributions.

WeeklyFourier.serialize_prior()

Serialize the prior distribution.

WeeklyFourier.to_dict([_orig])

Serialize the Fourier seasonality.

field days_in_period: float = 7[source]#
field n_order: int [Required][source]#
Constraints:
  • gt = 0

field prefix: str = 'fourier'[source]#
field prior: InstanceOf[Prior] | InstanceOf[VariableFactory] = Prior("Laplace", mu=0, b=1)[source]#
field variable_name: str | None = None[source]#