-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[REVIEW]: Sigma: Uncertainty Propagation for C++ #7404
Comments
Hello humans, I'm @editorialbot, a robot that can help you with some common editorial tasks. For a list of things I can do to help you, just type:
For example, to regenerate the paper pdf after making changes in the paper's md or bib files, type:
|
Software report:
Commit count by author:
|
|
Paper file info: 📄 Wordcount for ✅ The paper includes a |
License info: ✅ License found: |
Review checklist for @YehorYudinIPPConflict of interest
Code of Conduct
General checks
Functionality
Documentation
Software paper
|
Hi all, Nice paper and software project. Congratulations! I read the paper and one particular thing that caught my attention was """ I think the standard deviation is the square root of the variance of a random variable which is equipped with - or linked to - a probability distribution. Therefore I think 𝜎_𝑎𝑖 should rather be called 'uncertainty', since it does not own a probability measure. Surely, you can say something like '𝜎_𝑎𝑖 is called the uncertainty and is assumed to represent an error measure closely related to the standard deviation of a random variable' (or something like that). I think in one of your sources https://arxiv.org/abs/1610.08716 this is also more carefully phrased. Next thing would be """ I think this should also rather be described as the linear uncertainty (or something alike) since in general the pdf of F(A(ω)) will be skewed, and, in that case, the standard deviation doesn't represent too much of the uncertainty of the outcome (see the example of a cantilever with uncertain tip displacement which I attache). Greetz Max using Distributions
using ProgressMeter
import .Threads: @threads
using CairoMakie
using Measurements
using Statistics
function cantilever_displacement(E,X,Y,L,w,t)
# see https://www.sfu.ca/~ssurjano/canti.html
Dfact1 = 4*(L^3) / (E*w*t)
Dfact2 = sqrt((Y/(t^2))^2 + (X/(w^2))^2)
D = Dfact1 * Dfact2
return D
end
N_E = Normal{Float64}(2.9e7, 1.45e6) # Young's modulus
N_X = Normal{Float64}(500.0, 50.0) # horizontal load
N_Y = Normal{Float64}(1000.0, 100.0) # vertical load
N_L = Normal{Float64}(100.0, 10.0) # beam length
N_w = Normal{Float64}(4.0, 0.4) # beam width
N_t = Normal{Float64}(2.0, 0.2) # beam width
M_E = measurement(2.9e7, 1.45e6) # Young's modulus
M_X = measurement(500.0, 50.0) # horizontal load
M_Y = measurement(1000.0, 100.0) # vertical load
M_L = measurement(100.0, 10.0) # beam length
M_w = measurement(4.0, 0.4) # beam width
M_t = measurement(2.0, 0.2) # beam width
samplefunc() = [rand(N_E), rand(N_X), rand(N_Y), rand(N_L), rand(N_w), rand(N_t)]
N = 5_000_000
monte_carlo_resvec = Vector{Float64}(undef, N)
@showprogress @threads for i = 1:N
monte_carlo_resvec[i] = cantilever_displacement(samplefunc()...)
end
sample_mean = foldl(+, monte_carlo_resvec)/N
sample_var = foldl(+, map(x->(x-sample_mean)^2, monte_carlo_resvec))/(N-1)
sample_sqrt_var = sqrt(sample_var)
quantvals = map(x->cdf(Normal{Float64}(0.0,1.0),x), -3:3)
sample_quantiles = quantile(monte_carlo_resvec, quantvals)
σ_F = cantilever_displacement(M_E,M_X,M_Y,M_L,M_w,M_t)
f = Figure(size=(600,300));
ax = Axis(f[1,1:4])
xlims!(ax, [0,20])
ylims!(ax, [0,.25])
band!(ax, [sample_quantiles[1], sample_quantiles[2]], 0, 5, color=(:red,0.1), label="99.7% quantile")
band!(ax, [sample_quantiles[end-1], sample_quantiles[end]], 0, 5, color=(:red,0.1))
band!(ax, [sample_quantiles[2], sample_quantiles[3]], 0, 5, color=(:yellow,0.2), label="95.4% quantile")
band!(ax, [sample_quantiles[end-2], sample_quantiles[end-1]], 0, 5, color=(:yellow,0.2))
band!(ax, [sample_quantiles[3], sample_quantiles[5]], 0, 5, color=(:green,0.2), label="68.2% quantile")
hist!(ax, monte_carlo_resvec, normalization = :pdf, bins = 500, color=(:red, 0.45), strokewidth=0.1, label="histogram")
lines!(ax, [sample_mean, sample_mean], [0.0,0.25], label="exp. value")
lines!(ax, [sample_mean+sample_sqrt_var, sample_mean+sample_sqrt_var], [0.0,0.25], label="mean+√var")
lines!(ax, [sample_mean-sample_sqrt_var, sample_mean-sample_sqrt_var], [0.0,0.25], label="mean-√var")
lines!(ax, [σ_F.val, σ_F.val], [0.0,0.25], label="σ_F.val",linestyle=:dash)
lines!(ax, [σ_F.val+σ_F.err, σ_F.val+σ_F.err], [0.0,0.25], label="σ_F.val+σ_F.err",linestyle=:dash)
lines!(ax, [σ_F.val-σ_F.err, σ_F.val-σ_F.err], [0.0,0.25], label="σ_F.val-σ_F.err",linestyle=:dash)
Legend(f[1,5], ax, labelsize=8)
f Edit: Thought about it and now I think you can call 𝜎_𝑎 a (empirical) standard deviation...but without knowledge of the pdf of a, this does not contain too much useful information, unless you assume your measurement error is normal distributed which does not necessarily needs to be true. |
Submitting author: @jwaldrop107 (Jonathan Waldrop)
Repository: https://github.com/QCUncertainty/sigma
Branch with paper.md (empty if default branch): joss_paper
Version: v0.1
Editor: @vissarion
Reviewers: @baxmittens, @YehorYudinIPP
Archive: Pending
Status
Status badge code:
Reviewers and authors:
Please avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) by leaving comments in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)
Reviewer instructions & questions
@baxmittens & @YehorYudinIPP, your review will be checklist based. Each of you will have a separate checklist that you should update when carrying out your review.
First of all you need to run this command in a separate comment to create the checklist:
The reviewer guidelines are available here: https://joss.readthedocs.io/en/latest/reviewer_guidelines.html. Any questions/concerns please let @vissarion know.
✨ Please start on your review when you are able, and be sure to complete your review in the next six weeks, at the very latest ✨
Checklists
📝 Checklist for @YehorYudinIPP
The text was updated successfully, but these errors were encountered: