Skip to content

Commit

Permalink
Update shapley_sensitivity.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaibhavdixit02 authored May 30, 2024
1 parent 394dc74 commit dd610a7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/shapley_sensitivity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ function gsa(f, method::Shapley, input_distribution::SklarDist; batch = false)
sample_complement = rand(
Copulas.subsetdims(input_distribution, idx_minus), n_outer)

if size(sample_complement, 2) == 1
sample_complement = reshape(
sample_complement, (1, length(sample_complement)))
end

for l in 1:n_outer
curr_sample = @view sample_complement[:, l]
# Sampling of the set conditionally to the complementary element
Expand Down

0 comments on commit dd610a7

Please sign in to comment.