Skip to content

Commit

Permalink
missed updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaibhavdixit02 committed May 30, 2024
1 parent facbac8 commit 52c3ddf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/sobol_sensitivity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ by dividing other terms in the variance decomposition by `` Var(Y) ``.
- `: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)
!!! note
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.
### Example
```julia
using GlobalSensitivity, QuasiMonteCarlo
using GlobalSensitivity, QuasiMonteCarlo, Random
function ishi(X)
A= 7
Expand All @@ -64,7 +64,7 @@ end
samples = 524288
lb = -ones(4)*π
ub = ones(4)*π
sampler = SobolSample()
sampler = SobolSample(; R = QuasiMonteCarlo.OwenScramble(; base = 2, pad = 19, rng = Random.default_rng()))
A,B = QuasiMonteCarlo.generate_design_matrices(samples,lb,ub,sampler)
res1 = gsa(ishi,Sobol(order=[0,1,2]),A,B)
Expand Down
2 changes: 1 addition & 1 deletion test/sobol_method.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ end
n = 524288
lb = -ones(4) * π
ub = ones(4) * π
sampler = SobolSample()
sampler = SobolSample(; R = QuasiMonteCarlo.OwenScramble(; base = 2, pad = 19, rng = Random.default_rng()))
A, B = QuasiMonteCarlo.generate_design_matrices(n, lb, ub, sampler)

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

0 comments on commit 52c3ddf

Please sign in to comment.