bayinx 0.3.6__py3-none-any.whl → 0.3.8__py3-none-any.whl
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.
bayinx/core/_variational.py
CHANGED
@@ -106,8 +106,8 @@ class Variational(eqx.Module, Generic[M]):
|
|
106
106
|
dyn, static = eqx.partition(self, self.filter_spec)
|
107
107
|
|
108
108
|
# Construct scheduler
|
109
|
-
schedule: Schedule = opx.
|
110
|
-
init_value=learning_rate, decay_steps=max_iters
|
109
|
+
schedule: Schedule = opx.warmup_cosine_decay_schedule(
|
110
|
+
init_value=1e-16, peak_value=learning_rate, warmup_steps=int(max_iters/10), decay_steps=max_iters-int(max_iters/10)
|
111
111
|
)
|
112
112
|
|
113
113
|
# Initialize optimizer
|
@@ -163,7 +163,7 @@ class Variational(eqx.Module, Generic[M]):
|
|
163
163
|
|
164
164
|
@eqx.filter_jit
|
165
165
|
def posterior_predictive(
|
166
|
-
self, func: Callable[[M], Array], n: int, key: Key = jr.PRNGKey(0)
|
166
|
+
self, func: Callable[[M], Array], n: int, data: Any = None, key: Key = jr.PRNGKey(0)
|
167
167
|
) -> Array:
|
168
168
|
# Sample draws from the variational approximation
|
169
169
|
draws: Array = self.sample(n, key)
|
@@ -171,7 +171,7 @@ class Variational(eqx.Module, Generic[M]):
|
|
171
171
|
# Evaluate posterior predictive
|
172
172
|
@jax.jit
|
173
173
|
@jax.vmap
|
174
|
-
def evaluate(draw: Array):
|
174
|
+
def evaluate(draw: Array, data: Any = None):
|
175
175
|
# Reconstruct model
|
176
176
|
model: M = self._unflatten(draw)
|
177
177
|
|
@@ -7,7 +7,7 @@ bayinx/core/_constraint.py,sha256=Gx07ZT66VE2y-qZCmBDm3_y0wO4xQyslZW10Lec1_lM,76
|
|
7
7
|
bayinx/core/_flow.py,sha256=3q4rKvATnbUpuj4ICUd4lIxu_3z7GRDuNujVhAku1X0,2342
|
8
8
|
bayinx/core/_model.py,sha256=FJUyYVE9e2uTFamxtSMKY_VV2stiU2QF68Wl_7EAKEU,2895
|
9
9
|
bayinx/core/_parameter.py,sha256=r20JedTW2lY0miNNh9y6LeIVAsGX1kP_rlGxphW_jZg,1080
|
10
|
-
bayinx/core/_variational.py,sha256=
|
10
|
+
bayinx/core/_variational.py,sha256=omZ3jFrYNdjfDVAOmNhjPtOrJcBD6yFlypvFROn6GgU,5467
|
11
11
|
bayinx/dists/__init__.py,sha256=9DdPea7HAnBOzaV_4gM5noPX8YCb_p06d8PJvGfFy3Y,118
|
12
12
|
bayinx/dists/bernoulli.py,sha256=xMV9BgtVX_1XkPdZ43q0meMIEkgMyuUPx--dyo6_DKs,1006
|
13
13
|
bayinx/dists/gamma2.py,sha256=MuFudL2UTfk8HgWVofNaR36JTmUpmtxvg1Mifu98MvM,1567
|
@@ -29,7 +29,7 @@ bayinx/mhx/vi/flows/fullaffine.py,sha256=11y_A0oO3bkKDSz-EQ6Sf4Ec2M7vHZxw94EdvAD
|
|
29
29
|
bayinx/mhx/vi/flows/planar.py,sha256=2I2WzIskl8MRpJkK13FQE3vSF-077qo8gRed_EL1Pn8,1920
|
30
30
|
bayinx/mhx/vi/flows/radial.py,sha256=e0GfuO-CL8SVr3YnEfsxStpyKcJlFpzMyjMp3sa38hg,2503
|
31
31
|
bayinx/mhx/vi/flows/sylvester.py,sha256=ppK0BmS_ThvrCEhJiP_-p-kj67TQHSlU_RUZpDbIhsQ,469
|
32
|
-
bayinx-0.3.
|
33
|
-
bayinx-0.3.
|
34
|
-
bayinx-0.3.
|
35
|
-
bayinx-0.3.
|
32
|
+
bayinx-0.3.8.dist-info/METADATA,sha256=Z6oJm_2TgfJyhle7aG-DeDiW3LqE6Mcwt8iNku5ai54,3079
|
33
|
+
bayinx-0.3.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
34
|
+
bayinx-0.3.8.dist-info/licenses/LICENSE,sha256=VMhLhj5hx6VAENZBaNfXrmsNl7ov9uRh0jZ6D3ltgv4,1070
|
35
|
+
bayinx-0.3.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|