Skip to content
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

Paper documents #8

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions examples/paper/copula_plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ using UncLogic, BivariateCopulas, PyPlot, LaTeXStrings

N = 200
figsize = (10,10)
fontsize = 28
ft_ticks = 25
fontsize = 45
ft_ticks = 35

is = range(0, 1,length=N)
js = range(0, 1,length=N)

rs = [-0.9999, -0.8, -0.4, 0.4, 0.8 , 0.9999]
rs_plot = [-1, -0.8, -0.4, 0.4, 0.8 , 1]

for r in rs
for (i,r) in enumerate(rs)

outs = [and(i, j, r) for i in is, j in js]
C = copula(outs)
Expand All @@ -28,12 +29,10 @@ for r in rs
t.label.set_fontsize(ft_ticks)
end

if r == rs[1]; r == -1; end
if r == rs[end]; r == 1; end
PyPlot.title("r = $r", fontsize = fontsize)
PyPlot.title("ρ = $(rs_plot[i])", fontsize = fontsize)
PyPlot.tight_layout()
savefig("copulas/cop_$r.png")
savefig("copulas/cop_$r.pdf")
savefig("cop_$(rs_plot[i]).png")
savefig("cop_$(rs_plot[i]).pdf")
PyPlot.clf()

end
90 changes: 90 additions & 0 deletions paper/code/intervals_tank.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
using UncLogic, ProbabilityBoundsAnalysis, PyPlot, LaTeXStrings
using ProbabilityBoundsAnalysis: prepFillBounds

function plot_l(s::pbox, fill = true; label = "_nolegend_", name = missing, col = missing, heading = missing, plotting = true, save = false, alpha = 0.2, fontsize = 25)

if (isvacuous(s))
throw(ArgumentError("Pbox is vacuous"))
end
#if (ismissing(name)) name = s.id; end

col1 = "red"
col2 = "black"
fillcol = "grey"
if !(ismissing(col))
col1 = col2 = fillcol = col
end

if !plotting
ioff()
end
if (ismissing(name))
fig = figure(figsize = (10, 10))
else
fig = figure(name, figsize = (10, 10))
end

ax = fig.add_subplot()
j = (0:(s.n-1)) / s.n

PyPlot.step([s.u[:]; s.u[s.n]; s.d[s.n]], [j; 1; 1], color = col1, where = "pre")

i = (1:(s.n)) / s.n
PyPlot.step([s.u[1]; s.d[1]; s.d[:]], [0; 0; i], color = col2, where = "post")

if fill
Xs, Ylb, Yub = prepFillBounds(s)
ax.fill_between(Xs, Ylb, Yub, alpha = alpha, color = fillcol, label = label)
end
if !(ismissing(heading))
title(heading, fontsize = fontsize)
end
xticks(fontsize = fontsize)
yticks(fontsize = fontsize)
xlabel("Distribution range", fontsize = fontsize)
ylabel("CDF", fontsize = fontsize)

if save
savefig("$name.png")
close(fig)
end
ion()
end

frech = interval(-1, 1)

# Point estimates

T = makepbox(interval(4.5e-6, 5.5e-6))
K2 = makepbox(interval(2.5e-5, 3.5e-5))
S = makepbox(interval(0.5e-4, 1.5e-4))
K1 = makepbox(interval(2.5e-5, 3.5e-5))
R = makepbox(interval(0.5e-4, 1.5e-4))
S1 = makepbox(interval(2.5e-5, 3.5e-5))

# Independence

indep = or(T, or(K2, and(S, or(S1, or(K1, R, 0), 0), 0), 0), 0)

# Mixed

mixed = or(T, or(K2, and(S, or(S1, or(K1, R, 1), 0), 0.15), frech), 0)

# Frechet

frechet = or(T, or(K2, and(S, or(S1, or(K1, R, frech), frech), frech), frech), frech)

println(indep)
println(mixed)
println(frechet)

plot_l(makepbox(frechet), label = "Unknown dependence", name = "Intervals", col = "green")
plot_l(makepbox(mixed), name = "Intervals", col = "blue", label = "Mixed dependence")
display(plot_l(makepbox(indep), name = "Intervals", col = "red", label = "Independence"))
legend(fontsize = 25)
PyPlot.xticks(range(0, 0.0003, length = 5), ["0", L"$0.75$", L"$1.5$", L"$2.25$", L"$3\times 10^{-4}$"])
PyPlot.ylim([0, 1])
PyPlot.xlim([0, 0.0003])
PyPlot.xlabel(L"$\mathbb{P}(E_1)$")
PyPlot.tight_layout()
PyPlot.savefig("intervals.pdf", dpi = 300, bbox_inches = "tight")
91 changes: 91 additions & 0 deletions paper/code/mixture_tank.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
using UncLogic, ProbabilityBoundsAnalysis, PyPlot

using ProbabilityBoundsAnalysis: prepFillBounds

frech = interval(-1, 1)

