Skip to content

Commit

Permalink
Center acceptancedist around 0.58
Browse files Browse the repository at this point in the history
  • Loading branch information
brenhinkeller committed Nov 25, 2022
1 parent 22066ec commit ee89eab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/testcomplete.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,17 @@ llmean = mean(@view(lldist[model.burnin:end]))
@info "Mean ll: $llmean"

@test isa(acceptancedist, AbstractVector{Bool})
@test isapprox(mean(acceptancedist), 0.5, atol=0.3)
@test isapprox(mean(acceptancedist), 0.58, atol=0.3)
@info "Mean acceptance rate: $(mean(acceptancedist[model.burnin:end]))"

@test isa(ndist, AbstractVector{Int})
@test minimum(ndist) >= 0
@test maximum(ndist) <= model.maxpoints
@info "Mean npoints: $(mean(ndist[model.burnin:end]))"

@info "Mean σⱼₜ: $(mean(σⱼtdist[model.burnin:end]))"
@info "Mean σⱼT: $(mean(σⱼTdist[model.burnin:end]))"

## ---
detail = DetailInterval(
agemin = 0, # Youngest end of detail interval
Expand Down Expand Up @@ -173,7 +176,7 @@ llmean = mean(@view(lldist[model.burnin:end]))
@info "Mean ll: $llmean"

@test isa(acceptancedist, AbstractVector{Bool})
@test isapprox(mean(acceptancedist), 0.5, atol=0.3)
@test isapprox(mean(acceptancedist), 0.58, atol=0.3)
@info "Mean acceptance rate: $(mean(acceptancedist[model.burnin:end]))"

@test isa(ndist, AbstractVector{Int})
Expand Down

0 comments on commit ee89eab

Please sign in to comment.