Skip to content

Commit

Permalink
Internal change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 527614892
Change-Id: I8ab428bfb6b670b09c2aa5d06600f2fdcaedf964
  • Loading branch information
sam-bailey authored and copybara-github committed Apr 27, 2023
1 parent 262a77d commit f643f72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lightweight_mmm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
Detailed documentation and examples can be found in the
[Github repository](https://github.com/google/lightweight_mmm).
"""
__version__ = "0.1.7.1"
__version__ = "0.1.8"
6 changes: 5 additions & 1 deletion lightweight_mmm/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,12 @@ def media_mix_model(
name="geo_media_plate",
size=n_geos,
dim=-1):
# Corrects the mean to be the same as in the channel only case.
normalisation_factor = jnp.sqrt(2.0 / jnp.pi)
coef_media = numpyro.sample(
name="coef_media", fn=dist.HalfNormal(scale=coef_media))
name="coef_media",
fn=dist.HalfNormal(scale=coef_media * normalisation_factor)
)

with numpyro.plate(name=f"{_GAMMA_SEASONALITY}_sin_cos_plate", size=2):
with numpyro.plate(name=f"{_GAMMA_SEASONALITY}_plate",
Expand Down

0 comments on commit f643f72

Please sign in to comment.