Comments (9)
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.
hi, thanks for reporting this. we'll push the fix asap and let you know. probably today/tomorrow.
from robyn.
just pushed the fix, which was related to checking if the DATE format is set correctly. hope it works now?
from robyn.
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.
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.
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.
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.
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.
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)
- demo.r | document error HOT 1
- robyn_allocator - What's the difference between expSpendUnitTot & optmSpendUnitTotal? HOT 2
- Robyn_outputs: vector size error HOT 2
- Robyn Allocator underestimates Carryover HOT 23
- robyn_recreate() error: Must provide 'hyperparameters' in robyn_inputs()'s output first HOT 3
- Robyn CSV Data Dictionary? HOT 2
- Does Robyn still use only spend data as input but not exposure metrics? HOT 4
- Attribution for Brand Direct HOT 2
- Error in {: Task 1 failed - "object 'dt_geometric' not found" HOT 3
- Impression modelling HOT 4
- Total response in robyn_allocator output HOT 1
- Upper Boundary error in Budget Allocator HOT 9
- Refresh output is not matching the documentation HOT 3
- Output of robyn_recreate() returns warning message referencing an object that does not exist anymore? HOT 1
- Different Results in Recreated Model HOT 7
- Error in NRMSE calculation HOT 1
- Import mode output to run optimizations HOT 2
- Error in robyn_outputs step when recreating model from previous model inputs and hyperparameters HOT 5
- Factorial Variables HOT 1
- Budget Allocator Question HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from robyn.