@@ -22,7 +22,7 @@ def test_cycle_component_deterministic(rng):
22
22
cycle = st .CycleComponent (
23
23
name = "cycle" , cycle_length = 12 , estimate_cycle_length = False , innovations = False
24
24
)
25
- params = {"cycle " : np .array ([1.0 , 1.0 ], dtype = config .floatX )}
25
+ params = {"params_cycle " : np .array ([1.0 , 1.0 ], dtype = config .floatX )}
26
26
x , y = simulate_from_numpy_model (cycle , rng , params , steps = 12 * 12 )
27
27
28
28
assert_pattern_repeats (y , 12 , atol = ATOL , rtol = RTOL )
@@ -32,7 +32,10 @@ def test_cycle_component_with_dampening(rng):
32
32
cycle = st .CycleComponent (
33
33
name = "cycle" , cycle_length = 12 , estimate_cycle_length = False , innovations = False , dampen = True
34
34
)
35
- params = {"cycle" : np .array ([10.0 , 10.0 ], dtype = config .floatX ), "dampening_factor_cycle" : 0.75 }
35
+ params = {
36
+ "params_cycle" : np .array ([10.0 , 10.0 ], dtype = config .floatX ),
37
+ "dampening_factor_cycle" : 0.75 ,
38
+ }
36
39
x , y = simulate_from_numpy_model (cycle , rng , params , steps = 100 )
37
40
38
41
# check that cycle dampens to zero over time
@@ -44,7 +47,7 @@ def test_cycle_component_with_innovations_and_cycle_length(rng):
44
47
name = "cycle" , estimate_cycle_length = True , innovations = True , dampen = True
45
48
)
46
49
params = {
47
- "cycle " : np .array ([1.0 , 1.0 ], dtype = config .floatX ),
50
+ "params_cycle " : np .array ([1.0 , 1.0 ], dtype = config .floatX ),
48
51
"length_cycle" : 12.0 ,
49
52
"dampening_factor_cycle" : 0.95 ,
50
53
"sigma_cycle" : 1.0 ,
@@ -64,7 +67,7 @@ def test_cycle_multivariate_deterministic(rng):
64
67
innovations = False ,
65
68
observed_state_names = ["data_1" , "data_2" , "data_3" ],
66
69
)
67
- params = {"cycle " : np .array ([[1.0 , 1.0 ], [2.0 , 2.0 ], [3.0 , 3.0 ]], dtype = config .floatX )}
70
+ params = {"params_cycle " : np .array ([[1.0 , 1.0 ], [2.0 , 2.0 ], [3.0 , 3.0 ]], dtype = config .floatX )}
68
71
x , y = simulate_from_numpy_model (cycle , rng , params , steps = 12 * 12 )
69
72
70
73
# Check that each variable has a cyclical pattern with the expected period
@@ -139,7 +142,7 @@ def test_cycle_multivariate_with_dampening(rng):
139
142
observed_state_names = ["data_1" , "data_2" , "data_3" ],
140
143
)
141
144
params = {
142
- "cycle " : np .array ([[10.0 , 10.0 ], [20.0 , 20.0 ], [30.0 , 30.0 ]], dtype = config .floatX ),
145
+ "params_cycle " : np .array ([[10.0 , 10.0 ], [20.0 , 20.0 ], [30.0 , 30.0 ]], dtype = config .floatX ),
143
146
"dampening_factor_cycle" : 0.75 ,
144
147
}
145
148
x , y = simulate_from_numpy_model (cycle , rng , params , steps = 100 )
@@ -167,7 +170,7 @@ def test_cycle_multivariate_with_innovations_and_cycle_length(rng):
167
170
observed_state_names = ["data_1" , "data_2" , "data_3" ],
168
171
)
169
172
params = {
170
- "cycle " : np .array ([[1.0 , 1.0 ], [2.0 , 2.0 ], [3.0 , 3.0 ]], dtype = config .floatX ),
173
+ "params_cycle " : np .array ([[1.0 , 1.0 ], [2.0 , 2.0 ], [3.0 , 3.0 ]], dtype = config .floatX ),
171
174
"length_cycle" : 12.0 ,
172
175
"dampening_factor_cycle" : 0.95 ,
173
176
"sigma_cycle" : np .array ([0.5 , 1.0 , 1.5 ]), # different innov variances per var
0 commit comments