Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh generates a completely new model #1082

Closed
CMoranoA opened this issue Oct 22, 2024 · 1 comment
Closed

Refresh generates a completely new model #1082

CMoranoA opened this issue Oct 22, 2024 · 1 comment

Comments

@CMoranoA
Copy link

CMoranoA commented Oct 22, 2024

Project Robyn

Describe issue

I have a model trained with 79 weeks of data. When I refresh the model with 13 more weeks, it generates a completely new model, with new coefficients, hyperparameters, etc., even when setting bounds_freedom = NULL. Particularly, turning off some channels that were supposed to be relevant.

I find this problematic because it’s not easy to communicate contradictory results to stakeholders after just 3 months of data.

Screenshot 2024-10-22 at 21 17 47

I have found similar errors in other threads (#985), but I can’t find a solution in any of them.

Am I missing something?

Environment & Robyn version

packageVersion("Robyn")
[1] ‘3.11.1.9003’

  • R version (Please, check and share: sessionInfo() or R.version$version.string)
    Screenshot 2024-10-22 at 21 15 09

Thanks in advance!

@gufengzhou
Copy link
Contributor

gufengzhou commented Jan 28, 2025

Sorry for the late reply. In general we're aware that the refresh function has flaws. Indeed, refresh is actually remodeling with constraints (on hyperparameters) from the prev. selected model, whereas these constraints will be larger the more periods you're refreshing. The logic behind is this: When adding 13 weeks to refresh, the model is less confident to "extrapolate" for the future, thus wider constraints. In which case you might as well just remodel. If you're only refreshing 1 week, the constraints will be way narrower, thus the results should be way closer. Hope it helps.

I just tried it out with only 1 week refresh with the demo data. They're certainly way closer.

Image

Also closing it because it's an old one. Feel free to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants