Skip to content

Commit

Permalink
Merge pull request #97 from SciML/patcheiestim
Browse files Browse the repository at this point in the history
Fix the Ei estimator and name correspondence
  • Loading branch information
Vaibhavdixit02 authored Feb 8, 2023
2 parents 1e36185 + cfaee85 commit c07fad8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "GlobalSensitivity"
uuid = "af5da776-676b-467e-8baf-acd8249e4f0f"
authors = ["Vaibhavdixit02 <vaibhavyashdixit@gmail.com>"]
version = "2.1.3"
version = "2.1.4"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand Down
10 changes: 5 additions & 5 deletions src/sobol_sensitivity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c07fad8

Please sign in to comment.