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

Loading saved model #253

Closed Aanai closed 9 months ago

Aanai commented 9 months ago

How does one load the model (.pkl file) to view the results (coefficients and other parameters) of the MMM?

I have tried various methods to load the pickle file. For example:

pickle.load(open('media_mix_model.pkl', "rb")) utils.load_model('media_mix_model.pkl')

with open('media_mix_model.pkl', "rb") as f: content = pickle.load(f)

But they all only give the following output: LightweightMMM(model_name='hill_adstock') without displaying the contents of the file.