Comments (4)
@edgar-mh Thanks for opening this one!
Optimiser is always tricky as the problem itself is not easy and a lot of factors play in. Let's try to find out what is going on in your case.
Just a few follow up questions to try to rule out some things:
- Can you confirm the sum of
"previous_budget_allocation"
and sum ofsolution.x
match? - All your prices are ones since you are using spend, right?
- If your media data has a ton of variance, the bounds are taken from +-X% from the mean, if that mean +X% does not reach the optimal point on your best performing channels maybe its being capped there.
Optimisers can always get somewhat stuck on a local optima but giving the numbers you showed I think this is not the case here. Im also guessing you have run it a handful times with similar results.
Typo fixing PR's are more than welcome :)
from lightweight_mmm.
Hi Pablo,
Thank you so much for the swift reply!
I can confirm the pre and post budgets match, I've had a few cases where those weren't in line previously
The second point was spot on!
After some time debugging a previous problem, I've changed the prices to unscaled_costs.sum() / media_data.sum(axis=0)
and forgot to change it back. Returning an array of ones for each media channel solved the issue.
Thank you so much for pointing me in the right direction.
I'll open that PR, but probably only on Monday since it's already a bit late for me 😅
from lightweight_mmm.
Ok, I had a bit more time so I did create a new local branch and tried to push, but couldn't:
19:40:37.004: [lightweight_mmm] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false checkout -b fix_typos HEAD --
M lightweight_mmm/plot.py
Switched to a new branch 'fix_typos'
19:42:05.490: [lightweight_mmm] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -f -- lightweight_mmm/plot.py
19:42:05.497: [lightweight_mmm] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false commit -F /tmp/git-commit-msg-.txt --
[fix_typos 5225569] chore: fix typos in plot.py
1 file changed, 16 insertions(+), 16 deletions(-)
19:42:09.064: [lightweight_mmm] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin refs/heads/fix_typos:refs/heads/fix_typos --set-upstream
remote: Permission to google/lightweight_mmm.git denied to edgar-mh.
fatal: unable to access 'https://github.com/google/lightweight_mmm.git/': The requested URL returned error: 403
Will look into this on Monday, but I'm assuming the way I'm using to contribute to private repos is totally different than that for public repos
from lightweight_mmm.
You can check out Contributing.md for more info.
Will close this one for now but feel free to re-open.
from lightweight_mmm.
Related Issues (20)
- What is the best way to contribute to this library?
- INVALID_ARGUMENT: Python buffer protocol is only defined for CPU buffers. HOT 1
- In trying to plot the the response curves I get an error
- NumbaWarning: Compilation is falling back to object mode WITH looplifting enabled because Function "histogram" failed type inference due to: non-precise type pyobject During: typing of argument at /usr/local/lib/python3.10/dist-packages/arviz/stats/density_utils.py (979)
- Potential Improvments on Price and Extrafeature
- ValueError: Einstein sum subscript 'c' does not contain the correct number of indices for operand 1. HOT 1
- Priors of tested media channels HOT 3
- All predictions start with an offset HOT 1
- Kpi is smaller than spend on response curve
- GPU Performance Issues HOT 1
- Adstock Normalization
- What is budget in media optimization
- previous_extra_features data in predict function
- Not able to install the packages
- What are media_mix_model.trace["media_transformed"], media_mix_model.trace["coef_media"] ? Media Contribution Calculation Understanding HOT 6
- Model prediction decomposition HOT 2
- JAX GPU with Apple M2
- Response Curve : Adstock and Carryover models HOT 14
- Feature Names HOT 2
- RuntimeError (This version of jaxlib was built using AVX instructions) on importing `optimize_media` from `lightweight_mmm` in a conda environment on M1 mac.
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 lightweight_mmm.