function plot_l(s::pbox, fill = true; label = "_nolegend_", name = missing, col = missing, heading = missing, plotting = true, save = false, alpha = 0.2, fontsize = 25)

if (isvacuous(s))
throw(ArgumentError("Pbox is vacuous"))
end
#if (ismissing(name)) name = s.id; end

col1 = "red"
col2 = "black"
fillcol = "grey"
if !(ismissing(col))
col1 = col2 = fillcol = col
end

if !plotting
ioff()
end
if (ismissing(name))
fig = figure(figsize = (10, 10))
else
fig = figure(name, figsize = (10, 10))
end

ax = fig.add_subplot()
j = (0:(s.n-1)) / s.n

PyPlot.step([s.u[:]; s.u[s.n]; s.d[s.n]], [j; 1; 1], color = col1, where = "pre")

i = (1:(s.n)) / s.n
PyPlot.step([s.u[1]; s.d[1]; s.d[:]], [0; 0; i], color = col2, where = "post")

if fill
Xs, Ylb, Yub = prepFillBounds(s)
ax.fill_between(Xs, Ylb, Yub, alpha = alpha, color = fillcol, label = label)
end
if !(ismissing(heading))
title(heading, fontsize = fontsize)
end
xticks(fontsize = fontsize)
yticks(fontsize = fontsize)
xlabel("Distribution range", fontsize = fontsize)
ylabel("CDF", fontsize = fontsize)

if save
savefig("$name.png")
close(fig)
end
ion()
end

# Point estimates

T = makepbox(interval(4.5e-6, 5.5e-6))
K2 = KN(3, 100000) # midpoint of its original interval
S = makepbox(interval(0.5e-4, 1.5e-4))
K1 = KN(3, 100000)# midpoint of its original interval
R = KN(1, 10000) # midpoint of its original interval
S1 = makepbox(interval(2.5e-5, 3.5e-5))

# Independence

indep = or(T, or(K2, and(S, or(S1, or(K1, R, 0), 0), 0), 0), 0)

# Mixed

mixed = or(T, or(K2, and(S, or(S1, or(K1, R, 1), interval(-0.2, 0.2)), 0.15), frech), 0)

# Frechet

frechet = or(T, or(K2, and(S, or(S1, or(K1, R, frech), frech), frech), frech), frech)

println(indep)
println(mixed)
println(frechet)

plot_l(frechet, label = "Unknown dependence", name = "Mixture", col = "green")
plot_l(mixed, name = "Mixture", col = "blue", label = "Mixed dependence")
display(plot_l(indep, name = "Mixture", col = "red", label = "Independence"))
legend(fontsize = 25)
PyPlot.xlim([0, 0.0003])
PyPlot.ylim([0, 1])
PyPlot.xticks(range(0, 0.0003, length = 5), ["0", L"$0.75$", L"$1.5$", L"$2.25$", L"$3\times 10^{-4}$"])
PyPlot.xlabel(L"$\mathbb{P}(E_1)$")
PyPlot.tight_layout()
PyPlot.savefig("mixed.pdf", dpi = 300, bbox_inches = "tight")
Binary file added paper/fig1.eps
Binary file not shown.
Binary file added paper/figures/Intervals.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added paper/figures/Mixture2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added paper/figures/Untitled Diagram.pdf
Binary file not shown.
Binary file added paper/figures/copulas/cop_-0.4.pdf
Binary file not shown.
Binary file added paper/figures/copulas/cop_-0.4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added paper/figures/copulas/cop_-0.8.pdf
Binary file not shown.
Binary file added paper/figures/copulas/cop_-0.8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added paper/figures/copulas/cop_-0.9999.pdf
Binary file not shown.
Binary file added paper/figures/copulas/cop_-1.0.pdf
Binary file not shown.
Binary file added paper/figures/copulas/cop_-1.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added paper/figures/copulas/cop_-1.pdf
Binary file not shown.
Binary file added paper/figures/copulas/cop_0.4.pdf
Binary file not shown.
Binary file added paper/figures/copulas/cop_0.4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added paper/figures/copulas/cop_0.8.pdf
Binary file not shown.
Binary file added paper/figures/copulas/cop_0.8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added paper/figures/copulas/cop_0.9999.pdf
Binary file not shown.
Binary file added paper/figures/copulas/cop_1.0.pdf
Binary file not shown.
Binary file added paper/figures/copulas/cop_1.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added paper/figures/copulas/cop_1.pdf
Binary file not shown.
Binary file added paper/figures/cor_env.pdf
Binary file not shown.
Binary file added paper/figures/correlated.pdf
Binary file not shown.
Binary file added paper/figures/faultreecopy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added paper/figures/intervals.pdf
Binary file not shown.
Binary file added paper/figures/mixed.pdf
Binary file not shown.
139 changes: 139 additions & 0 deletions paper/history.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
Version history for the LLNCS LaTeX2e class

date filename version action/reason/acknowledgements
----------------------------------------------------------------------------
29.5.96 letter.txt beta naming problems (subject index file)
thanks to Dr. Martin Held, Salzburg, AT

