Question about deprecation of spend_exposure_fitting.png #780
alex-rowley
started this conversation in
General
Replies: 1 comment
-
Sorry for the late reply because the discussions here are not as well monitored as the issues. I guess it doesn't hurt to export thos too. Will consider it in our next update. Will let you know. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Can anyone please explain why the code to generate spend_exposure_fitting.png in the current version has been commented out?
I understand that the fitting for spend/exposure is done earlier, when a RobynInput is updated with hyperparameters, but as far as I can tell the directory for outputting plots isn't made until a RobynOutput is created. Having the plots generated without being saved, as is done in demo.R, is not quite the same because a lot of users (myself included) are going to want to run Robyn in a container and export plots out later.
So my argument is actually that the code is in the right place and does useful stuff, could it be reintegrated back in? I haven't tested but it looks like it would work exactly as is. Personally I would be happy with simply uncommenting the affected lines and maybe amending or removing the 'message' that is displayed if
any(InputCollect$exposure_selector) == False
Could make a PR if this was agreeable with all?
Edit: Meanwhile, I have also noticed that pareto_media_transform_matrix.csv no longer seems to outputs rawExposure values correctly (instead, they are the same as rawMedia values). I don't think this was intended? Could be fixed separately or at the same time
Edit again: Scratch that, it doesn't work as is, but I did get it working like this:
if(length(InputCollect$exposure_vars)>0){ pSpendExposure <- wrap_plots( InputCollect$modNLS$plots, ncol = ifelse(length(InputCollect$modNLS$plots) <= 3, length(InputCollect$modNLS$plots), 3) ) + plot_annotation( title = "Spend-exposure fitting with Michaelis-Menten model", theme = theme(plot.title = element_text(hjust = 0.5)) ) ggsave( paste0(OutputCollect$plot_folder, "spend_exposure_fitting.png"), plot = pSpendExposure, dpi = 600, width = 12, limitsize = FALSE, height = ceiling(length(InputCollect$modNLS$plots) / 3) * 7 ) }
Thanks
Beta Was this translation helpful? Give feedback.
All reactions