diff --git a/examples/controlled.jl b/examples/controlled.jl index 1f2451b9..764d3939 100644 --- a/examples/controlled.jl +++ b/examples/controlled.jl @@ -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) @@ -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 diff --git a/examples/temporal.jl b/examples/temporal.jl index 9c9549f4..2c59277b 100644 --- a/examples/temporal.jl +++ b/examples/temporal.jl @@ -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) @@ -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 diff --git a/examples/types.jl b/examples/types.jl index 628155c7..32901c46 100644 --- a/examples/types.jl +++ b/examples/types.jl @@ -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 diff --git a/test/correctness.jl b/test/correctness.jl index 7b2706d1..d495f460 100644 --- a/test/correctness.jl +++ b/test/correctness.jl @@ -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]