google / lightweight_mmm

LightweightMMM 🦇 is a lightweight Bayesian Marketing Mix Modeling (MMM) library that allows users to easily train MMMs and obtain channel attribution information.
https://lightweight-mmm.readthedocs.io/en/latest/index.html
Apache License 2.0
829 stars 172 forks source link

Negative Values in Pre optimization predicted Target vs Post optimization predicted Target #311

Open udayreddy97 opened 3 months ago

udayreddy97 commented 3 months ago

Getting Negative Values in Pre optimization predicted Target vs Post optimization predicted Target graph.

image

Code Snippet:

solution, kpi_without_optim, previous_media_allocation = optimize_media.find_optimal_budgets(
    n_time_periods=n_time_periods,
    media_mix_model=mmm,
    extra_features=extra_features_train[:n_time_periods],
    budget=budget,
    prices=prices,
    media_scaler=media_scaler,
    target_scaler=target_scaler,
    seed=SEED)

Result of the code snippet

Iteration limit reached    (Exit mode 9)
Current function value: -850.4690809609328
Iterations: 200
Function evaluations: 9800
Gradient evaluations: 200