Skip to content

Commit

Permalink
ProgressMeter
Browse files Browse the repository at this point in the history
  • Loading branch information
montyvesselinov committed Nov 2, 2023
1 parent 77e79af commit 437d67f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ version = "1.2.2"

[deps]
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RobustPmap = "27aeedcb-f738-516b-a0b8-3211cf1146e5"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
JLD2 = "0.4, 0.5, 1"
ProgressMeter = "1"
RobustPmap = "1"
Statistics = "1, 2"
julia = "1.9"
Expand Down
3 changes: 2 additions & 1 deletion src/AffineInvariantMCMC.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Module: AffineInvariantMCMC
module AffineInvariantMCMC

import RobustPmap
import ProgressMeter
import Random

const emceedir = splitdir(splitdir(pathof(AffineInvariantMCMC))[1])[1]
Expand Down Expand Up @@ -53,7 +54,7 @@ function sample(llhood::Function, numwalkers::Integer, x0::AbstractMatrix, numsa
batch1 = 1:div(numwalkers, 2)
batch2 = div(numwalkers, 2) + 1:numwalkers
divisions = [(batch1, batch2), (batch2, batch1)]
for i = 1:numsamples_perwalker
@ProgressMeter.showprogress 5 for i = 1:numsamples_perwalker
for ensembles in divisions
active, inactive = ensembles
zs = map(u->((a - 1) * u + 1)^2 / a, rand(rng, length(active)))
Expand Down

0 comments on commit 437d67f

Please sign in to comment.