facebookexperimental / facebookexperimental/Robyn

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

Đang mở
#1,014 2 bình luận 2 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Jupyter Notebook
Star
1.5k
Fork
433
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.