From b950ec400eaf17a2ced4009509e126e0a59b4220 Mon Sep 17 00:00:00 2001 From: LegrandNico Date: Fri, 13 Oct 2023 13:45:47 +0200 Subject: [PATCH] tests --- tests/test_binary.py | 6 ++++++ tests/test_continuous.py | 12 ++++++++++++ tests/test_distribution.py | 4 ++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/test_binary.py b/tests/test_binary.py index fc5281b0f..b364090db 100644 --- a/tests/test_binary.py +++ b/tests/test_binary.py @@ -63,6 +63,8 @@ def test_update_binary_input_parents(self): "value_coupling_parents": (1.0,), "volatility_coupling_parents": None, "volatility_coupling_children": None, + "autoregressive_coefficient": 0.0, + "autoregressive_intercept": 0.0, "mean": 1.0, "tonic_volatility": 1.0, "tonic_drift": 0.0, @@ -75,6 +77,8 @@ def test_update_binary_input_parents(self): "value_coupling_parents": None, "volatility_coupling_parents": (1.0,), "volatility_coupling_children": None, + "autoregressive_coefficient": 0.0, + "autoregressive_intercept": 0.0, "mean": 1.0, "tonic_volatility": 1.0, "tonic_drift": 0.0, @@ -87,6 +91,8 @@ def test_update_binary_input_parents(self): "value_coupling_parents": None, "volatility_coupling_parents": None, "volatility_coupling_children": (1.0,), + "autoregressive_coefficient": 0.0, + "autoregressive_intercept": 0.0, "mean": 1.0, "tonic_volatility": 1.0, "tonic_drift": 0.0, diff --git a/tests/test_continuous.py b/tests/test_continuous.py index 56ecc2c65..f27c24399 100644 --- a/tests/test_continuous.py +++ b/tests/test_continuous.py @@ -37,6 +37,8 @@ def test_continuous_node_update(self): "value_coupling_parents": None, "volatility_coupling_parents": None, "volatility_coupling_children": None, + "autoregressive_coefficient": 0.0, + "autoregressive_intercept": 0.0, "mean": 1.0, "tonic_volatility": 1.0, "tonic_drift": 0.0, @@ -49,6 +51,8 @@ def test_continuous_node_update(self): "value_coupling_parents": None, "volatility_coupling_parents": None, "volatility_coupling_children": None, + "autoregressive_coefficient": 0.0, + "autoregressive_intercept": 0.0, "mean": 1.0, "tonic_volatility": 1.0, "tonic_drift": 0.0, @@ -108,6 +112,8 @@ def test_continuous_input_update(self): "value_coupling_parents": None, "volatility_coupling_parents": (1.0,), "volatility_coupling_children": None, + "autoregressive_coefficient": 0.0, + "autoregressive_intercept": 0.0, "mean": 1.0, "tonic_volatility": 1.0, "tonic_drift": 0.0, @@ -120,6 +126,8 @@ def test_continuous_input_update(self): "value_coupling_parents": None, "volatility_coupling_parents": None, "volatility_coupling_children": (1.0,), + "autoregressive_coefficient": 0.0, + "autoregressive_intercept": 0.0, "mean": 1.0, "tonic_volatility": 1.0, "tonic_drift": 0.0, @@ -190,6 +198,8 @@ def test_scan_loop(self): "value_coupling_parents": None, "volatility_coupling_parents": (1.0,), "volatility_coupling_children": None, + "autoregressive_coefficient": 0.0, + "autoregressive_intercept": 0.0, "mean": 1.0, "tonic_volatility": -3.0, "tonic_drift": 0.0, @@ -202,6 +212,8 @@ def test_scan_loop(self): "value_coupling_parents": None, "volatility_coupling_parents": None, "volatility_coupling_children": (1.0,), + "autoregressive_coefficient": 0.0, + "autoregressive_intercept": 0.0, "mean": 1.0, "tonic_volatility": -3.0, "tonic_drift": 0.0, diff --git a/tests/test_distribution.py b/tests/test_distribution.py index 6d30c5142..dd795bc16 100644 --- a/tests/test_distribution.py +++ b/tests/test_distribution.py @@ -149,7 +149,7 @@ def test_grad_logp(self): np.array(0.0), ) - assert jnp.isclose(tonic_volatility_1, -8.440489) + assert jnp.isclose(tonic_volatility_1, -8.440622) ############## # Binary HGF # @@ -317,7 +317,7 @@ def test_aesara_grad_logp(self): volatility_coupling_1=1.0, )[0].eval() - assert jnp.isclose(tonic_volatility_1, -8.440489) + assert jnp.isclose(tonic_volatility_1, -8.440622) ############## # Binary HGF #