Git Product home page Git Product logo

Comments (2)

pabloduque0 avatar pabloduque0 commented on May 2, 2024

_generate_starting_values and _get_lower_and_upper_bounds differ in calculation by design. The optimisation itself works on "media unit" but the constraint within it needs to use the budget to make sure the constraint of "using all the budget" is met along the way. That is why the bounds are based on an average of historic media unit and the starting values include the budget in that calculation (also note that starting values dont really need to include budget and we only do that so we can provide the user an average value they can compare against after the optimisation and for it to be a fair comparison they should both use the same budget, although starting values could be random technically).

I think the current behaviour that you are finding is due to #82 (which should be fixed this week). The best thing is to ignore the third output on optimize_media. find_optimal_budgets and calculate yourself some average budget you want to compare against (and then use predict to get the prediction for that given media allocation).

Since the prices and bounds are both per channel calculating the bounds in monetary value and then converting back to media unit, or calculating them in media unit directly should yield the same result.

This behaviour does require the user to pass a budget and bounds (percentages) that are aligned. What other interface would you prefer?

Let me know if Im somehow miss-understanding the issue you are finding.

from lightweight_mmm.

yanhong-zhao-ef avatar yanhong-zhao-ef commented on May 2, 2024

Thanks for the swift reply @pabloduque0 actually I will close this comment as my issue was resolved by updating to the latest version of lightweight mmm because in the previous version I had (0.1.5), the bounds were calculated differently.

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.