Join the newly launched
Discord community for real-time discussions, peer support, and direct interaction with the Meridian team!
meridian.model.adstock_hill.HillTransformer
Stay organized with collections
Save and categorize content based on your preferences.
Class to compute the Hill transformation of media.
Inherits From: AdstockHillTransformer
meridian.model.adstock_hill.HillTransformer(
ec: meridian.backend.Tensor
,
slope: meridian.backend.Tensor
)
Args |
ec
|
Tensor with dimensions [..., n_media_channels] . Batch dimensions
(...) are optional, but if batch dimensions are included, they must
match the batch dimensions of ec .
|
slope
|
Tensor with dimensions [..., n_media_channels] . Batch dimensions
(...) are optional, but if batch dimensions are included, they must
match the batch dimensions of slope .
|
Methods
forward
View source
forward(
media: meridian.backend.Tensor
) -> meridian.backend.Tensor
Computes the Hill transformation of a given media
tensor.
Calculates results for the Hill function, which accounts for the diminishing
returns of media effects.
Args |
media
|
Tensor with dimensions [..., n_geos, n_media_times,
n_media_channels] . Batch dimensions (...) are optional, but if batch
dimensions are included, they must match the batch dimensions of slope
and ec . Media is not required to have batch dimensions even if slope
and ec contain batch dimensions.
|
Returns |
Tensor with dimensions [..., n_geos, n_media_times, n_media_channels]
representing Hill-transformed media.
|
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-09-05 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-09-05 UTC."],[],["The `HillTransformer` class computes the Hill transformation of media data, accounting for diminishing returns. It takes two main tensors as input: `ec` and `slope`, both with optional batch dimensions matching each other. The `forward` method applies the Hill function to a `media` tensor, which may include batch, geo, time, and media channel dimensions. This method returns a tensor with the same geo, time, and media channel dimensions as the input, representing the Hill-transformed media.\n"],null,[]]