Skip to content

Commit

Permalink
Increase test case sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle committed Sep 29, 2024
1 parent 5c1d5c6 commit 40e3a75
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/controlled.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Simulation requires a vector of controls, each being a vector itself with the ri
Let us build several sequences of variable lengths.
=#

control_seqs = [[randn(rng, d) for t in 1:rand(100:200)] for k in 1:100];
control_seqs = [[randn(rng, d) for t in 1:rand(100:200)] for k in 1:300];
obs_seqs = [rand(rng, hmm, control_seq).obs_seq for control_seq in control_seqs];

obs_seq = reduce(vcat, obs_seqs)
Expand Down Expand Up @@ -151,5 +151,5 @@ hcat(hmm_est.dist_coeffs[2], hmm.dist_coeffs[2])

@test hmm_est.dist_coeffs[1] hmm.dist_coeffs[1] atol = 0.05 #src
@test hmm_est.dist_coeffs[2] hmm.dist_coeffs[2] atol = 0.05 #src
test_coherent_algorithms(rng, hmm, control_seq; seq_ends, hmm_guess, atol=0.08, init=false) #src
test_coherent_algorithms(rng, hmm, control_seq; seq_ends, hmm_guess, init=false) #src
test_type_stability(rng, hmm, control_seq; seq_ends, hmm_guess) #src
4 changes: 2 additions & 2 deletions examples/temporal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ obs_seq'
We now generate several sequences of variable lengths, for inference and learning tasks.
=#

control_seqs = [1:rand(rng, 100:200) for k in 1:1000]
control_seqs = [1:rand(rng, 300:500) for k in 1:1000]
obs_seqs = [rand(rng, hmm, control_seqs[k]).obs_seq for k in eachindex(control_seqs)];

obs_seq = reduce(vcat, obs_seqs)
Expand Down Expand Up @@ -184,5 +184,5 @@ map(mean, hcat(obs_distributions(hmm_est, 2), obs_distributions(hmm, 2)))
# ## Tests #src

@test mean(obs_seq[1:2:end]) < 0 < mean(obs_seq[2:2:end]) #src
test_coherent_algorithms(rng, hmm, control_seq; seq_ends, hmm_guess, atol=0.09, init=false) #src
test_coherent_algorithms(rng, hmm, control_seq; seq_ends, hmm_guess, init=false) #src
test_type_stability(rng, hmm, control_seq; seq_ends, hmm_guess) #src
2 changes: 1 addition & 1 deletion examples/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Another useful array type is [StaticArrays.jl](https://github.com/JuliaArrays/St

seq_ends = cumsum(rand(rng, 100:200, 1000)); #src
control_seq = fill(nothing, last(seq_ends)); #src
test_coherent_algorithms(rng, hmm, control_seq; seq_ends, hmm_guess, init=false, atol=0.08) #src
test_coherent_algorithms(rng, hmm, control_seq; seq_ends, hmm_guess, init=false) #src
test_type_stability(rng, hmm, control_seq; seq_ends, hmm_guess) #src
# https://github.com/JuliaSparse/SparseArrays.jl/issues/469 #src
@test_skip test_allocations(rng, hmm, control_seq; seq_ends, hmm_guess) #src
2 changes: 1 addition & 1 deletion test/correctness.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rng = StableRNG(63)

## Settings

T, K = 50, 200
T, K = 100, 200

init = [0.4, 0.6]
init_guess = [0.5, 0.5]
Expand Down

0 comments on commit 40e3a75

Please sign in to comment.