Skip to content

Commit bd10714

Browse files
author
andre_ramos
committed
add tests for get_cycle_decomposition
1 parent 7a83217 commit bd10714

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/models/structural_model.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,23 @@ end
508508
model, model.output.components, slope
509509
)
510510
@test length(trend) == 10
511+
512+
model = StateSpaceLearning.StructuralModel(
513+
rand(100);
514+
cycle="stochastic",
515+
cycle_period=3,
516+
outlier=false,
517+
slope="stochastic",
518+
ζ_threshold=0,
519+
freq_seasonal=3,
520+
ω_threshold=0,
521+
ϕ_threshold=0,
522+
stochastic_start=30,
523+
)
524+
StateSpaceLearning.fit!(model)
525+
@test length(
526+
StateSpaceLearning.get_cycle_decomposition(model, model.output.components, 3)
527+
) == 100
511528
end
512529

513530
@testset "Function: simulate_states" begin

0 commit comments

Comments
 (0)