Comments (6)
@rajat-barve For the sanity check, you can just search for MCMC output analysis/interpretation and use the articles/videos to understand the summary output. Other steps, I did was to compare prior/posterior distribution and check if they are same or model has learnt anything from the data... And for business validation, look at the attribution, lag weight parameter distribution and check if those makes sense.
from lightweight_mmm.
Following up on the issue,
I am looking into the _objective_function
method in the optimize_media.py
file. My setup is 51 geos, 8 channels. My understanding is that the following code should divide the given budget for the channels based on the historical data share. Then, it repeats it for the n_time_period. When I try to run the following code individually, I am not getting a repeated array
media_values = geo_ratio * jnp.expand_dims(media_values, axis=-1)
media_values = jnp.tile(media_values / media_input_shape[0], reps=media_input_shape[0])
# Distribute budget of each channels across time.
media_values = jnp.reshape(a=media_values, newshape=media_input_shape)
When I change the above code to the following code, I am getting spend divided across the channels and repeated across n_time_periods.
media_values = geo_ratio * jnp.expand_dims(media_values, axis=-1)
media_values = jnp.tile(media_values / media_input_shape[0], reps=(media_input_shape[0],1,1))
Now I am getting prediction from optimization in the range of actual values. I am not sure if this is version issue or I am doing something incorrectly.
Any help would be appreciated. Thanks!
from lightweight_mmm.
@ar-asur Can you share the code used for the optimization? I haven't been able to make it work.
from lightweight_mmm.
@ar-asur , sorry, I am not able to help you with your question since I am super new to MMM myself. But can you please let me know how you did your sanity checks and how did you learn about them? Any source?
from lightweight_mmm.
@jorgemadridm19 The code in the example notebooks worked for me for both national and geo-level model. I used them as the starting point. When you say it doesn't work, do you get issues with the code or the results?
from lightweight_mmm.
I did the same thing. I believe it is a bug in this version of lightweightMMM. According to the jnp documentation, reps=media_input_shape[0] will automatically append 1's in front of media_input_shape[0], not after.
from lightweight_mmm.
Related Issues (20)
- How can I input future media_data_test for optimization in upcoming periods? HOT 1
- How can channel-wise optimized conversions be obtained?
- Extra features
- Addressing Heteroscedasticity
- Geo level attribution and response curves
- Budget Allocation Percentage breakdown by channel HOT 10
- Question on tensorflow requirement
- Dtype object is not a valid JAX array type. Only arrays of numeric types are supported by JAX. HOT 5
- Same pre-optimization and post-optimization channel budget allocation ratios , but suggesting much higher budget instead of aligning the budget to the one i requested. HOT 10
- Paid Search bias - Nested model
- Divergences and n_eff
- Outliers and influential points
- budget allocator: How to set up lower bound and upper bound per channel?
- add got incompatible shapes for broadcasting: (95,), (90,). HOT 5
- TypeError: add got incompatible shapes for broadcasting: (58,), (54,). HOT 8
- Rendering of several plots not working! HOT 1
- Negative Values in Pre optimization predicted Target vs Post optimization predicted Target
- Budget Optimization
- RuntimeError: Cannot find valid initial parameters. Please check your model again.
- TypeError: where() got some positional-only arguments passed as keyword arguments: 'condition, x, y' HOT 5
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.