facebookexperimental / facebookexperimental/Robyn

Robyn Budget Allocator max_budget scenario should scale x_hist_carryover for accurate response simulation

未关闭
#1,014 2 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Jupyter Notebook
星标
1.5k
派生
433
PR 合并指标
30 天内没有已合并 PR

描述

## Project Robyn

## Describe issue
Simulated Adstock effect is wrongly calculated in max_budget scenario. The Adstock effect is not changed to reflect this budget change when simulated with a different budget. If I understand the code correctly.

The function [`objective.channel` in `eval_f`](https://github.com/facebookexperimental/Robyn/blob/main/R/R/allocator.R#L883-L891), which [calls `fx_objective.chanel`](https://github.com/facebookexperimental/Robyn/blob/main/R/R/allocator.R#L937-L953) calculates Adstock with: `xAdstocked <- x + mean(x_hist_carryover)`.
is used to calculate the response:
```R
optmResponseUnit <- -eval_f(optmSpendUnit)[["objective.channel"]]
```
https://github.com/facebookexperimental/Robyn/blob/main/R/R/allocator.R#L516

Due to using the mean, the number of weeks simulated does not matter. However, if the budget gets very small, the mean(x_hist_carryover)` part is much bigger than `x`, meaning the whole simulated response is dominated by historical carryover at a different budget level.

## Possible solution
Get the ratio: "mean historical spend" / "weekly budget" and multiply with the Adstock effect to scale the effect.
However, I'm not sure if this is accurate. It might be that the Adstock effect is different at different spend levels though.

## Environment & Robyn version
- Robyn version: 3.11.0

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。