google-meridian 1.2.1__tar.gz → 1.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. google_meridian-1.3.1/PKG-INFO +209 -0
  2. {google_meridian-1.2.1 → google_meridian-1.3.1}/README.md +6 -6
  3. google_meridian-1.3.1/google_meridian.egg-info/PKG-INFO +209 -0
  4. {google_meridian-1.2.1 → google_meridian-1.3.1}/google_meridian.egg-info/SOURCES.txt +25 -1
  5. {google_meridian-1.2.1 → google_meridian-1.3.1}/google_meridian.egg-info/requires.txt +7 -3
  6. {google_meridian-1.2.1 → google_meridian-1.3.1}/google_meridian.egg-info/top_level.txt +1 -0
  7. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/analysis/__init__.py +2 -0
  8. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/analysis/analyzer.py +179 -105
  9. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/analysis/formatter.py +2 -2
  10. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/analysis/optimizer.py +227 -87
  11. google_meridian-1.3.1/meridian/analysis/review/__init__.py +20 -0
  12. google_meridian-1.3.1/meridian/analysis/review/checks.py +721 -0
  13. google_meridian-1.3.1/meridian/analysis/review/configs.py +110 -0
  14. google_meridian-1.3.1/meridian/analysis/review/constants.py +40 -0
  15. google_meridian-1.3.1/meridian/analysis/review/results.py +544 -0
  16. google_meridian-1.3.1/meridian/analysis/review/reviewer.py +186 -0
  17. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/analysis/summarizer.py +21 -34
  18. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/analysis/templates/chips.html.jinja +12 -0
  19. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/analysis/test_utils.py +27 -5
  20. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/analysis/visualizer.py +41 -57
  21. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/backend/__init__.py +457 -118
  22. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/backend/test_utils.py +162 -0
  23. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/constants.py +39 -3
  24. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/model/__init__.py +1 -0
  25. google_meridian-1.3.1/meridian/model/eda/__init__.py +20 -0
  26. google_meridian-1.3.1/meridian/model/eda/constants.py +21 -0
  27. google_meridian-1.3.1/meridian/model/eda/eda_engine.py +1848 -0
  28. google_meridian-1.3.1/meridian/model/eda/eda_outcome.py +200 -0
  29. google_meridian-1.3.1/meridian/model/eda/eda_spec.py +84 -0
  30. google_meridian-1.3.1/meridian/model/eda/meridian_eda.py +220 -0
  31. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/model/knots.py +55 -49
  32. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/model/media.py +10 -8
  33. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/model/model.py +79 -16
  34. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/model/model_test_data.py +53 -0
  35. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/model/posterior_sampler.py +39 -32
  36. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/model/prior_distribution.py +12 -2
  37. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/model/prior_sampler.py +146 -90
  38. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/model/spec.py +7 -8
  39. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/model/transformers.py +11 -3
  40. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/version.py +1 -1
  41. {google_meridian-1.2.1 → google_meridian-1.3.1}/pyproject.toml +10 -9
  42. {google_meridian-1.2.1/meridian/model/eda → google_meridian-1.3.1/schema}/__init__.py +3 -2
  43. google_meridian-1.3.1/schema/serde/__init__.py +26 -0
  44. google_meridian-1.3.1/schema/serde/constants.py +48 -0
  45. google_meridian-1.3.1/schema/serde/distribution.py +515 -0
  46. google_meridian-1.3.1/schema/serde/eda_spec.py +192 -0
  47. google_meridian-1.3.1/schema/serde/function_registry.py +143 -0
  48. google_meridian-1.3.1/schema/serde/hyperparameters.py +363 -0
  49. google_meridian-1.3.1/schema/serde/inference_data.py +105 -0
  50. google_meridian-1.3.1/schema/serde/marketing_data.py +1321 -0
  51. google_meridian-1.3.1/schema/serde/meridian_serde.py +413 -0
  52. google_meridian-1.3.1/schema/serde/serde.py +47 -0
  53. google_meridian-1.3.1/schema/serde/test_data.py +4608 -0
  54. google_meridian-1.3.1/schema/utils/__init__.py +17 -0
  55. google_meridian-1.3.1/schema/utils/time_record.py +156 -0
  56. google_meridian-1.2.1/PKG-INFO +0 -409
  57. google_meridian-1.2.1/google_meridian.egg-info/PKG-INFO +0 -409
  58. google_meridian-1.2.1/meridian/model/eda/eda_engine.py +0 -735
  59. {google_meridian-1.2.1 → google_meridian-1.3.1}/LICENSE +0 -0
  60. {google_meridian-1.2.1 → google_meridian-1.3.1}/MANIFEST.in +0 -0
  61. {google_meridian-1.2.1 → google_meridian-1.3.1}/google_meridian.egg-info/dependency_links.txt +0 -0
  62. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/__init__.py +0 -0
  63. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/analysis/summary_text.py +0 -0
  64. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/analysis/templates/card.html.jinja +0 -0
  65. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/analysis/templates/chart.html.jinja +0 -0
  66. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/analysis/templates/insights.html.jinja +0 -0
  67. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/analysis/templates/stats.html.jinja +0 -0
  68. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/analysis/templates/style.scss +0 -0
  69. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/analysis/templates/summary.html.jinja +0 -0
  70. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/analysis/templates/table.html.jinja +0 -0
  71. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/backend/config.py +0 -0
  72. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/data/__init__.py +0 -0
  73. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/data/arg_builder.py +0 -0
  74. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/data/data_frame_input_data_builder.py +0 -0
  75. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/data/input_data.py +0 -0
  76. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/data/input_data_builder.py +0 -0
  77. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/data/load.py +0 -0
  78. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/data/nd_array_input_data_builder.py +0 -0
  79. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/data/test_utils.py +0 -0
  80. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/data/time_coordinates.py +0 -0
  81. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/mlflow/__init__.py +0 -0
  82. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/mlflow/autolog.py +0 -0
  83. {google_meridian-1.2.1 → google_meridian-1.3.1}/meridian/model/adstock_hill.py +0 -0
  84. {google_meridian-1.2.1 → google_meridian-1.3.1}/setup.cfg +0 -0
  85. {google_meridian-1.2.1 → google_meridian-1.3.1}/setup.py +0 -0
