Skip to content

Commit b49608a

Browse files
format
1 parent d060c3c commit b49608a

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ KernelDensity = "0.6.4"
3131
LinearAlgebra = "1.10"
3232
OrdinaryDiffEq = "6.62"
3333
Parameters = "0.12"
34-
QuasiMonteCarlo = "0.3"
34+
QuasiMonteCarlo = "0.3.0"
3535
Random = "1.10"
3636
RecursiveArrayTools = "3.2"
3737
SafeTestsets = "0.1"

docs/src/tutorials/shapley.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ barplot(
128128
xticklabelrotation = 1,
129129
xticks = (1:54, ["θ$i" for i in 1:54]),
130130
ylabel = "Shapley Indices",
131-
limits = (nothing, (0.0, 0.2)),
132-
),
131+
limits = (nothing, (0.0, 0.2))
132+
)
133133
)
134134
```
135135

@@ -160,7 +160,7 @@ barplot(
160160
xticklabelrotation = 1,
161161
xticks = (1:54, ["θ$i" for i in 1:54]),
162162
ylabel = "Shapley Indices",
163-
limits = (nothing, (0.0, 0.2)),
164-
),
163+
limits = (nothing, (0.0, 0.2))
164+
)
165165
)
166166
```

src/shapley_sensitivity.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ function gsa(f, method::Shapley, input_distribution::SklarDist; batch = false)
204204
Copulas.subsetdims(input_distribution, idx_minus), n_outer)
205205

206206
if size(sample_complement, 2) == 1
207-
sample_complement = reshape(sample_complement, (1, length(sample_complement)))
207+
sample_complement = reshape(
208+
sample_complement, (1, length(sample_complement)))
208209
end
209210

210211
for l in 1:n_outer

src/sobol_sensitivity.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,8 @@ function gsa_sobol_all_y_analysis(method, all_y::AbstractArray{T}, d, n, Ei_esti
342342
nboot > 1 ? reshape(ST_CI, size_...) : nothing)
343343
end
344344

345-
function gsa(f, method::Sobol, p_range::AbstractVector; samples, rng::AbstractRNG = Random.default_rng(), kwargs...)
345+
function gsa(f, method::Sobol, p_range::AbstractVector; samples,
346+
rng::AbstractRNG = Random.default_rng(), kwargs...)
346347
log2num = ceil(Int, log2(samples))
347348
samples2n = 2^log2num
348349
if samples2n != samples
@@ -351,7 +352,8 @@ function gsa(f, method::Sobol, p_range::AbstractVector; samples, rng::AbstractRN
351352
end
352353
AB = QuasiMonteCarlo.generate_design_matrices(samples, [i[1] for i in p_range],
353354
[i[2] for i in p_range],
354-
QuasiMonteCarlo.SobolSample(; R=QuasiMonteCarlo.OwenScramble(; base=2, pad=log2num, rng)),
355+
QuasiMonteCarlo.SobolSample(;
356+
R = QuasiMonteCarlo.OwenScramble(; base = 2, pad = log2num, rng)),
355357
2 * method.nboot)
356358
A = reduce(hcat, @view(AB[1:(method.nboot)]))
357359
B = reduce(hcat, @view(AB[(method.nboot + 1):end]))

0 commit comments

Comments
 (0)