Git Product home page Git Product logo

Comments (6)

ar-asur avatar ar-asur commented on May 17, 2024 1

@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.

ar-asur avatar ar-asur commented on May 17, 2024

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.

jorgemadridm19 avatar jorgemadridm19 commented on May 17, 2024

@ar-asur Can you share the code used for the optimization? I haven't been able to make it work.

from lightweight_mmm.

rajat-barve avatar rajat-barve commented on May 17, 2024

@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.

ar-asur avatar ar-asur commented on May 17, 2024

@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.

S-YIN avatar S-YIN commented on May 17, 2024

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)

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.