You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/main.jl
+7-4
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
7
block=16,
8
8
measure::Union{Nothing,Function}=nothing,
9
9
measurefreq::Int=1,
10
+
nburnin::Int=100,
10
11
inplace::Bool=false,
11
12
adapt=true,
12
13
gamma=1.0,
@@ -35,6 +36,7 @@ Calculate the integrals, collect statistics, and return a `Result` struct contai
35
36
- For `solver = :vegas` or `:vegasmc`, the function signature should be `measure(var, obs, relative_weights, config)`. Here, `obs` is a vector of observable values for each component of the integrand and `relative_weights` are the weights calculated from the integrand multiplied by the probability of the corresponding variables.
36
37
- For `solver = :mcmc`, the signature should be `measure(idx, var, obs, relative_weight, config)`, where `obs` is the observable vector and `relative_weight` is the weight calculated from the `idx`-th integrand multiplied by the probability of the variables.
37
38
- `measurefreq`: How often the measurement function is called (default: `1`).
39
+
- `nburnin` : Tha thermalization steps for MCMC method
38
40
- `inplace`: Whether to use the inplace version of the integrand. Default is `false`, which is more convenient for integrand with a few return values but may cause type instability. Only useful for the :vegas and :vegasmc solver.
39
41
- `adapt`: Whether to adapt the grid and the reweight factor (default: `true`).
40
42
- `gamma`: Learning rate of the reweight factor after each iteration (default: `1.0`).
@@ -80,6 +82,7 @@ function integrate(integrand::Function;
80
82
ignore::Int=adapt ?1:0, #ignore the first `ignore` iterations in average
81
83
measure::Union{Nothing,Function}=nothing,
82
84
measurefreq::Int=1,
85
+
nburnin::Int=100,
83
86
inplace::Bool=false, # whether to use the inplace version of the integrand
84
87
parallel::Symbol=:nothread, # :thread or :nothread
85
88
print=-1, printio=stdout, timer=[],
@@ -151,13 +154,13 @@ function integrate(integrand::Function;
0 commit comments