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
Tensor with dimensions
[..., n_media_channels]
. Batch dimensions (...)
are optional, but if batch dimensions are included, they must
match the batch dimensions of ec
.Methods
forward
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.


