@@ -25,33 +25,31 @@ n_perms = -1;
25
25
n_var = 10_000 ;
26
26
n_outer = 1000 ;
27
27
n_inner = 3 ;
28
- dim = 3 ;
29
- margins = (Uniform (- pi , pi ), Uniform (- pi , pi ), Uniform (- pi , pi ));
28
+ dim = 4 ;
29
+ margins = (Uniform (- pi , pi ), Uniform (- pi , pi ), Uniform (- pi , pi ), Uniform ( - pi , pi ) );
30
30
dependency_matrix = Matrix (4 * I, dim, dim);
31
31
C = GaussianCopula (dependency_matrix);
32
32
input_distribution = SklarDist (C, margins);
33
-
34
33
method = Shapley (n_perms = n_perms,
35
34
n_var = n_var,
36
35
n_outer = n_outer,
37
36
n_inner = n_inner);
38
-
39
37
# ---> non batch
40
38
@time result = gsa (ishi, method, input_distribution, batch = false )
41
39
42
40
@test result. shapley_effects[1 ]≈ 0.43813841765976547 atol= 1e-1
43
41
@test result. shapley_effects[2 ]≈ 0.44673952698721386 atol= 1e-1
44
- @test result. shapley_effects[3 ]≈ 0.23144736934254417 atol= 1e-1
45
- # @test result.shapley_effects[4]≈0.0 atol=1e-1
42
+ @test result. shapley_effects[3 ]≈ 0.11855122481995543 atol= 1e-1
43
+ @test result. shapley_effects[4 ]≈ 0.0 atol= 1e-1
46
44
# <---- non batch
47
45
48
46
# ---> batch
49
47
result = gsa (ishi_batch, method, input_distribution, batch = true );
50
48
51
49
@test result. shapley_effects[1 ]≈ 0.44080027198796035 atol= 1e-1
52
50
@test result. shapley_effects[2 ]≈ 0.43029987176805085 atol= 1e-1
53
- @test result. shapley_effects[3 ]≈ 0.23144736934254417 atol= 1e-1
54
- # @test result.shapley_effects[4]≈0.0 atol=1e-1
51
+ @test result. shapley_effects[3 ]≈ 0.11855122481995543 atol= 1e-1
52
+ @test result. shapley_effects[4 ]≈ 0.0 atol= 1e-1
55
53
# <--- batch
56
54
57
55
d = 3
0 commit comments