mirror of
https://github.com/Richard-Sti/csiborgtools.git
synced 2025-01-02 13:34:16 +00:00
Add 1 / r^2 prior on magnitude of the vector
This commit is contained in:
parent
231a58d63c
commit
201e5e262f
1 changed files with 8 additions and 1 deletions
|
@ -925,10 +925,17 @@ def PV_validation_model(models, distmod_hyperparams_per_model,
|
||||||
inference_method : str
|
inference_method : str
|
||||||
Either `mike` or `bayes`.
|
Either `mike` or `bayes`.
|
||||||
"""
|
"""
|
||||||
|
ll = 0.0
|
||||||
|
|
||||||
field_calibration_params = sample_calibration(
|
field_calibration_params = sample_calibration(
|
||||||
**field_calibration_hyperparams)
|
**field_calibration_hyperparams)
|
||||||
|
|
||||||
ll = 0.0
|
# We sample the components of Vext with a uniform prior, which means
|
||||||
|
# there is a |Vext|^2 prior, we correct for this so that the sampling
|
||||||
|
# is effecitvely uniformly in magnitude of Vext and angles.
|
||||||
|
if "Vext" in field_calibration_params:
|
||||||
|
ll -= jnp.log(jnp.sum(field_calibration_params["Vext"]**2))
|
||||||
|
|
||||||
for n in range(len(models)):
|
for n in range(len(models)):
|
||||||
model = models[n]
|
model = models[n]
|
||||||
name = model.name
|
name = model.name
|
||||||
|
|
Loading…
Reference in a new issue