@@ -0,0 +1,209 @@
1
+ Metadata-Version: 2.4
2
+ Name: google-meridian
3
+ Version: 1.3.1
4
+ Summary: Google's open source mixed marketing model library, helps you understand your return on investment and direct your ad spend with confidence.
5
+ Author-email: The Meridian Authors <no-reply@google.com>
6
+ Project-URL: homepage, https://github.com/google/meridian
7
+ Project-URL: repository, https://github.com/google/meridian
8
+ Project-URL: changelog, https://github.com/google/meridian/blob/main/CHANGELOG.md
9
+ Project-URL: documentation, https://developers.google.com/meridian
10
+ Keywords: mmm
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3 :: Only
13
+ Classifier: Topic :: Other/Nonlisted Topic
14
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
15
+ Requires-Python: >=3.10
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: arviz
19
+ Requires-Dist: altair>=5
20
+ Requires-Dist: immutabledict
21
+ Requires-Dist: joblib
22
+ Requires-Dist: natsort<8,>=7.1.1
23
+ Requires-Dist: numpy<3,>=2.0.2
24
+ Requires-Dist: pandas<3,>=2.2.2
25
+ Requires-Dist: patsy<1,>=0.5.3
26
+ Requires-Dist: scipy<2,>=1.13.1
27
+ Requires-Dist: statsmodels>=0.14.5
28
+ Requires-Dist: tensorflow<2.19,>=2.18
29
+ Requires-Dist: tensorflow-probability<0.26,>=0.25
30
+ Requires-Dist: tf-keras<2.19,>=2.18
31
+ Requires-Dist: xarray
32
+ Provides-Extra: dev
33
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
34
+ Requires-Dist: pytest-xdist; extra == "dev"
35
+ Requires-Dist: pylint>=2.6.0; extra == "dev"
36
+ Requires-Dist: pyink; extra == "dev"
37
+ Provides-Extra: colab
38
+ Requires-Dist: psutil; extra == "colab"
39
+ Requires-Dist: python-calamine; extra == "colab"
40
+ Provides-Extra: and-cuda
41
+ Requires-Dist: tensorflow[and-cuda]<2.19,>=2.18; extra == "and-cuda"
42
+ Provides-Extra: mlflow
43
+ Requires-Dist: mlflow; extra == "mlflow"
44
+ Provides-Extra: jax
45
+ Requires-Dist: jax==0.4.26; extra == "jax"
46
+ Requires-Dist: jaxlib==0.4.26; extra == "jax"
47
+ Requires-Dist: tensorflow-probability[substrates-jax]==0.25.0; extra == "jax"
48
+ Provides-Extra: schema
49
+ Requires-Dist: mmm-proto-schema; extra == "schema"
50
+ Requires-Dist: semver; extra == "schema"
51
+ Dynamic: license-file
52
+
53
+ # About Meridian
54
+
55
+ Marketing mix modeling (MMM) is a statistical analysis technique that measures
56
+ the impact of marketing campaigns and activities to guide budget planning
57
+ decisions and improve overall media effectiveness. MMM uses aggregated data to
58
+ measure impact across marketing channels and account for non-marketing factors
59
+ that impact sales and other key performance indicators (KPIs). MMM is
60
+ privacy-safe and does not use any cookie or user-level information.
61
+
62
+ Meridian is an MMM framework that enables advertisers to set up and run their
63
+ own in-house models. Meridian helps you answer key questions such as:
64
+
65
+ * How did the marketing channels drive my revenue or other KPI?
66
+ * What was my marketing return on investment (ROI)?
67
+ * How do I optimize my marketing budget allocation for the future?
68
+
69
+ Meridian is a highly customizable modeling framework that is based on
70
+ [Bayesian causal inference](https://developers.google.com/meridian/docs/causal-inference/bayesian-inference).
71
+ It is capable of handling large scale geo-level data, which is encouraged if
72
+ available, but it can also be used for national-level modeling. Meridian
73
+ provides clear insights and visualizations to inform business decisions around
74
+ marketing budget and planning. Additionally, Meridian provides methodologies to
75
+ support calibration of MMM with experiments and other prior information, and to
76
+ optimize target ad frequency by utilizing reach and frequency data.
77
+
78
+ If you are using LightweightMMM, see the
79
+ [migration guide](https://developers.google.com/meridian/docs/migrate) to help
80
+ you understand the differences between these MMM projects.
81
+
82
+ ## Install Meridian
83
+
84
+ Python 3.11 or 3.12 is required to use Meridian. We also recommend using a
85
+ minimum of 1 GPU.
86
+
87
+ Note: This project has been tested on T4 GPU using 16 GB of RAM.
88
+
89
+ To install Meridian, run the following command to automatically install the
90
+ latest release from PyPI.
91
+
92
+ * For Linux-GPU users:
93
+
94
+ Note: CUDA toolchain and a compatible GPU device is necessary for
95
+ `[and-cuda]` extra to activate.
96
+
97
+ ```sh
98
+ $ pip install --upgrade google-meridian[and-cuda]
99
+ ```
100
+
101
+ * For macOS and general CPU users:
102
+
103
+ Note: There is no official GPU support for macOS.
104
+
105
+ ```sh
106
+ $ pip install --upgrade google-meridian
107
+ ```
108
+
109
+ Alternatively, run the following command to install the most recent, unreleased
110
+ version from GitHub.
111
+
112
+ * For GPU users:
113
+
114
+ ```sh
115
+ $ pip install --upgrade "google-meridian[and-cuda] @ git+https://github.com/google/meridian.git"
116
+ ```
117
+
118
+ * For CPU users:
119
+
120
+ ```sh
121
+ $ pip install --upgrade git+https://github.com/google/meridian.git
122
+ ```
123
+
124
+ We recommend to install Meridian in a fresh
125
+ [virtual environment](https://virtualenv.pypa.io/en/latest/user_guide.html#quick-start)
126
+ to make sure that correct versions of all the dependencies are installed, as
127
+ defined in [pyproject.toml](https://github.com/google/meridian/blob/main/pyproject.toml).
128
+
129
+ ## How to use the Meridian library
130
+
131
+ To get started with Meridian, you can run the code programmatically using sample
132
+ data with the [Getting Started Colab][3].
133
+
134
+ The Meridian model uses a holistic MCMC sampling approach called
135
+ [No U Turn Sampler (NUTS)](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/mcmc/NoUTurnSampler)
136
+ which can be compute intensive. To help with this, GPU support has been
137
+ developed across the library (out-of-the-box) using tensors. We recommend
138
+ running your Meridian model on GPUs to get real time optimization results and
139
+ significantly reduce training time.
140
+
141
+ ## Meridian Documentation & Tutorials
142
+
143
+ The following documentation, colab, and video resources will help you get
144
+ started quickly with using Meridian:
145
+
146
+ | Resource | Description |
147
+ | --------------------------- | ---------------------------------------------- |
148
+ | [Meridian documentation][1] | Main landing page for Meridian documentation. |
149
+ | [Meridian basics][2] | Learn about Meridian features, methodologies, and the model math. |
150
+ | [Getting started colab][3] | Install and quickly learn how to use Meridian with this colab tutorial using sample data. |
151
+ | [User guide][4] | A detailed walk-through of how to use Meridian and generating visualizations using your own data. |
152
+ | [Pre-modeling][5] | Prepare and analyze your data before modeling. |
153
+ | [Modeling][6] | Modeling guidance for model refinement and edge cases. |
154
+ | [Post-modeling][7] | Post-modeling guidance for model fit, visualizations, optimizations, refreshing the model, and debugging. |
155
+ | [Migrate from LMMM][8] | Learn about the differences between Meridian and LightweightMMM as you consider migrating. |
156
+ | [API Reference][9] | API reference documentation for the Meridian package. |
157
+ | [Reference list][10] | White papers and other referenced material. |
158
+
159
+ [1]: https://developers.google.com/meridian
160
+ [2]: https://developers.google.com/meridian/docs/basics/meridian-introduction
161
+ [3]: https://developers.google.com/meridian/notebook/meridian-getting-started
162
+ [4]: https://developers.google.com/meridian/docs/user-guide/installing
163
+ [5]: https://developers.google.com/meridian/docs/pre-modeling/collect-data
164
+ [6]: https://developers.google.com/meridian/docs/advanced-modeling/control-variables
165
+ [7]: https://developers.google.com/meridian/docs/post-modeling/model-fit
166
+ [8]: https://developers.google.com/meridian/docs/migrate
167
+ [9]: https://developers.google.com/meridian/reference/api/meridian
168
+ [10]: https://developers.google.com/meridian/docs/reference-list
169
+
170
+ ## Support
171
+
172
+ **Questions about methodology**: Please see the [Modeling](https://developers.google.com/meridian/docs/basics/meridian-introduction) tab in the technical documentation.
173
+
174
+ **Issues installing or using Meridian**: Feel free to post questions in the
175
+ [Discussions](https://github.com/google/meridian/discussions) or [Issues](https://github.com/google/meridian/issues) tabs of the Meridian GitHub repository. The Meridian team responds to
176
+ these questions weekly in batches, so please be patient and don't reach out
177
+ directly to your Google Account teams.
178
+
179
+ **Bug reports**: Please post bug reports to the [Issues](https://github.com/google/meridian/issues)
180
+ tab of the Meridian GitHub repository. We also encourage the community to share
181
+ tips and advice with each other on the [Issues](https://github.com/google/meridian/issues)
182
+ tab. When our team addresses or resolves a new bug, we will notify you through
183
+ the comments on the issue.
184
+
185
+ **Feature requests**: Please post these to the [Discussions](https://github.com/google/meridian/discussions)
186
+ tab of the Meridian GitHub repository. We have an internal roadmap for Meridian
187
+ development, but would love your inputs for new feature requests so that we can
188
+ prioritize them based on the roadmap.
189
+
190
+ **Pull requests**: These are appreciated but are very difficult for us to merge
191
+ because the code in this repository is linked to Google internal systems and has
192
+ to pass internal review. If you submit a pull request and we believe that we can
193
+ incorporate a change in the base code, we will reach out to you directly about
194
+ this.
195
+
196
+ ## Citing Meridian
197
+
198
+ To cite this repository:
199
+
200
+ <!-- mdlint off(SNIPPET_INVALID_LANGUAGE) -->
201
+ ```BibTeX
202
+ @software{meridian_github,
203
+ author = {Google Meridian Marketing Mix Modeling Team},
204
+ title = {Meridian: Marketing Mix Modeling},
205
+ url = {https://github.com/google/meridian},
206
+ version = {1.3.1},
207
+ year = {2025},
208
+ }
209
+ ```
@@ -15,7 +15,7 @@ own in-house models. Meridian helps you answer key questions such as:
15
15
  * How do I optimize my marketing budget allocation for the future?
16
16
 
17
17
  Meridian is a highly customizable modeling framework that is based on
18
- [Bayesian causal inference](https://developers.google.com/meridian/docs/basics/bayesian-inference).
18
+ [Bayesian causal inference](https://developers.google.com/meridian/docs/causal-inference/bayesian-inference).
19
19
  It is capable of handling large scale geo-level data, which is encouraged if
20
20
  available, but it can also be used for national-level modeling. Meridian
21
21
  provides clear insights and visualizations to inform business decisions around
@@ -105,19 +105,19 @@ started quickly with using Meridian:
105
105
  | [Reference list][10] | White papers and other referenced material. |
106
106
 
107
107
  [1]: https://developers.google.com/meridian
108
- [2]: https://developers.google.com/meridian/docs/basics/about-the-project
108
+ [2]: https://developers.google.com/meridian/docs/basics/meridian-introduction
109
109
  [3]: https://developers.google.com/meridian/notebook/meridian-getting-started
110
110
  [4]: https://developers.google.com/meridian/docs/user-guide/installing
111
- [5]: https://developers.google.com/meridian/docs/user-guide/collect-data
111
+ [5]: https://developers.google.com/meridian/docs/pre-modeling/collect-data
112
112
  [6]: https://developers.google.com/meridian/docs/advanced-modeling/control-variables
113
- [7]: https://developers.google.com/meridian/docs/advanced-modeling/model-fit
113
+ [7]: https://developers.google.com/meridian/docs/post-modeling/model-fit
114
114
  [8]: https://developers.google.com/meridian/docs/migrate
115
115
  [9]: https://developers.google.com/meridian/reference/api/meridian
116
116
  [10]: https://developers.google.com/meridian/docs/reference-list
117
117
 
118
118
  ## Support
119
119
 
120
- **Questions about methodology**: Please see the [Modeling](https://developers.google.com/meridian/docs/basics/about-the-project) tab in the technical documentation.
120
+ **Questions about methodology**: Please see the [Modeling](https://developers.google.com/meridian/docs/basics/meridian-introduction) tab in the technical documentation.
121
121
 
122
122
  **Issues installing or using Meridian**: Feel free to post questions in the
123
123
  [Discussions](https://github.com/google/meridian/discussions) or [Issues](https://github.com/google/meridian/issues) tabs of the Meridian GitHub repository. The Meridian team responds to
@@ -151,7 +151,7 @@ To cite this repository:
151
151
  author = {Google Meridian Marketing Mix Modeling Team},
152
152
  title = {Meridian: Marketing Mix Modeling},
153
153
  url = {https://github.com/google/meridian},
154
- version = {1.2.1},
154
+ version = {1.3.1},
155
155
  year = {2025},
156
156
  }
157
157
  ```
@@ -0,0 +1,209 @@
1
+ Metadata-Version: 2.4
2
+ Name: google-meridian
3
+ Version: 1.3.1
4
+ Summary: Google's open source mixed marketing model library, helps you understand your return on investment and direct your ad spend with confidence.
5
+ Author-email: The Meridian Authors <no-reply@google.com>
6
+ Project-URL: homepage, https://github.com/google/meridian
7
+ Project-URL: repository, https://github.com/google/meridian
8
+ Project-URL: changelog, https://github.com/google/meridian/blob/main/CHANGELOG.md
9
+ Project-URL: documentation, https://developers.google.com/meridian
10
+ Keywords: mmm
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3 :: Only
13
+ Classifier: Topic :: Other/Nonlisted Topic
14
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
15
+ Requires-Python: >=3.10
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: arviz
19
+ Requires-Dist: altair>=5
20
+ Requires-Dist: immutabledict
21
+ Requires-Dist: joblib
22
+ Requires-Dist: natsort<8,>=7.1.1
23
+ Requires-Dist: numpy<3,>=2.0.2
24
+ Requires-Dist: pandas<3,>=2.2.2
25
+ Requires-Dist: patsy<1,>=0.5.3
26
+ Requires-Dist: scipy<2,>=1.13.1
27
+ Requires-Dist: statsmodels>=0.14.5
28
+ Requires-Dist: tensorflow<2.19,>=2.18
29
+ Requires-Dist: tensorflow-probability<0.26,>=0.25
30
+ Requires-Dist: tf-keras<2.19,>=2.18
31
+ Requires-Dist: xarray
32
+ Provides-Extra: dev
33
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
34
+ Requires-Dist: pytest-xdist; extra == "dev"
35
+ Requires-Dist: pylint>=2.6.0; extra == "dev"
36
+ Requires-Dist: pyink; extra == "dev"
37
+ Provides-Extra: colab
38
+ Requires-Dist: psutil; extra == "colab"
39
+ Requires-Dist: python-calamine; extra == "colab"
40
+ Provides-Extra: and-cuda
41
+ Requires-Dist: tensorflow[and-cuda]<2.19,>=2.18; extra == "and-cuda"
42
+ Provides-Extra: mlflow
43
+ Requires-Dist: mlflow; extra == "mlflow"
44
+ Provides-Extra: jax
45
+ Requires-Dist: jax==0.4.26; extra == "jax"
46
+ Requires-Dist: jaxlib==0.4.26; extra == "jax"
47
+ Requires-Dist: tensorflow-probability[substrates-jax]==0.25.0; extra == "jax"
48
+ Provides-Extra: schema
49
+ Requires-Dist: mmm-proto-schema; extra == "schema"
50
+ Requires-Dist: semver; extra == "schema"
51
+ Dynamic: license-file
52
+
53
+ # About Meridian
54
+
55
+ Marketing mix modeling (MMM) is a statistical analysis technique that measures
56
+ the impact of marketing campaigns and activities to guide budget planning
57
+ decisions and improve overall media effectiveness. MMM uses aggregated data to
58
+ measure impact across marketing channels and account for non-marketing factors
59
+ that impact sales and other key performance indicators (KPIs). MMM is
60
+ privacy-safe and does not use any cookie or user-level information.
61
+
62
+ Meridian is an MMM framework that enables advertisers to set up and run their
63
+ own in-house models. Meridian helps you answer key questions such as:
64
+
65
+ * How did the marketing channels drive my revenue or other KPI?
66
+ * What was my marketing return on investment (ROI)?
67
+ * How do I optimize my marketing budget allocation for the future?
68
+
69
+ Meridian is a highly customizable modeling framework that is based on
70
+ [Bayesian causal inference](https://developers.google.com/meridian/docs/causal-inference/bayesian-inference).
71
+ It is capable of handling large scale geo-level data, which is encouraged if
72
+ available, but it can also be used for national-level modeling. Meridian
73
+ provides clear insights and visualizations to inform business decisions around
74
+ marketing budget and planning. Additionally, Meridian provides methodologies to
75
+ support calibration of MMM with experiments and other prior information, and to
76
+ optimize target ad frequency by utilizing reach and frequency data.
77
+
78
+ If you are using LightweightMMM, see the
79
+ [migration guide](https://developers.google.com/meridian/docs/migrate) to help
80
+ you understand the differences between these MMM projects.
81
+
82
+ ## Install Meridian
83
+
84
+ Python 3.11 or 3.12 is required to use Meridian. We also recommend using a
85
+ minimum of 1 GPU.
86
+
87
+ Note: This project has been tested on T4 GPU using 16 GB of RAM.
88
+
89
+ To install Meridian, run the following command to automatically install the
90
+ latest release from PyPI.
91
+
92
+ * For Linux-GPU users:
93
+
94
+ Note: CUDA toolchain and a compatible GPU device is necessary for
95
+ `[and-cuda]` extra to activate.
96
+
97
+ ```sh
98
+ $ pip install --upgrade google-meridian[and-cuda]
99
+ ```
100
+
101
+ * For macOS and general CPU users:
102
+
103
+ Note: There is no official GPU support for macOS.
104
+
105
+ ```sh
106
+ $ pip install --upgrade google-meridian
107
+ ```
108
+
109
+ Alternatively, run the following command to install the most recent, unreleased
110
+ version from GitHub.
111
+
112
+ * For GPU users:
113
+
114
+ ```sh
115
+ $ pip install --upgrade "google-meridian[and-cuda] @ git+https://github.com/google/meridian.git"
116
+ ```
117
+
118
+ * For CPU users:
119
+
120
+ ```sh
121
+ $ pip install --upgrade git+https://github.com/google/meridian.git
122
+ ```
123
+
124
+ We recommend to install Meridian in a fresh
125
+ [virtual environment](https://virtualenv.pypa.io/en/latest/user_guide.html#quick-start)
126
+ to make sure that correct versions of all the dependencies are installed, as
127
+ defined in [pyproject.toml](https://github.com/google/meridian/blob/main/pyproject.toml).
128
+
129
+ ## How to use the Meridian library
130
+
131
+ To get started with Meridian, you can run the code programmatically using sample
132
+ data with the [Getting Started Colab][3].
133
+
134
+ The Meridian model uses a holistic MCMC sampling approach called
135
+ [No U Turn Sampler (NUTS)](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/mcmc/NoUTurnSampler)
136
+ which can be compute intensive. To help with this, GPU support has been
137
+ developed across the library (out-of-the-box) using tensors. We recommend
138
+ running your Meridian model on GPUs to get real time optimization results and
139
+ significantly reduce training time.
140
+
141
+ ## Meridian Documentation & Tutorials
142
+
143
+ The following documentation, colab, and video resources will help you get
144
+ started quickly with using Meridian:
145
+
146
+ | Resource | Description |
147
+ | --------------------------- | ---------------------------------------------- |
148
+ | [Meridian documentation][1] | Main landing page for Meridian documentation. |
149
+ | [Meridian basics][2] | Learn about Meridian features, methodologies, and the model math. |
150
+ | [Getting started colab][3] | Install and quickly learn how to use Meridian with this colab tutorial using sample data. |
151
+ | [User guide][4] | A detailed walk-through of how to use Meridian and generating visualizations using your own data. |
152
+ | [Pre-modeling][5] | Prepare and analyze your data before modeling. |
153
+ | [Modeling][6] | Modeling guidance for model refinement and edge cases. |
154
+ | [Post-modeling][7] | Post-modeling guidance for model fit, visualizations, optimizations, refreshing the model, and debugging. |
155
+ | [Migrate from LMMM][8] | Learn about the differences between Meridian and LightweightMMM as you consider migrating. |
156
+ | [API Reference][9] | API reference documentation for the Meridian package. |
157
+ | [Reference list][10] | White papers and other referenced material. |
158
+
159
+ [1]: https://developers.google.com/meridian
160
+ [2]: https://developers.google.com/meridian/docs/basics/meridian-introduction
161
+ [3]: https://developers.google.com/meridian/notebook/meridian-getting-started
162
+ [4]: https://developers.google.com/meridian/docs/user-guide/installing
163
+ [5]: https://developers.google.com/meridian/docs/pre-modeling/collect-data
164
+ [6]: https://developers.google.com/meridian/docs/advanced-modeling/control-variables
165
+ [7]: https://developers.google.com/meridian/docs/post-modeling/model-fit
166
+ [8]: https://developers.google.com/meridian/docs/migrate
167
+ [9]: https://developers.google.com/meridian/reference/api/meridian
168
+ [10]: https://developers.google.com/meridian/docs/reference-list
169
+
170
+ ## Support
171
+
172
+ **Questions about methodology**: Please see the [Modeling](https://developers.google.com/meridian/docs/basics/meridian-introduction) tab in the technical documentation.
173
+
174
+ **Issues installing or using Meridian**: Feel free to post questions in the
175
+ [Discussions](https://github.com/google/meridian/discussions) or [Issues](https://github.com/google/meridian/issues) tabs of the Meridian GitHub repository. The Meridian team responds to
176
+ these questions weekly in batches, so please be patient and don't reach out
177
+ directly to your Google Account teams.
178
+
179
+ **Bug reports**: Please post bug reports to the [Issues](https://github.com/google/meridian/issues)
180
+ tab of the Meridian GitHub repository. We also encourage the community to share
181
+ tips and advice with each other on the [Issues](https://github.com/google/meridian/issues)
182
+ tab. When our team addresses or resolves a new bug, we will notify you through
183
+ the comments on the issue.
184
+
185
+ **Feature requests**: Please post these to the [Discussions](https://github.com/google/meridian/discussions)
186
+ tab of the Meridian GitHub repository. We have an internal roadmap for Meridian
187
+ development, but would love your inputs for new feature requests so that we can
188
+ prioritize them based on the roadmap.
189
+
190
+ **Pull requests**: These are appreciated but are very difficult for us to merge
191
+ because the code in this repository is linked to Google internal systems and has
192
+ to pass internal review. If you submit a pull request and we believe that we can
193
+ incorporate a change in the base code, we will reach out to you directly about
194
+ this.
195
+
196
+ ## Citing Meridian
197
+
198
+ To cite this repository:
199
+
200
+ <!-- mdlint off(SNIPPET_INVALID_LANGUAGE) -->
201
+ ```BibTeX
202
+ @software{meridian_github,
203
+ author = {Google Meridian Marketing Mix Modeling Team},
204
+ title = {Meridian: Marketing Mix Modeling},
205
+ url = {https://github.com/google/meridian},
206
+ version = {1.3.1},
207
+ year = {2025},
208
+ }
209
+ ```
@@ -19,6 +19,12 @@ meridian/analysis/summarizer.py
19
19
  meridian/analysis/summary_text.py
20
20
  meridian/analysis/test_utils.py
21
21
  meridian/analysis/visualizer.py
22
+ meridian/analysis/review/__init__.py
23
+ meridian/analysis/review/checks.py
24
+ meridian/analysis/review/configs.py
25
+ meridian/analysis/review/constants.py
26
+ meridian/analysis/review/results.py
27
+ meridian/analysis/review/reviewer.py
22
28
  meridian/analysis/templates/card.html.jinja
23
29
  meridian/analysis/templates/chart.html.jinja
24
30
  meridian/analysis/templates/chips.html.jinja
@@ -53,4 +59,22 @@ meridian/model/prior_sampler.py
53
59
  meridian/model/spec.py
54
60
  meridian/model/transformers.py
55
61
  meridian/model/eda/__init__.py
56
- meridian/model/eda/eda_engine.py
62
+ meridian/model/eda/constants.py
63
+ meridian/model/eda/eda_engine.py
64
+ meridian/model/eda/eda_outcome.py
65
+ meridian/model/eda/eda_spec.py
66
+ meridian/model/eda/meridian_eda.py
67
+ schema/__init__.py
68
+ schema/serde/__init__.py
69
+ schema/serde/constants.py
70
+ schema/serde/distribution.py
71
+ schema/serde/eda_spec.py
72
+ schema/serde/function_registry.py
73
+ schema/serde/hyperparameters.py
74
+ schema/serde/inference_data.py
75
+ schema/serde/marketing_data.py
76
+ schema/serde/meridian_serde.py
77
+ schema/serde/serde.py
78
+ schema/serde/test_data.py
79
+ schema/utils/__init__.py
80
+ schema/utils/time_record.py
@@ -5,9 +5,9 @@ joblib
5
5
  natsort<8,>=7.1.1
6
6
  numpy<3,>=2.0.2
7
7
  pandas<3,>=2.2.2
8
- patsy<0.5.4,>=0.5.3
8
+ patsy<1,>=0.5.3
9
9
  scipy<2,>=1.13.1
10
- statsmodels>=0.12.2
10
+ statsmodels>=0.14.5
11
11
  tensorflow<2.19,>=2.18
12
12
  tensorflow-probability<0.26,>=0.25
13
13
  tf-keras<2.19,>=2.18
@@ -29,7 +29,11 @@ pyink
29
29
  [jax]
30
30
  jax==0.4.26
31
31
  jaxlib==0.4.26
32
- tensorflow-probability[substrates-jax]<0.26,>=0.25
32
+ tensorflow-probability[substrates-jax]==0.25.0
33
33
 
34
34
  [mlflow]
35
35
  mlflow
36
+
37
+ [schema]
38
+ mmm-proto-schema
39
+ semver
@@ -17,5 +17,7 @@
17
17
  from meridian.analysis import analyzer
18
18
  from meridian.analysis import formatter
19
19
  from meridian.analysis import optimizer
20
+ from meridian.analysis import review
20
21
  from meridian.analysis import summarizer
21
22
  from meridian.analysis import visualizer
23
+