加入新推出的
Discord 社区,展开实时讨论,获得同行支持,并直接与 Meridian 团队互动!
meridian.model.adstock_hill.HillTransformer
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
用于计算媒体的 Hill 转换的类。
继承自:AdstockHillTransformer
meridian.model.adstock_hill.HillTransformer(
ec: tf.Tensor, slope: tf.Tensor
)
实参 |
ec
|
维度为 [..., n_media_channels] 的张量。批次维度 (...) 是可选的,但如果包含批次维度,它们必须与 ec 的批次维度保持一致。
|
slope
|
维度为 [..., n_media_channels] 的张量。批次维度 (...) 是可选的,但如果包含批次维度,它们必须与 slope 的批次维度保持一致。
|
方法
forward
查看源代码
forward(
media: tf.Tensor
) -> tf.Tensor
计算给定 media
张量的 Hill 转换。
计算 Hill 函数的结果,该函数考虑了媒体效应的递减回报。
实参 |
media
|
维度为 [..., n_geos, n_media_times,
n_media_channels] 的张量。批次维度 (...) 是可选的,但如果包含批次维度,它们必须与 slope 和 ec 的批次维度保持一致。即使 slope 和 ec 包含批次维度,media 也并非必须包含批次维度。
|
返回结果 |
维度为 [..., n_geos, n_media_times, n_media_channels] 的张量,表示经过 Hill 转换的媒体。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-01-25。
[null,null,["最后更新时间 (UTC):2025-01-25。"],[],["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,[]]