Skip to content

Commit

Permalink
add back in accidentally commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
digicosmos86 committed Feb 22, 2024
1 parent 4e1246e commit 1a6a17d
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions tests/test_distribution_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,30 +208,30 @@ def logp_ddm_extra_fields(data, v, a, z, t, x, y):
/ 2.0,
)

# ddm_model = hssm.HSSM(data=data_ddm)
# ddm_model_p = hssm.HSSM(
# data=data_ddm_copy,
# model_config=dict(extra_fields=["x", "y"]),
# loglik=logp_ddm_extra_fields,
# )
# ddm_model_p_logp_without_lapse = (
# pm.logp(
# ddm_model_p.model_distribution.dist(**true_values, p_outlier=0),
# data_ddm,
# )
# / 2
# )
# ddm_model_p_logp_lapse = pt.log(
# 0.95 * pt.exp(ddm_model_p_logp_without_lapse)
# + 0.05
# * pt.exp(pm.logp(pm.Uniform.dist(lower=0.0, upper=10.0), data_ddm["rt"].values))
# )
# np.testing.assert_almost_equal(
# pm.logp(
# ddm_model.model_distribution.dist(**true_values, p_outlier=0.05), data_ddm
# ).eval(),
# ddm_model_p_logp_lapse.eval(),
# )
ddm_model = hssm.HSSM(data=data_ddm)
ddm_model_p = hssm.HSSM(
data=data_ddm_copy,
model_config=dict(extra_fields=["x", "y"]),
loglik=logp_ddm_extra_fields,
)
ddm_model_p_logp_without_lapse = (
pm.logp(
ddm_model_p.model_distribution.dist(**true_values, p_outlier=0),
data_ddm,
)
/ 2
)
ddm_model_p_logp_lapse = pt.log(
0.95 * pt.exp(ddm_model_p_logp_without_lapse)
+ 0.05
* pt.exp(pm.logp(pm.Uniform.dist(lower=0.0, upper=10.0), data_ddm["rt"].values))
)
np.testing.assert_almost_equal(
pm.logp(
ddm_model.model_distribution.dist(**true_values, p_outlier=0.05), data_ddm
).eval(),
ddm_model_p_logp_lapse.eval(),
)


def test_ensure_positive_ndt():
Expand Down

0 comments on commit 1a6a17d

Please sign in to comment.