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

Is there a way to get model results into a csv so that it can be fed to PowerBI to create responsive charts #966

Open
shuvayan opened this issue May 5, 2024 · 5 comments
Assignees

Comments

@shuvayan
Copy link

shuvayan commented May 5, 2024

Project Robyn

Describe issue

Is there a method or function within Robyn with which I can export the model results (one-pager plots) data into a csv and recreate the plots in powerbi/tableau. Basically is there a way to get the plots to be interactive and not just .pngs.

Provide reproducible example

It would be great if Robyn results are reproducible across platforms and more can be seen apart from the static plots.
It is really difficult to win stakeholder confidence with the current setup of results display.

If it is not currently present , is there any future plans to make the Robyn results more interactive and cross platform friendly?

@gufengzhou
Copy link
Contributor

you could recreate almost all plots with the rich csv outputs Robyn exports by default. See schema here.

@gufengzhou gufengzhou self-assigned this May 6, 2024
@shuvayan
Copy link
Author

shuvayan commented May 8, 2024

Hello @gufengzhou ,
Thanks for the direction. Could you show me an example - lets say I want to get the adstock_saturated values for the channel spends from the csv's .
How do I do that from the files that get generated from the Robyn process

@gufengzhou
Copy link
Contributor

To plot the specific curve from each model candidate on a scatter plot, use the table pareto_media_transform_matrix.csv, filter column solID by an ID, then filter column type by "adstockedMedia", then use any media column, let's say FB, this goes to the x axis, then again filter column type by "decompMedia", this goes to the y axis. there you have the curve for FB for this model.

@shuvayan
Copy link
Author

Thank you so much for the detailed solution. I could generate the plot following your instructions.
I was also trying to figure out the values from the Robyn prediction function (Ridge Regression) :

image

Below are the numbers on which I am working :

image

The table 1 contains the actual value of spend of a particular channel , Table 2 shows the hyper-parameters and table 3 is from the pareto_alldecomp_matrix (for the best solution ID).

I am not being able to figure out how the value of decomposed audio_s is 60.32 based on the equation and parameters.

This is needed as we need to check if all the decompositions make sense from a business perspective too and not being able to put appropriate numbers in the equation and getting back the correct values is somewhat frustrating.

However, I am sure I am missing something here, so hoping that @gufengzhou can help!!

@gufengzhou
Copy link
Contributor

It's bit lengthy if you want to rebuild the whole transformation. the geometric function (with theta) can be found here. Then the saturation is here. Then you can multiply it by the coef to do the prediction.

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