From 26367e6ad4b2290d0307e4960792cf284389a5cd Mon Sep 17 00:00:00 2001 From: Vaibhav Dixit Date: Tue, 7 Feb 2023 15:08:19 +0530 Subject: [PATCH 1/2] Fix the Ei estimator and name correspondence --- src/sobol_sensitivity.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sobol_sensitivity.jl b/src/sobol_sensitivity.jl index 9025fdf2..e242b80a 100644 --- a/src/sobol_sensitivity.jl +++ b/src/sobol_sensitivity.jl @@ -190,9 +190,9 @@ function gsa_sobol_all_y_analysis(method, all_y::AbstractArray{T}, d, n, Ei_esti push!(Eᵢs, [Varys[i] .- sum(fA .* fAⁱ[k]) ./ (n) + Eys[i] .^ 2 for k in 1:d]) elseif Ei_estimator === :Sobol2007 - push!(Eᵢs, [sum(abs2, fA - fAⁱ[k]) for k in 1:d] ./ (2n)) - elseif Ei_estimator === :Jansen1999 push!(Eᵢs, [sum(fA .* (fA .- fAⁱ[k])) for k in 1:d] ./ (n)) + elseif Ei_estimator === :Jansen1999 + push!(Eᵢs, [sum(abs2, fA - fAⁱ[k]) for k in 1:d] ./ (2n)) end end else @@ -228,12 +228,12 @@ function gsa_sobol_all_y_analysis(method, all_y::AbstractArray{T}, d, n, Ei_esti [Varys[i] .- sum(fA .* fAⁱ[k], dims = 2) ./ (n) + Eys[i] .^ 2 for k in 1:d])) elseif Ei_estimator === :Sobol2007 - push!(Eᵢs, - reduce(hcat, [sum(abs2, fA - fAⁱ[k], dims = 2) for k in 1:d] ./ (2n))) - elseif Ei_estimator === :Jansen1999 push!(Eᵢs, reduce(hcat, [sum(fA .* (fA .- fAⁱ[k]), dims = 2) for k in 1:d] ./ (n))) + elseif Ei_estimator === :Jansen1999 + push!(Eᵢs, + reduce(hcat, [sum(abs2, fA - fAⁱ[k], dims = 2) for k in 1:d] ./ (2n))) end end end From cfaee85d5a9032ec03375edb9a2caa95c299934f Mon Sep 17 00:00:00 2001 From: Vaibhav Dixit Date: Tue, 7 Feb 2023 15:09:54 +0530 Subject: [PATCH 2/2] bump version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 59518f5d..befa0114 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "GlobalSensitivity" uuid = "af5da776-676b-467e-8baf-acd8249e4f0f" authors = ["Vaibhavdixit02 "] -version = "2.1.3" +version = "2.1.4" [deps] Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"