Skip to content

Commit 52c3ddf

Browse files
missed updates
1 parent facbac8 commit 52c3ddf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/sobol_sensitivity.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ by dividing other terms in the variance decomposition by `` Var(Y) ``.
4747
- `:Janon2014` - [Janon, A., Klein, T., Lagnoux, A., Nodet, M., & Prieur, C. (2014). Asymptotic normality and efficiency of two Sobol index estimators. ESAIM: Probability and Statistics, 18, 342-364.](https://arxiv.org/abs/1303.6451)
4848
4949
!!! note
50-
50+
5151
Sobol sampling should be done with $2^k$ points and randomization, take a look at the docs for [QuasiMonteCarlo](https://docs.sciml.ai/QuasiMonteCarlo/stable/randomization/). If the number of samples is not a power of 2, the number of sample points will be changed to the next power of 2.
5252
5353
### Example
5454
5555
```julia
56-
using GlobalSensitivity, QuasiMonteCarlo
56+
using GlobalSensitivity, QuasiMonteCarlo, Random
5757
5858
function ishi(X)
5959
A= 7
@@ -64,7 +64,7 @@ end
6464
samples = 524288
6565
lb = -ones(4)*π
6666
ub = ones(4)*π
67-
sampler = SobolSample()
67+
sampler = SobolSample(; R = QuasiMonteCarlo.OwenScramble(; base = 2, pad = 19, rng = Random.default_rng()))
6868
A,B = QuasiMonteCarlo.generate_design_matrices(samples,lb,ub,sampler)
6969
7070
res1 = gsa(ishi,Sobol(order=[0,1,2]),A,B)

test/sobol_method.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ end
2525
n = 524288
2626
lb = -ones(4) * π
2727
ub = ones(4) * π
28-
sampler = SobolSample()
28+
sampler = SobolSample(; R = QuasiMonteCarlo.OwenScramble(; base = 2, pad = 19, rng = Random.default_rng()))
2929
A, B = QuasiMonteCarlo.generate_design_matrices(n, lb, ub, sampler)
3030

3131
res1 = gsa(ishi, Sobol(order = [0, 1, 2]), A, B)

0 commit comments

Comments
 (0)