GithubHelp home page GithubHelp logo

Comments (9)

LeoUbbiali avatar LeoUbbiali commented on May 2, 2024 1

Thanks @gufengzhou . My issue was solved by the latest commit. I didn't need to manually loop over the Spend-Media pairs to find the one who did not fit.
Thanks also for updating the step by step guide.

from robyn.

gufengzhou avatar gufengzhou commented on May 2, 2024

hi, thanks for reporting this. we'll push the fix asap and let you know. probably today/tomorrow.

from robyn.

gufengzhou avatar gufengzhou commented on May 2, 2024

just pushed the fix, which was related to checking if the DATE format is set correctly. hope it works now?

from robyn.

LeoUbbiali avatar LeoUbbiali commented on May 2, 2024

Hi @gufengzhou Thanks for pushing the fix.
I encountered the same error previously and now I get this new error.
I hope you could help

code run
dt_mod <- f.inputWrangling()

error

Error in nlsModel(formula, mf, start, wts) :
singular gradient matrix at initial parameter estimates

traceback

stop("singular gradient matrix at initial parameter estimates")
9.
nlsModel(formula, mf, start, wts)
8.
nlsLM(reach ~ Vmax * spend/(Km + spend), data = dt_spendModInput,
start = nlsStartVal, control = nls.control(warnOnly = T)) at fb_robyn.func.R#326
7.
withCallingHandlers(expr, warning = function(w) if (inherits(w,
classes)) tryInvokeRestart("muffleWarning"))
6.
suppressWarnings(modNLS <- nlsLM(reach ~ Vmax * spend/(Km + spend),
data = dt_spendModInput, start = nlsStartVal, control = nls.control(warnOnly = T))) at fb_robyn.func.R#326
5.
value[3L]
4.
tryCatchOne(expr, names, parentenv, handlers[[1L]])
3.
tryCatchList(expr, classes, parentenv, handlers)
2.
tryCatch({
nlsStartVal <- list(Vmax = dt_spendModInput[, max(reach)/2],
Km = dt_spendModInput[, max(reach)])
modNLS <- minpack.lmnlsLM(reach ~ Vmax * spend/(Km + spend), ... at fb_robyn.func.R#316
1.
f.inputWrangling()

from robyn.

gufengzhou avatar gufengzhou commented on May 2, 2024

alright this is a tricky one. you're using your own data, right? probably also using some non-spend metrics for set_mediaVarName? This error is related to the spend-reach nonlinear fitting. please try using all spends in set_mediaVarName first and see if everything runs. If yes, then try changing it to impressions etc one by one, so you can see which channel is having problem.

from robyn.

LeoUbbiali avatar LeoUbbiali commented on May 2, 2024

Hey @gufengzhou thanks a lot for the quick reply.
Yes, that's correct:

  • I'm using my own data
  • I'm using the non-spend variables for set_mediaVarName (using the corresponding "pressure" metric for each spend metric. I have a 1 pressure metric and one spend metric for each "channel")

Could you please expand/point to underlying model documentation on "This error is related to the spend-reach nonlinear fitting"?

Anyway, I'll follow your advice and then report back.

from robyn.

gufengzhou avatar gufengzhou commented on May 2, 2024

hey, I've pushed a fix for the nls spend reach fitting. hopefully it works now for you. otherwise let me know. regarding documentation, sorry that this is not updated yet. It's fitting the exposure metrics (imps, clicks, GRP etc.) using spends, when you're using non-spend metrics as media variables. For example if you use imp for FB, spend-reach model will fit FB imp with FB spend. This is aiming to better model the nonlinear relationship between spend and exposure and thus enable better ROI calculation, cost-response curve and finally budget allocation. You can check the detail in script .func from line 280 on. hope it helps.

from robyn.

retiuk avatar retiuk commented on May 2, 2024

Thank you for the push, I managed to run f.inputWrangling() successfully now.

When running the following line of code now, I get an error saying 'Error: Miniconda installation failed [unknown reason]'

Is this Miniconda something I need in my pc to be able to run it? Not familiar.

Thanks for the comments

model_output_collect <- f.robyn(set_hyperBoundLocal
,optimizer_name = set_hyperOptimAlgo
,set_trial = set_trial
,set_cores = set_cores
,plot_folder = "~/Documents/GitHub/plots") # please set your folder path to save plots. It ends without "/".

from robyn.

gufengzhou avatar gufengzhou commented on May 2, 2024

Yes, you need to install anaconda first, then install Nevergrad (which is a Python library) through conda. In the .exec script there is a simple guide after the libraries

from robyn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.