Join the newly launched Discord
community for real-time discussions, peer support, and direct interaction with the Meridian team!
meridian.model.context.ModelContext Stay organized with collections
Save and categorize content based on your preferences.
Model context for Meridian.
meridian
.
model
.
context
.
ModelContext
(
input_data
:
meridian
.
data
.
input_data
.
InputData
,
model_spec
:
meridian
.
model
.
spec
.
ModelSpec
)
This class contains all model parameters that do not change between the runs
of Meridian.
Returns AdstockDecaySpec
object with correctly mapped channels.
Returns the index of the baseline geo.
Returns a CenteringAndScalingTransformer
for controls, if it exists.
Returns a CenteringAndScalingTransformer
for non-media treatments.
non_media_treatments_normalized
Normalized non-media treatments.
The non-media treatments values are scaled by population (for channels where non_media_population_scaling_id
is True
) and normalized by centering and
scaling with means and standard deviations.
Returns broadcasted PriorDistribution
object.
unique_sigma_for_each_geo
Methods
populate_cached_properties
View source
populate_cached_properties
()
Eagerly activates all cached properties.
This is useful for creating a tf.function
computation graph with this
Meridian object as part of a captured closure. Within the computation graph,
internal state mutations are problematic, and so this method freezes the
object's states before the computation graph is created.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-12-09 UTC."],[],[]]