Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LegrandNico committed Oct 13, 2023
1 parent 43d9652 commit b950ec4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
6 changes: 6 additions & 0 deletions tests/test_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
12 changes: 12 additions & 0 deletions tests/test_continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 #
Expand Down Expand Up @@ -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 #
Expand Down

0 comments on commit b950ec4

Please sign in to comment.