Liking cljdoc? Tell your friends :D

org.replikativ.marketing.model

An additive MMM with finite geometric adstock and selectable media response.

A model owns its fixed channel layout, scaling and compiled numerical block. Observations and experimental contrasts are runtime inputs. Default priors: alpha ~ Beta(2,2), beta ~ HalfNormal(1), lambda ~ Gamma(3,rate=1), intercept ~ Normal(0,1), sigma ~ HalfNormal(0.5), controls ~ Normal(0,1).

An additive MMM with finite geometric adstock and selectable media response.

A model owns its fixed channel layout, scaling and compiled numerical block.
Observations and experimental contrasts are runtime inputs. Default priors: alpha ~ Beta(2,2), beta ~ HalfNormal(1), lambda ~ Gamma(3,rate=1),
intercept ~ Normal(0,1), sigma ~ HalfNormal(0.5), controls ~ Normal(0,1).
raw docstring

buildclj

(build prepared)
(build prepared
       {:keys [density-kernel gradient-parameter-layout data-layout]
        :or {density-kernel :lagged
             gradient-parameter-layout :auto
             data-layout :auto}})

Compile a prepared model. :data-layout :auto retains the qualified split ABI for small models and packs larger inputs; :packed removes the public arity cap.

Compile a prepared model. :data-layout :auto retains the qualified split ABI
for small models and packs larger inputs; :packed removes the public arity cap.
sourceraw docstring

control-namesclj

(control-names spec)

Control column names of a specification: :controls followed by any generated seasonality columns.

Control column names of a specification: `:controls` followed by any
generated seasonality columns.
sourceraw docstring

inference-blockclj

(inference-block model backend)

The requested gradient backend. AOT compilation is cached per built model.

The requested gradient backend. AOT compilation is cached per built model.
sourceraw docstring

initial-positionclj

(initial-position model)

A finite unconstrained starting position; init is not a prior draw.

A finite unconstrained starting position; init is not a prior draw.
sourceraw docstring

mean-responseclj

(mean-response model theta)

Conditional mean in original target units at natural parameter values.

Conditional mean in original target units at natural parameter values.
sourceraw docstring

pointwise-log-likelihoodclj

(pointwise-log-likelihood model theta)

Original-unit observation log densities, excluding priors and experiments.

Original-unit observation log densities, excluding priors and experiments.
sourceraw docstring

prepareclj

(prepare spec
         {:keys [x y controls lift dates time-index] :or {lift []} :as data})

Prepare row-major business-unit :x, :y, optional :controls and :lift rows. Lift rows describe effective-spend contrasts, not arbitrary experiment totals. Missing or nonfinite data are rejected; missing spend is never inferred as zero.

Prepare row-major business-unit :x, :y, optional :controls and :lift rows.
Lift rows describe effective-spend contrasts, not arbitrary experiment totals.
Missing or nonfinite data are rejected; missing spend is never inferred as zero.
sourceraw docstring

prior-specclj

Default priors by parameter group, in scaled model coordinates.

Default priors by parameter group, in scaled model coordinates.
sourceraw docstring

specificationclj

(specification {:keys [channels controls l-max scaling priors likelihood
                       seasonality saturation]
                :or {controls [] l-max 6}
                :as opts})

Validate a fixed layout and positive business-unit scaling constants. :channels is required. :saturation is :logistic (default), :none or :michaelis-menten; :none uses beta * normalized-adstock and has no lambda parameter/prior.

Validate a fixed layout and positive business-unit scaling constants.
`:channels` is required. `:saturation` is :logistic (default), :none or :michaelis-menten;
:none uses beta * normalized-adstock and has no lambda parameter/prior.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close