subjindx.ind renamed to subjidx.ind as required
by llncs.dem

history.txt introducing this file

30.5.96 llncs.cls incompatibility with new article.cls of
1995/12/20 v1.3q Standard LaTeX document class,
\if@openbib is no longer defined,
reported by Ralf Heckmann and Graham Gough
solution by David Carlisle

10.6.96 llncs.cls problems with fragile commands in \author field
reported by Michael Gschwind, TU Wien

25.7.96 llncs.cls revision a corrects:
wrong size of text area, floats not \small,
some LaTeX generated texts
reported by Michael Sperber, Uni Tuebingen

16.4.97 all files 2.1 leaving beta state,
raising version counter to 2.1

8.6.97 llncs.cls 2.1a revision a corrects:
unbreakable citation lists, reported by
Sergio Antoy of Portland State University

11.12.97 llncs.cls 2.2 "general" headings centered; two new elements
for the article header: \email and \homedir;
complete revision of special environments:
\newtheorem replaced with \spnewtheorem,
introduced the theopargself environment;
two column parts made with multicol package;
add ons to work with the hyperref package

07.01.98 llncs.cls 2.2 changed \email to simply switch to \tt

25.03.98 llncs.cls 2.3 new class option "oribibl" to suppress
changes to the thebibliograpy environment
and retain pure LaTeX codes - useful
for most BibTeX applications

16.04.98 llncs.cls 2.3 if option "oribibl" is given, extend the
thebibliograpy hook with "\small", suggested
by Clemens Ballarin, University of Cambridge

20.11.98 llncs.cls 2.4 pagestyle "titlepage" - useful for
compilation of whole LNCS volumes

12.01.99 llncs.cls 2.5 counters of orthogonal numbered special
environments are reset each new contribution

27.04.99 llncs.cls 2.6 new command \thisbottomragged for the
actual page; indention of the footnote
made variable with \fnindent (default 1em);
new command \url that copys its argument

2.03.00 llncs.cls 2.7 \figurename and \tablename made compatible
to babel, suggested by Jo Hereth, TU Darmstadt;
definition of \url moved \AtBeginDocument
(allows for url package of Donald Arseneau),
suggested by Manfred Hauswirth, TU of Vienna;
\large for part entries in the TOC

16.04.00 llncs.cls 2.8 new option "orivec" to preserve the original
vector definition, read "arrow" accent

17.01.01 llncs.cls 2.9 hardwired texts made polyglot,
available languages: english (default),
french, german - all are "babel-proof"

20.06.01 splncs.bst public release of a BibTeX style for LNCS,
nobly provided by Jason Noble

14.08.01 llncs.cls 2.10 TOC: authors flushleft,
entries without hyphenation; suggested
by Wiro Niessen, Imaging Center - Utrecht

23.01.02 llncs.cls 2.11 fixed footnote number confusion with
\thanks, numbered institutes, and normal
footnote entries; error reported by
Saverio Cittadini, Istituto Tecnico
Industriale "Tito Sarrocchi" - Siena

28.01.02 llncs.cls 2.12 fixed footnote fix; error reported by
Chris Mesterharm, CS Dept. Rutgers - NJ

28.01.02 llncs.cls 2.13 fixed the fix (programmer needs vacation)

17.08.04 llncs.cls 2.14 TOC: authors indented, smart \and handling
for the TOC suggested by Thomas Gabel
University of Osnabrueck

07.03.06 splncs.bst fix for BibTeX entries without year; patch
provided by Jerry James, Utah State University

14.06.06 splncs_srt.bst a sorting BibTeX style for LNCS, feature
provided by Tobias Heindel, FMI Uni-Stuttgart

16.10.06 llncs.dem 2.3 removed affiliations from \tocauthor demo

11.12.07 llncs.doc note on online visibility of given e-mail address

15.06.09 splncs03.bst new BibTeX style compliant with the current
requirements, provided by Maurizio "Titto"
Patrignani of Universita' Roma Tre

30.03.10 llncs.cls 2.15 fixed broken hyperref interoperability;
patch provided by Sven Koehler,
Hamburg University of Technology

15.04.10 llncs.cls 2.16 fixed hyperref warning for informatory TOC entries;
introduced \keywords command - finally;
blank removed from \keywordname, flaw reported
by Armin B. Wagner, IGW TU Vienna

15.04.10 llncs.cls 2.17 fixed missing switch "openright" used by \backmatter;
flaw reported by Tobias Pape, University of Potsdam

27.09.13 llncs.cls 2.18 fixed "ngerman" incompatibility; solution provided
by Bastian Pfleging, University of Stuttgart

04.09.17 llncs.cls 2.19 introduced \orcidID command

10.03.18 llncs.cls 2.20 adjusted \doi according to CrossRef requirements;
TOC: removed affiliation numbers

splncs04.bst added doi field;
bold journal numbers

samplepaper.tex new sample paper

llncsdoc.pdf new LaTeX class documentation
Loading