From 816ab64915b31fa517159c854cbdef278e1b9024 Mon Sep 17 00:00:00 2001 From: Lei Date: Thu, 25 Aug 2022 16:31:38 +0100 Subject: [PATCH] update and add notebooks --- index.jl | 10 +- section0_julia.jl | 2110 ++++++++++++++++++++++++ section1_introduction.jl | 1881 +++++++++++++++++++++ section2_modelling.jl | 2507 ++++++++++++++++++++++++++++ section3_mcmc.jl | 28 +- section4_turing.jl | 2430 +++++++++++++++++++++++++++ section5_regressions.jl | 2730 +++++++++++++++++++++++++++++++ section6_logistic_regression.jl | 2318 ++++++++++++++++++++++++++ section7_glm.jl | 2111 ++++++++++++++++++++++++ 9 files changed, 16114 insertions(+), 11 deletions(-) create mode 100644 section0_julia.jl create mode 100644 section1_introduction.jl create mode 100644 section2_modelling.jl create mode 100644 section4_turing.jl create mode 100644 section5_regressions.jl create mode 100644 section6_logistic_regression.jl create mode 100644 section7_glm.jl diff --git a/index.jl b/index.jl index fef984c..a127b3e 100644 --- a/index.jl +++ b/index.jl @@ -29,8 +29,14 @@ md""" ## Topics -1. [Introduction to Julia](https://lf28.github.io/BayesianML/MLE.html) -2. [MCMC](./section3_mcmc.html) +1. [Introduction to Julia](./section0_julia.html) +2. [An overview of Bayesian inference](./section1_introduction.html) +3. [Bayesian modelling](./section2_modelling.html) +4. [Bayesian computation - MCMC](./section3_mcmc.html) +5. [Introduction to `Turing`](./section4_turing.html) +6. [Bayesian linear regression](./section5_regressions.html) +7. [Bayesian logistic regression](./section6_logistic_regression.html) +8. [Bayesian generalised linear models](./section7_glm.html) """ # ╔═╡ 00000000-0000-0000-0000-000000000001 diff --git a/section0_julia.jl b/section0_julia.jl new file mode 100644 index 0000000..9b3134d --- /dev/null +++ b/section0_julia.jl @@ -0,0 +1,2110 @@ +### A Pluto.jl notebook ### +# v0.19.11 + +using Markdown +using InteractiveUtils + +# ╔═╡ f3770e42-edff-4c9f-9a13-47edaf8a8cae +begin + using PlutoUI + using LaTeXStrings,Latexify +end + +# ╔═╡ bcf4086f-1469-49d4-a3f5-730a30771da4 +using Distributions + +# ╔═╡ d8764bd8-7d7d-4910-80ee-2187ad31f336 +using LinearAlgebra + +# ╔═╡ 58a419b4-4017-474f-a3e9-cc58d2aaa29a +using Plots + +# ╔═╡ 0ee0e688-9bc7-489b-a4ae-a4f09477fd33 +let + using StatsPlots + dist = Gamma(2, 0.5) + pdf_plt = plot(dist, label= L"\texttt{Gamma}(2, 0.5)", legend=:right) + plot!(dist, func =cdf, label= L"\texttt{CDF}") + cdf_plt = scatter(dist, leg=false) + bar!(dist, func=cdf, alpha=0.3) + plot(pdf_plt, cdf_plt, layouts=(2,1)) +end + +# ╔═╡ fe7f2df3-8c27-4e80-a633-386e8643e6e1 +TableOfContents() + +# ╔═╡ baf83ba6-2079-11ed-1505-cb44aea4377e +md"""# A quick introduction to Julia $(Resource("https://julialang.org/assets/infra/logo.svg", :height=>40, :align=>:right)) +""" + +# ╔═╡ c85214aa-83b1-41f0-b856-f85435db6e1d +md""" + +[Julia](https://docs.julialang.org/en/v1/) is a general-purpose, open-source, dynamic, and high-performance language. The language is easy to learn and use like other script languages such as R and Python but works as fast as C/Fortran. The language also offers high-level, easy-to-use and expressive syntax that is particularly convenient for scientific or numerical computing. One often finds code written in Julia look like the maths equations erived and written on paper. + + +In this course, we are going to use Julia. Although Bayesian modelling concepts transcends the underlying implementation language, the reader should gain better understanding of the subjects if she/he can understand the basic syntax and do some basic programming. This note covers some basic features of Julia that are used later in the course. To fully understand the note, some prior programming experience is assumed. +""" + +# ╔═╡ e6c8aca8-1907-49b0-ba11-62fda98418fc +md""" + +## Install `Julia` + + +Install Julia (1.8 over greater) +* Download and install Julia by following the instructions at [https://julialang.org/downloads/](https://julialang.org/downloads/). +* Choose either the latest stable version (v1.8 recommend) or long-term support version v1.6 + + +""" + +# ╔═╡ a5654402-f51d-468e-99fb-09a5c69a6421 +md"""## Interact with `Julia` +""" + +# ╔═╡ b145ea5b-9fc0-4a57-b41b-ad8c825eaccc +md"""There are many different ways to interact with the reading and printing. For example: the interactive command line interface REPL (read-eval-print loop) . +""" + +# ╔═╡ de6fc3a6-78dc-489a-8ac3-3642e0760d6a +md""" * The `Julia` REPL is a built-in means to interact with `Julia`. The command line interface may look something like the following where `1+2` is evaluated: +""" + +# ╔═╡ a3a93c83-94c8-44e7-a62f-46cae602ac77 +md"""``` +$ julia + _ + _ _ _(_)_ | Documentation: https://docs.julialang.org + (_) | (_) (_) | + _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help. + | | | | | | |/ _` | | + | | |_| | | | (_| | | Version 1.8.0 (2022-08-17) + _/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release +|__/ | + +julia> 1 + 2 +4 +```""" + +# ╔═╡ 1635054e-3e02-4f3b-8726-bef468c11a82 +md""" +**Pluto** Notebook (such as this notebook) + * The [Pluto](https://github.com/fonsp/Pluto.jl) package provides a *reactive* notebook interface that runs in a browser. + * The notebook can be used to write both markup texts (including latex equations) and Julia code. + * All notes are written with Pluto notebook in this course. And you can download and run them locally on your desktop. +""" + +# ╔═╡ 2b52dcf7-f8aa-49ea-a8e5-df4d819fc970 +md""" +Other interaction options include + +* Integrated development environments (IDE)s, which are particularly useful for large-scale developments. [VS Code](https://code.visualstudio.com/docs/languages/julia) is recommended. +* and [Jupyter-notebook](https://github.com/JuliaLang/IJulia.jl). + +""" + +# ╔═╡ 3adfcebb-e620-4c41-b9a7-3584fbfd61c1 +md"""### Package manager `Pkg` + +Unlike Python which relies on external package managers, Julia has its native package manager `Pkg`. It is very straightforward to use an add-on package in Julia. Follow the steps below to install an add-on package. + +Step 1: Open the Julia Command-Line + * either by double-clicking the Julia executable or + * running Julia from the command line +And you should see a command line interface like this + +``` +$ julia + _ + _ _ _(_)_ | Documentation: https://docs.julialang.org + (_) | (_) (_) | + _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help. + | | | | | | |/ _` | | + | | |_| | | | (_| | | Version 1.8.0 (2022-08-17) + _/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release +|__/ | + +julia> +``` + + +Step 2: Use `Pkg` to add packages. For example, to install `Turing.jl` and `Pluto.jl` (or any registered package) +```juliarepl +julia> Using Pkg +julia> Pkg.add("Turing") +``` + +or equivalently + +```juliarepl +julia> ] +(@v1.8) pkg> add Turing +``` + +Step 3: import the package and start using it +```juliarepl +using Turing +``` + * The `using` command loads the specified package and makes all its *exported* values available for direct use. +""" + +# ╔═╡ 0f9ce7d3-ccf3-40f6-9573-ec40dc643749 +md""" + +### More on Pluto notebook +It is recommended that you use Pluto notebook to interact with Julia. To install and use Pluto, please follow the steps below. + +* Step 1: Install `Pluto.jl`; +```juliarepl +julia> Using Pkg +julia> Pkg.add("Pluto") +``` + + +* Step 2: Use Pluto +```juliarepl +julia> using Pluto +julia> Pluto.run() +``` + +* Step 3: To get started, you can either run this notebook (recommended) or start your own new notebook + +Some worth-noting features of Pluto are: +* To use add-on packages, one only needs to add `using package_name` directly without installing them first with `pkg`. Pluto does all the package maintenance behind the scene. For example, to use package `Distributions.jl` (no matter it has been installed or not), one simply add `using Distributions` in a cell: +""" + +# ╔═╡ 6be2784a-cf0c-4d75-9858-b063880c4e98 +md""" +* On a given line, anything after a # is a *comment* +* Code blocks with more than one line of code should be included within a `begin` and `end` block. +* Pluto notebook is **reactive**, which means when one "cell" is modified and executed, the new values cascade to all other dependent cells which in turn are updated. The working mechanism is like a spreadsheet. Therefore, all variables in one cell are accessible in the rest of the notebook (a.k.a global variable). +* To force variables to have a local cell scope (so they cannot be accessed elsewhere), one can use `let ... end` block instead of `begin ... end`. + +""" + +# ╔═╡ 3520ad46-7ac5-47bf-9389-62a46f6a26f8 +md""" + +## `Julia` language +""" + +# ╔═╡ 65ae3b8f-a33a-49ba-b135-ab20674ec67a +md""" + +### Numerical variable types + +`Julia` offers a wide range of numerical variable types that are commonly used in maths and statistics. These include: +* Boolean: `true, false` +* Integers: `1,2` +* Rational numbers: `1//2` +* Floating number: `2.0` +* and even Complex numbers: `2 + 0im` + +`Julia`'s parsers can automatically infer the appropriate type for the value. The following examples demonstrate how the number 2 can be represented as different forms: i.e. as an integer, a rational number, a floating number, and a complex number. +""" + +# ╔═╡ c3fe7693-8425-4f6b-8529-c9b242073334 +begin + 2 # as an integer + 2//1 # as a rational number + 2.0 # as a floating number; or 2e0 + 2 + 0im # as a complex number where the imaginary part is zero +end; + +# ╔═╡ 045474d2-18f1-45b1-8c5d-9a82980e96bd +md""" +All above values are equal if compared with `==`, which checks their values numerically. +""" + +# ╔═╡ 287d41f1-9ade-4a73-b8ea-1e11aaf62fbe +2 == 2//1 == 2.0 == 2 + 0im + +# ╔═╡ d51ba0c0-9ca1-47aa-8364-080abc8175c3 +md"""To check variable's physical internal representations in computer memory, one should use "`===`" instead. In other words, "`===`" checks whether two variables refer to the same object in the computer memory.""" + +# ╔═╡ ae200380-7c83-4fa6-9661-9cf1999732e3 +2 === 2//1, 2 === 2.0, 2 === 2 + 0im, 2//1 === 2.0, 2//1=== 2+0im + +# ╔═╡ b3919bcb-c2e7-442b-a06c-93d172878f9c +md""" + +Variables assignments are done with the"`=`" operator +* Variable names can be Unicode, +* Greek letters are widely used; for example, α: type `\alpha` + `tab` +""" + +# ╔═╡ ed8457c7-9547-4953-ae72-121572fe8495 +begin + α, β = 1.0, 2 +end + +# ╔═╡ 49a993c4-27c9-4c89-b4c4-04c294f044c0 +md""" + +### Standard mathematical operations + +All standard mathematical operations are implemented, such as `+, -, *, /`. And Parentheses are used for grouping operations as usual. + +Some other useful operations include + +* `x^y`, exponential ``x^y`` +* `sqrt(x)`, square root of a number, i.e. ``x^{0.5}`` +* `log(x)`, logarithm operation +* `sin(x), cos(x)`, trigonometric functions +* `abs`: absolute value +* `sign`: is ``|x|/x`` except at ``x=0`` +* `floor, ceil`: flooring or ceiling of a floating number +* `max(a,b), min(a,b)`: returns the greater or smaller betwee `a` and `b` +* `maximum(xs), minimum(xs)`: the largest or smallest of the input array + +Check [the user manual](https://docs.julialang.org/en/v1/manual/mathematical-operations/) for a more detailed list of built-in operations. +""" + +# ╔═╡ a091f1d5-29c0-4a98-b1b8-4177cd6cd2f7 +md""" + +!!! information "Getting help within Pluto" + If you want to know more about a specific function, simply type `? function_name` in a cell. + + Try typing `?sign` in a cell and see the live document section. +""" + +# ╔═╡ a6c186ae-9d7a-452e-bfb2-b303c0cfea5a +md""" + +### Vectors + +A vector in `Julia` is defined as an indexed array of similarly typed values. A vector (or array), can be created with square brackets: +""" + +# ╔═╡ cbd40c3a-cf65-4d1c-833a-29a1e39dc893 +[1,2,3,4,5] + +# ╔═╡ a08b431d-86b4-4f03-b0aa-eadba6284e95 +md""" + +There are other convenient ways to create a vector. + +* `zeros(n), ones(n)`: create an array of `n` zeros or ones; + +To create a sequence of numbers with some fixed gap: +* `a:b` or `a:h:b`: which create a sequence of numbers starting with `a` and ending with `b` inclusive and the gap is `h` ; +* `range(a,b,length=n)`: offers an alternative way to produce n values between a and b; + +Both above methods return a generator rather than the real values. To cast them to an array, one can use `collect()` or a splat `...` operator. +""" + +# ╔═╡ 82b73754-f164-4bc0-82d9-fd0311a59919 +begin + 1:10, collect(1:10), [(1:10)...] +end + +# ╔═╡ a12d7a2e-5a4e-46db-b802-1af1331456dd +range(1, 10, length=12), collect(range(1, 10, length=12)) + +# ╔═╡ 911bf98c-130c-4e20-a353-bc290c865a27 +md""" + +One can also declare an array with the specified element type and length when creating it. + +For example, to create an array of 10 integers of uninitialised values: +""" + +# ╔═╡ 5c15f435-8ea6-446e-a27d-3270b463f681 +Array{Int}(undef, 10) + +# ╔═╡ b8d452b1-b75b-4012-872a-3baced9c1cb6 +md""" + +To accommodate missing values, `Julia` has a special data type called `Missing`. An element of either missing type or concrete observation can be created with `Union`. For example, `Union{Missing, Float64}` can either be a missing value or a floating number. An array of mixed missing and observed values can therefore be created by: +""" + +# ╔═╡ 054d075f-4e1c-42b2-955e-70ac1e36144b +Array{Union{Missing, Float64}}(undef, 10) + +# ╔═╡ 2d934969-c540-4e88-b137-d22e836e7daa +md""" +### Matrices + +Matrices are simply multi-dimensional arrays. It is recommended to import the add-on `LinearAlgebra` package when dealing with matrices. + +""" + +# ╔═╡ d78b7c17-1f6d-424c-aeed-e35a9d3db49e +md"To create matrix : +```math +\begin{bmatrix} 1 & 2 \\ 3 & 4\end{bmatrix}, +``` +one has the following options: +" + +# ╔═╡ d349aa84-4b2a-42c9-98a4-5849ece5e6ae +[1 2; 3 4], hcat([1,3], [2,4]), vcat([1 2], [3 4]), reshape([1,2,3,4], 2, 2)' + +# ╔═╡ 6950f0da-d61a-465b-aaaf-8a802f50452a +md""" +Where `vcat` and `hcat` concatenate the inputs horizontally (or vertically), also note +* `[1,3]` is a column vector +* while `[1 2]` is a row vector +""" + +# ╔═╡ c68f7d30-3061-40db-8af3-369149cd5ff9 +md""" + +Here are some commonly used matrices + +* `Matrix{Float64}(undef, m, n)`, returns an `m × n` uninitialised real valued matrix +* `ones(m, n)`, returns an `m × n` matrix with ones +* `zeros(m, n)`, returns an `m × n` zero matrix +* `Matrix(1.0I, n, n)`, returns an `n × n` identity matrix +* `Diagonal(V::AbstractVector)`, returns a diagonal matrix with `V` as its diagonal +""" + +# ╔═╡ 84710a37-34c3-4c20-bd5c-b293d23bc7cf +begin + Matrix{Float64}(undef, 2, 3), ones(2,3), zeros(2,3) +end + +# ╔═╡ 45037f4e-5744-4de7-885d-f0a678b72ec1 +begin + Matrix(1.0I, 3, 3), Diagonal(ones(3)) +end + +# ╔═╡ b3d46870-ef00-4fec-a5f2-2f3b6b11687c +md""" + +Standard matrix algebra operations such as addition/subtraction, multiplication and matrix inversion are all supported. + +* `A'`: matrix transpose: ``A^{\top}`` +* `A + B`: matrix addition or subtraction (`-`) +* `A * B`: matrix multiplication +* `A^(-1)` or `inv(A)`: inverse a matrix ``A^{-1}`` +""" + +# ╔═╡ 52a6e45f-b458-463a-95b8-0f8a184ce171 +begin + A = rand(5,5) + B = rand(5) + A + A == 2 * A +end + +# ╔═╡ b078d4c9-7638-43a4-bd77-57a40b1511ef +A * B, B' * A # matrix addition + +# ╔═╡ 2b305ef2-551e-4327-ad56-2bd3a12f51fc +A^(-1) == inv(A) # inverting a matrix + +# ╔═╡ 84713022-8e34-4e57-aa2f-cf9d6cf61cad +md""" + +Note that most mathematical operations have an optional argument `dims` to specify along which dimension of the input matrix to apply the operation. For example, to sum a matrix `C` along the row (dim =1): +""" + +# ╔═╡ 36824286-375a-48db-af65-b6dcaf6497b8 +C = ones(4,2); + +# ╔═╡ 46be754e-ec2f-4e0d-aef3-865492d2dd0c +md"C=" + +# ╔═╡ 1af4b04a-a7a1-4808-9cf0-038c95037fa5 +latexify(C) + +# ╔═╡ 7d897f13-7358-446f-b87a-60ad945769ea +md"And the row sum is:" + +# ╔═╡ 7cd155b2-f76e-4152-9d79-ac9ea8c32b16 +sum(C, dims=1) + +# ╔═╡ d0b5cc5a-f0cf-44e8-9e2a-e28b94d4429f +md"Note that the returned object is a ``1\times n`` matrix rather than a vector. To cast the matrix to a vector, append `[:]` at the end." + +# ╔═╡ 04065f11-4748-4cf0-abf4-01484454da0b +sum(C, dims=1)[:] + +# ╔═╡ aed0ed19-0183-4eb8-83c9-3d2419d299b8 +md"To apply the operation to the columns, simply specify `dims=2`." + +# ╔═╡ 02938204-99d2-4209-abcf-cbcfd62f9c04 +md""" + +### Vectorised operation + +A function can be applied to each element of a vector through a mechanism called **broadcasting**. The latter is implemented in a succinct `.` notation. For example, to calculate `sin` at an array of values in `xs`: `sin.(xs)`. +""" + +# ╔═╡ 8548c4cb-9e9b-4ca7-bd4e-97e16058606d +let + xs = -2π : 0.1 : 2π + sin.(xs) +end + +# ╔═╡ c2ee8d41-eec8-43ad-b4c0-2f859ad03b93 +md""" +Broadcasting also works for operators such as `*.`, `+.`, `.^`, `.==` etc. For example, +`xs .^2` and `xs .* xs` both square array `xs` element-wisely. And `.==` applies element-wise comparisons. +""" + +# ╔═╡ c195aa69-89f6-4417-b602-67922a76b87a +let + xs = 1:5 + # element wise multiplication and element-wise squares + xs .* xs, xs .^2, xs .* xs .== xs .^2 +end + +# ╔═╡ 4a51bb66-f4d4-4a7d-8e07-91d3ff5f4f28 +md"Broadcasting is a very handy operator. Without it, one would have to write a for loop to achieve the same result." + + +# ╔═╡ 17b5759c-deab-4bc0-b7b6-fc2c0e64eebb +md""" + +### Looping + +Iterating over a collection can be done with the traditional `for` loop. +""" + +# ╔═╡ c52294ca-49fb-43f7-87bb-860c8088506d +let + results = zeros(10) + for x in 1:10 + results[x] = x^2 + end + results +end + +# ╔═╡ fcd72da9-e175-4fd1-a047-7dd3711dcbf4 +md" However, there are list comprehensions to mimic the definition of a set. The above `for` loop can be replaced with:" + +# ╔═╡ 6df9180f-59bf-4462-ae9d-a2623379071a +[x^2 for x in 1:10] + +# ╔═╡ a1aa6ab4-f183-4adc-9ad8-70d80deaa15f +md""" + +### User defined functions + +User-defined functions can be easily created with + +```julia +function function_name() + ... + ... +end +``` + +or in one-line + +```julia +f(x) = ... +``` + +For example, to create a third-order polynomial with coefficients `a,b,c,d` + +$$f(x; a,b,c, d) = a x^3 + bx^2+cx + d$$ +""" + +# ╔═╡ dfa4201c-19da-4ca9-b537-8396c2899d42 +function f1(x; a=1, b=2, c=3, d=4) + return a * x^3 + b * x^2 + c * x + d +end + +# ╔═╡ dbc643ae-d68c-416f-b1b9-dc8a0025dfe0 +md""" +The default values of the coefficients are a = 1, b = 2, c = 3, d = 4. Or equivalently: +""" + +# ╔═╡ e1de498d-d66f-42c8-bb22-e80d623c4554 +f2(x; a=1,b=2,c=3,d=4) = a * x^3 + b * x^2 + c * x + d + +# ╔═╡ 6c4ede4f-a566-4dfc-bfdf-f4feadac84aa +md""" +To use the created function, we simply feed in the required input value. +""" + +# ╔═╡ 14fc0ff8-2284-412f-99af-6264d24d6198 +f1(0), f2(0) + +# ╔═╡ 4958c15f-5725-4645-a71d-e8a26a94a894 +f1.(1:10) .== f2.(1:10) + +# ╔═╡ a5c62a3c-2a59-4388-adb5-b0d93be2360d +md""" + +!!! danger "Exercise" + Write a function to calculate the area of a circle with radius `r`: ``\text{area}(r)= \pi r^2``. + +!!! hint "Answer" + area(r) = π * r^2 +""" + +# ╔═╡ 5f31fe56-ff6c-4cae-b835-15e100771a82 +md""" + +Sometimes, it is handy to write a one-off **anonymous function**, such as + +""" + +# ╔═╡ a1b6c516-0d3a-4add-990c-9ea755d6c7b6 +((x) -> x^2)(5) + +# ╔═╡ 9fbbb50d-ebb8-4e13-b28c-fbde63926cae +md"where `((x) -> x^2)` is an anonymous function, and 5 is the input argument." + +# ╔═╡ 3f9138da-c21a-458f-8eaa-a10079a2ee35 +md""" + +An anonymous function has no name, therefore it cannot be reused later. However, the function can be passed around like a variable. In Julia, functions are first-class objects (treated the same way as a variable). Therefore, a function can be assigned a name, if needed. +""" + +# ╔═╡ d0d5068b-f58d-4835-81eb-7cdc3273961e +my_square = (x) -> x^2 + +# ╔═╡ bcaf0dba-c26c-41f2-b5ad-34fb81b4e34d +my_square(5) + +# ╔═╡ a748b9e1-dd0c-4899-bf04-42a831e95434 +md""" +### Map + + +`map(f, c)` is usually used to apply some function `f` to the elements of an iterable object, such as a list or array `c`. + +For example, to transform 1,2,...,5 to their cubic root: +""" + +# ╔═╡ 22aa7b65-94f7-4cd7-a3f6-49d70c88e8e1 +map((x) -> x^(1/3), 1:5) + +# ╔═╡ 3cfdb5c7-5ca3-4f86-ac9f-b3456b03303b +md""" +For example, to transform an array of strings of `"Yes"` and `"No"` to `1`/`0`. +""" + +# ╔═╡ 60c7ec9a-a6e4-43a5-921a-b6ba3ba511d0 +map((x) -> x == "Yes" ? 1 : 0, ["Yes", "Yes", "No", "Yes"]) + +# ╔═╡ 8e0c8524-3142-498b-bac1-60f591ede438 +md""" +Find the sum along the column of a matrix: +""" + +# ╔═╡ 42d47b65-5b68-4f81-af5f-17a1df35c1cb +M = latexify(ones(6, 3)) + +# ╔═╡ 0ff926f9-a294-4846-b7ab-d02203a73a13 +md"To sum the above matrix along the column:" + +# ╔═╡ 482b83c6-fe77-41ea-bc4a-4a9b76bf30ac +map(sum, eachcol(ones(6,3))) + +# ╔═╡ 77ec658a-0fe5-4fc4-81ac-70336e46096b +md"Similarly, along the row:" + +# ╔═╡ 528d9adb-1888-4f31-91eb-450879053bf6 +map(sum, eachrow(ones(6,3))) + +# ╔═╡ 49c595cf-4a6f-43fe-9c0e-365effd70f96 +md""" + +### Plotting + +`Julia` provides very easy-to-use plotting methods to visualise functions. To plot a function, one should first import `Plots` package. +""" + +# ╔═╡ f38cf720-5346-4590-b466-c42c86fe1555 +md"For example, to visualise the `sin` function between -3π to 3π." + +# ╔═╡ b6637bc1-a63c-44cc-bf57-ae2c7252e176 +plot(sin, label="sin(x)", legend=:topright, linewidth=2) + +# ╔═╡ 9d25c7c8-252c-4998-9d7c-f93be58ec671 +md""" + +To plot a series of `sin` functions with different frequencies: ``\sin(k x)`` + * note we use `plot!()` to modify the existing plot directly rather than creating a new plot + +""" + +# ╔═╡ 8416fec3-5460-441a-b415-40d04075ccf3 +let + plt = plot(-π: 0.01: π, sin, xlabel="x", ylabel="sin(x)", label="sin(x)", lw=1.5, legend=:outerbottom) + + for k in [2, 3] + plot!(-π: 0.01: π, (x) -> sin(k*x), label="sin($(k)x)", lw=1.5) + end + plt +end + +# ╔═╡ 0eb81388-75c6-40c6-ad2e-04baf59a7d71 +md""" + +!!! danger "Exercise" + Plot the user-defined polynomial function with parameters ``a=0, b=1, c=2, d=5`` + +!!! hint "Answer" + ```julia + plot(0:0.1:10, (x) -> f(x; a=0, b=1, c=2, d=5)) + ``` +""" + +# ╔═╡ 56961f01-40b2-4a18-90a2-a0ebeeebd16c +md""" + +**Multi-dimensional plots.** For functions with multiple variables, it is convenient to visualise the function either with a contour plot or the surface 3-D plot. +""" + +# ╔═╡ e65a6edb-12ab-44c4-a1ff-94a457583c49 +let + # a quadratic function + qf(x, y) = x^2 - y^2 + xs = -5:.1:5 + ys = -5:.1:5 + # theme(:ggplot2) + cont_plot = plot(xs, ys, (x,y) -> qf(x, y), st=:contour, ratio =1, legend=false) + surf_plot = plot(xs, ys, (x,y) -> qf(x, y), st=:surface, ratio =1, legend=false) + # plot side by side + plot(cont_plot, surf_plot) +end + +# ╔═╡ c8ab39c8-a3e0-4ef5-8a47-365b5c484042 +md""" + +### Animations + +We can also put a series of plots (known as frames) together to form an animation. This is particularly useful to visually demonstrate an algorithm's procedures. `Julia` provides two macros: `@animate` and `@gif`, to simplify the animation creation process. + +Here we use the derivative as an example to show how to create an animation. The derivative of a continuous function ``f(x)`` at ``x_0`` is defined as the limit of a ratio: + +```math +f'(x_0) = \lim_{\Delta{x} \rightarrow 0} \frac{f(x_0 + \Delta{x}) - f(x_0)}{\Delta x} +``` + +* when ``\Delta{x}`` approaches zero, the ratio ``\frac{f(x_0 + \Delta{x}) - f(x_0)}{\Delta x}`` gets closer to the exact derivative, +* and the derivative can be interpreted as the slope of the limiting approximate linear function of ``f`` when ``\Delta{x}`` approaches zero. + +The idea is demonstrated below in an animation. + +""" + +# ╔═╡ 9f420af3-f080-411d-bc14-e2e45572ac77 +let + x₀ = 0.0 + xs = -π : 0.1: π + f, ∇f = sin, cos + anim = @animate for Δx in π:-0.1:0.0 + plot(xs, sin, label="f(x)", ylim = [-1.5, 1.5], xlabel=L"x", lw=2, legend=:topleft) + k = Δx == 0 ? ∇f(x₀) : (f(x₀ + Δx)-f(x₀))/Δx + b = f(x₀) - k * x₀ + # the approximating linear function with Δx + plot!(xs, (x) -> k*x+b, label="", lw=2) + # the location where the derivative is defined + scatter!([x₀], [f(x₀)], label="x₀, f(x₀)") + scatter!([x₀+Δx], [f(x₀+Δx)], label="x₀+Δx, f(x₀+Δx)") + annotate!(0, 1, text("Δx=$(round(Δx, digits=2))")) + end + + gif(anim, fps=5) +end + +# ╔═╡ da4fb082-1f42-41ac-a0eb-55a087b4b4a5 +md""" +### Distributions + + +Julia's [`Distributions.jl`](https://juliastats.org/Distributions.jl/stable/) implements a wide range of popular distributions, such as +* `Normal(μ, σ)`, note that it is parameterised with standard deviation rather than variance +* `Gamma(α, θ)`, [Gamma distribution](https://en.wikipedia.org/wiki/Gamma_distribution) parameterised with shape and scale +* `Beta(α, β)`, [Beta distribution](https://en.wikipedia.org/wiki/Beta_distribution) +* `Uniform(a, b)`, [Uniform distribution](https://en.wikipedia.org/wiki/Continuous_uniform_distribution) between `a` and `b` where `b>a`; + +Also popular discrete random variables: + +* `Poisson(λ)`: where `λ` is the rate or mean of the Poisson distribution +* `Binomial(n, p)`: where `n` is the total number of experiments and `p` is individual experiment's bias +* `Bernoulli(p)`: where `p` is the bias + +To see how to use a distribution, simply type `?distribution_name` in a cell. Or equivalently, use `@doc distribution_name`. For example, Gaussian distribution's document is listed below: +""" + +# ╔═╡ d0646d89-64a4-4eb3-8739-2cac268abcf3 +@doc Normal + +# ╔═╡ a5212ff7-0416-440d-8ad6-9b6e0ac35a8d +md""" +`Julia` provides standard interfaces to view and manipulate a distribution. To random sample from a distribution, one can use `rand(dist, n)`, where `n` is the number of draws required. + +""" + +# ╔═╡ de16ea53-0391-41b5-950f-0c60654d0cd7 +let + dist = Normal(0, 1) + gaussian_draws = rand(dist, 1000) + plot(gaussian_draws, st=:hist, nbins=30, normed=true, label=L"x\sim \mathcal{N}(0,1)") + plot!(dist, lw=2, fill=(0, 0.5), c=1, label=L"\mathcal{N}(0,1)") +end + +# ╔═╡ fcdfed67-380d-4b11-8881-2575df2008b0 +md""" + +[`StatsPlots.jl`](https://github.com/JuliaPlots/StatsPlots.jl) provides handy methods to visualise a distribution. +* `plot(dist,func)`: plot the probability density function (or probability mass function) of a distribution +* `scatter(dist, func)`: scatter plot of the density function +* `bars(dist, func)`: bar plot of distribution + +where `func` can be +* `pdf`: probability density function (default choice) +* `logpdf`: log probability density function, +* `cdf`: cumulative density function + +Check the code below for an example. Note you can replace `Gamma` with any distribution of your choice. +""" + +# ╔═╡ 00000000-0000-0000-0000-000000000001 +PLUTO_PROJECT_TOML_CONTENTS = """ +[deps] +Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" +LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" +LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" +PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8" +StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd" + +[compat] +Distributions = "~0.25.67" +LaTeXStrings = "~1.3.0" +Latexify = "~0.15.16" +Plots = "~1.31.7" +PlutoUI = "~0.7.39" +StatsPlots = "~0.15.1" +""" + +# ╔═╡ 00000000-0000-0000-0000-000000000002 +PLUTO_MANIFEST_TOML_CONTENTS = """ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.8.0" +manifest_format = "2.0" +project_hash = "3a36e7b54d1b42e3040325bfd2fdc9038d0e328b" + +[[deps.AbstractFFTs]] +deps = ["ChainRulesCore", "LinearAlgebra"] +git-tree-sha1 = "69f7020bd72f069c219b5e8c236c1fa90d2cb409" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.2.1" + +[[deps.AbstractPlutoDingetjes]] +deps = ["Pkg"] +git-tree-sha1 = "8eaf9f1b4921132a4cff3f36a1d9ba923b14a481" +uuid = "6e696c72-6542-2067-7265-42206c756150" +version = "1.1.4" + +[[deps.Adapt]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "195c5505521008abea5aee4f96930717958eac6f" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "3.4.0" + +[[deps.ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" +version = "1.1.1" + +[[deps.Arpack]] +deps = ["Arpack_jll", "Libdl", "LinearAlgebra", "Logging"] +git-tree-sha1 = "91ca22c4b8437da89b030f08d71db55a379ce958" +uuid = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97" +version = "0.5.3" + +[[deps.Arpack_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "OpenBLAS_jll", "Pkg"] +git-tree-sha1 = "5ba6c757e8feccf03a1554dfaf3e26b3cfc7fd5e" +uuid = "68821587-b530-5797-8361-c406ea357684" +version = "3.5.1+1" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[deps.AxisAlgorithms]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"] +git-tree-sha1 = "66771c8d21c8ff5e3a93379480a2307ac36863f7" +uuid = "13072b0f-2c55-5437-9ae7-d433b7a33950" +version = "1.0.1" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[deps.Bzip2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2" +uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" +version = "1.0.8+0" + +[[deps.Cairo_jll]] +deps = ["Artifacts", "Bzip2_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "4b859a208b2397a7a623a03449e4636bdb17bcf2" +uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" +version = "1.16.1+1" + +[[deps.Calculus]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" +uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" +version = "0.5.1" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "80ca332f6dcb2508adba68f22f551adb2d00a624" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.15.3" + +[[deps.ChangesOfVariables]] +deps = ["ChainRulesCore", "LinearAlgebra", "Test"] +git-tree-sha1 = "38f7a08f19d8810338d4f5085211c7dfa5d5bdd8" +uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" +version = "0.1.4" + +[[deps.Clustering]] +deps = ["Distances", "LinearAlgebra", "NearestNeighbors", "Printf", "SparseArrays", "Statistics", "StatsBase"] +git-tree-sha1 = "75479b7df4167267d75294d14b58244695beb2ac" +uuid = "aaaa29a8-35af-508c-8bc3-b662a17a0fe5" +version = "0.14.2" + +[[deps.CodecZlib]] +deps = ["TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "ded953804d019afa9a3f98981d99b33e3db7b6da" +uuid = "944b1d66-785c-5afd-91f1-9de20f533193" +version = "0.7.0" + +[[deps.ColorSchemes]] +deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "Random"] +git-tree-sha1 = "1fd869cc3875b57347f7027521f561cf46d1fcd8" +uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" +version = "3.19.0" + +[[deps.ColorTypes]] +deps = ["FixedPointNumbers", "Random"] +git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4" +uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" +version = "0.11.4" + +[[deps.ColorVectorSpace]] +deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "SpecialFunctions", "Statistics", "TensorCore"] +git-tree-sha1 = "d08c20eef1f2cbc6e60fd3612ac4340b89fea322" +uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" +version = "0.9.9" + +[[deps.Colors]] +deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] +git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40" +uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" +version = "0.12.8" + +[[deps.Compat]] +deps = ["Dates", "LinearAlgebra", "UUIDs"] +git-tree-sha1 = "924cdca592bc16f14d2f7006754a621735280b74" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.1.0" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "0.5.2+0" + +[[deps.Contour]] +git-tree-sha1 = "d05d9e7b7aedff4e5b51a029dced05cfb6125781" +uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" +version = "0.6.2" + +[[deps.DataAPI]] +git-tree-sha1 = "fb5f5316dd3fd4c5e7c30a24d50643b73e37cd40" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.10.0" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "d1fff3a548102f48987a52a2e0d114fa97d730f0" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.13" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.DataValues]] +deps = ["DataValueInterfaces", "Dates"] +git-tree-sha1 = "d88a19299eba280a6d062e135a43f00323ae70bf" +uuid = "e7dc6d0d-1eca-5fa6-8ad6-5aecde8b7ea5" +version = "0.4.13" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[deps.DelimitedFiles]] +deps = ["Mmap"] +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" + +[[deps.DensityInterface]] +deps = ["InverseFunctions", "Test"] +git-tree-sha1 = "80c3e8639e3353e5d2912fb3a1916b8455e2494b" +uuid = "b429d917-457f-4dbc-8f4c-0cc954292b1d" +version = "0.4.0" + +[[deps.Distances]] +deps = ["LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "3258d0659f812acde79e8a74b11f17ac06d0ca04" +uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" +version = "0.10.7" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[deps.Distributions]] +deps = ["ChainRulesCore", "DensityInterface", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"] +git-tree-sha1 = "6180800cebb409d7eeef8b2a9a562107b9705be5" +uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" +version = "0.25.67" + +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "5158c2b41018c5f7eb1470d558127ac274eca0c9" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.9.1" + +[[deps.Downloads]] +deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +version = "1.6.0" + +[[deps.DualNumbers]] +deps = ["Calculus", "NaNMath", "SpecialFunctions"] +git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566" +uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74" +version = "0.6.8" + +[[deps.EarCut_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3f3a2501fa7236e9b911e0f7a588c657e822bb6d" +uuid = "5ae413db-bbd1-5e63-b57d-d24a61df00f5" +version = "2.2.3+0" + +[[deps.Expat_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "bad72f730e9e91c08d9427d5e8db95478a3c323d" +uuid = "2e619515-83b5-522b-bb60-26c02a35a201" +version = "2.4.8+0" + +[[deps.Extents]] +git-tree-sha1 = "5e1e4c53fa39afe63a7d356e30452249365fba99" +uuid = "411431e0-e8b7-467b-b5e0-f676ba4f2910" +version = "0.1.1" + +[[deps.FFMPEG]] +deps = ["FFMPEG_jll"] +git-tree-sha1 = "b57e3acbe22f8484b4b5ff66a7499717fe1a9cc8" +uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" +version = "0.4.1" + +[[deps.FFMPEG_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] +git-tree-sha1 = "ccd479984c7838684b3ac204b716c89955c76623" +uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" +version = "4.4.2+0" + +[[deps.FFTW]] +deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] +git-tree-sha1 = "90630efff0894f8142308e334473eba54c433549" +uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" +version = "1.5.0" + +[[deps.FFTW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "c6033cc3892d0ef5bb9cd29b7f2f0331ea5184ea" +uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" +version = "3.3.10+0" + +[[deps.FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" + +[[deps.FillArrays]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"] +git-tree-sha1 = "246621d23d1f43e3b9c368bf3b72b2331a27c286" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "0.13.2" + +[[deps.FixedPointNumbers]] +deps = ["Statistics"] +git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc" +uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" +version = "0.8.4" + +[[deps.Fontconfig_jll]] +deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "21efd19106a55620a188615da6d3d06cd7f6ee03" +uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" +version = "2.13.93+0" + +[[deps.Formatting]] +deps = ["Printf"] +git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" +uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" +version = "0.4.2" + +[[deps.FreeType2_jll]] +deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "87eb71354d8ec1a96d4a7636bd57a7347dde3ef9" +uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" +version = "2.10.4+0" + +[[deps.FriBidi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "aa31987c2ba8704e23c6c8ba8a4f769d5d7e4f91" +uuid = "559328eb-81f9-559d-9380-de523a88c83c" +version = "1.0.10+0" + +[[deps.GLFW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll"] +git-tree-sha1 = "d972031d28c8c8d9d7b41a536ad7bb0c2579caca" +uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" +version = "3.3.8+0" + +[[deps.GR]] +deps = ["Base64", "DelimitedFiles", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Pkg", "Printf", "Random", "RelocatableFolders", "Serialization", "Sockets", "Test", "UUIDs"] +git-tree-sha1 = "cf0a9940f250dc3cb6cc6c6821b4bf8a4286cf9c" +uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" +version = "0.66.2" + +[[deps.GR_jll]] +deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Pkg", "Qt5Base_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "2d908286d120c584abbe7621756c341707096ba4" +uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" +version = "0.66.2+0" + +[[deps.GeoInterface]] +deps = ["Extents"] +git-tree-sha1 = "fb28b5dc239d0174d7297310ef7b84a11804dfab" +uuid = "cf35fbd7-0cd7-5166-be24-54bfbe79505f" +version = "1.0.1" + +[[deps.GeometryBasics]] +deps = ["EarCut_jll", "GeoInterface", "IterTools", "LinearAlgebra", "StaticArrays", "StructArrays", "Tables"] +git-tree-sha1 = "a7a97895780dab1085a97769316aa348830dc991" +uuid = "5c1252a2-5f33-56bf-86c9-59e7332b4326" +version = "0.4.3" + +[[deps.Gettext_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "9b02998aba7bf074d14de89f9d37ca24a1a0b046" +uuid = "78b55507-aeef-58d4-861c-77aaff3498b1" +version = "0.21.0+0" + +[[deps.Glib_jll]] +deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "a32d672ac2c967f3deb8a81d828afc739c838a06" +uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" +version = "2.68.3+2" + +[[deps.Graphite2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "344bf40dcab1073aca04aa0df4fb092f920e4011" +uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" +version = "1.3.14+0" + +[[deps.Grisu]] +git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" +uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" +version = "1.0.2" + +[[deps.HTTP]] +deps = ["Base64", "CodecZlib", "Dates", "IniFile", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "f0956f8d42a92816d2bf062f8a6a6a0ad7f9b937" +uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" +version = "1.2.1" + +[[deps.HarfBuzz_jll]] +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] +git-tree-sha1 = "129acf094d168394e80ee1dc4bc06ec835e510a3" +uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" +version = "2.8.1+1" + +[[deps.HypergeometricFunctions]] +deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions", "Test"] +git-tree-sha1 = "709d864e3ed6e3545230601f94e11ebc65994641" +uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" +version = "0.3.11" + +[[deps.Hyperscript]] +deps = ["Test"] +git-tree-sha1 = "8d511d5b81240fc8e6802386302675bdf47737b9" +uuid = "47d2ed2b-36de-50cf-bf87-49c2cf4b8b91" +version = "0.0.4" + +[[deps.HypertextLiteral]] +deps = ["Tricks"] +git-tree-sha1 = "c47c5fa4c5308f27ccaac35504858d8914e102f9" +uuid = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2" +version = "0.9.4" + +[[deps.IOCapture]] +deps = ["Logging", "Random"] +git-tree-sha1 = "f7be53659ab06ddc986428d3a9dcc95f6fa6705a" +uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" +version = "0.2.2" + +[[deps.IniFile]] +git-tree-sha1 = "f550e6e32074c939295eb5ea6de31849ac2c9625" +uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f" +version = "0.5.1" + +[[deps.IntelOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "d979e54b71da82f3a65b62553da4fc3d18c9004c" +uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" +version = "2018.0.3+2" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[deps.Interpolations]] +deps = ["Adapt", "AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "Requires", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"] +git-tree-sha1 = "64f138f9453a018c8f3562e7bae54edc059af249" +uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" +version = "0.14.4" + +[[deps.InverseFunctions]] +deps = ["Test"] +git-tree-sha1 = "b3364212fb5d870f724876ffcd34dd8ec6d98918" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.7" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "7fd44fd4ff43fc60815f8e764c0f352b83c49151" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.1.1" + +[[deps.IterTools]] +git-tree-sha1 = "fa6287a4469f5e048d763df38279ee729fbd44e5" +uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" +version = "1.4.0" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLLWrappers]] +deps = ["Preferences"] +git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.4.1" + +[[deps.JSON]] +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "3c837543ddb02250ef42f4738347454f95079d4e" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.21.3" + +[[deps.JpegTurbo_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b53380851c6e6664204efb2e62cd24fa5c47e4ba" +uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" +version = "2.1.2+0" + +[[deps.KernelDensity]] +deps = ["Distributions", "DocStringExtensions", "FFTW", "Interpolations", "StatsBase"] +git-tree-sha1 = "9816b296736292a80b9a3200eb7fbb57aaa3917a" +uuid = "5ab0869b-81aa-558d-bb23-cbf5423bbe9b" +version = "0.6.5" + +[[deps.LAME_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "f6250b16881adf048549549fba48b1161acdac8c" +uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" +version = "3.100.1+0" + +[[deps.LERC_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" +uuid = "88015f11-f218-50d7-93a8-a6af411a945d" +version = "3.0.0+1" + +[[deps.LZO_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e5b909bcf985c5e2605737d2ce278ed791b89be6" +uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" +version = "2.10.1+0" + +[[deps.LaTeXStrings]] +git-tree-sha1 = "f2355693d6778a178ade15952b7ac47a4ff97996" +uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +version = "1.3.0" + +[[deps.Latexify]] +deps = ["Formatting", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "Printf", "Requires"] +git-tree-sha1 = "1a43be956d433b5d0321197150c2f94e16c0aaa0" +uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" +version = "0.15.16" + +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" + +[[deps.LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" +version = "0.6.3" + +[[deps.LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" +version = "7.84.0+0" + +[[deps.LibGit2]] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[deps.LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" +version = "1.10.2+0" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[deps.Libffi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "0b4a5d71f3e5200a7dff793393e09dfc2d874290" +uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" +version = "3.2.2+1" + +[[deps.Libgcrypt_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"] +git-tree-sha1 = "64613c82a59c120435c067c2b809fc61cf5166ae" +uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" +version = "1.8.7+0" + +[[deps.Libglvnd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"] +git-tree-sha1 = "7739f837d6447403596a75d19ed01fd08d6f56bf" +uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" +version = "1.3.0+3" + +[[deps.Libgpg_error_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "c333716e46366857753e273ce6a69ee0945a6db9" +uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" +version = "1.42.0+0" + +[[deps.Libiconv_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "42b62845d70a619f063a7da093d995ec8e15e778" +uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" +version = "1.16.1+1" + +[[deps.Libmount_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "9c30530bf0effd46e15e0fdcf2b8636e78cbbd73" +uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" +version = "2.35.0+0" + +[[deps.Libtiff_jll]] +deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "Pkg", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "3eb79b0ca5764d4799c06699573fd8f533259713" +uuid = "89763e89-9b03-5906-acba-b20f662cd828" +version = "4.4.0+0" + +[[deps.Libuuid_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "7f3efec06033682db852f8b3bc3c1d2b0a0ab066" +uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" +version = "2.36.0+0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[deps.LogExpFunctions]] +deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "361c2b088575b07946508f135ac556751240091c" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.17" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "5d4d2d9904227b8bd66386c1138cf4d5ffa826bf" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "0.4.9" + +[[deps.MKL_jll]] +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] +git-tree-sha1 = "e595b205efd49508358f7dc670a940c790204629" +uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" +version = "2022.0.0+0" + +[[deps.MacroTools]] +deps = ["Markdown", "Random"] +git-tree-sha1 = "3d3e902b31198a27340d0bf00d6ac452866021cf" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.9" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[deps.MbedTLS]] +deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "Random", "Sockets"] +git-tree-sha1 = "d9ab10da9de748859a7780338e1d6566993d1f25" +uuid = "739be429-bea8-5141-9913-cc70e7f3736d" +version = "1.1.3" + +[[deps.MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +version = "2.28.0+0" + +[[deps.Measures]] +git-tree-sha1 = "e498ddeee6f9fdb4551ce855a46f54dbd900245f" +uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" +version = "0.3.1" + +[[deps.Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "bf210ce90b6c9eed32d25dbcae1ebc565df2687f" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "1.0.2" + +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[deps.MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" +version = "2022.2.1" + +[[deps.MultivariateStats]] +deps = ["Arpack", "LinearAlgebra", "SparseArrays", "Statistics", "StatsBase"] +git-tree-sha1 = "6d019f5a0465522bbfdd68ecfad7f86b535d6935" +uuid = "6f286f6a-111f-5878-ab1e-185364afe411" +version = "0.9.0" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "a7c3d1da1189a1c2fe843a3bfa04d18d20eb3211" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.0.1" + +[[deps.NearestNeighbors]] +deps = ["Distances", "StaticArrays"] +git-tree-sha1 = "0e353ed734b1747fc20cd4cba0edd9ac027eff6a" +uuid = "b8a86587-4115-5ab1-83bc-aa920d37bbce" +version = "0.4.11" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" +version = "1.2.0" + +[[deps.Observables]] +git-tree-sha1 = "dfd8d34871bc3ad08cd16026c1828e271d554db9" +uuid = "510215fc-4207-5dde-b226-833fc4488ee2" +version = "0.5.1" + +[[deps.OffsetArrays]] +deps = ["Adapt"] +git-tree-sha1 = "1ea784113a6aa054c5ebd95945fa5e52c2f378e7" +uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +version = "1.12.7" + +[[deps.Ogg_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "887579a3eb005446d514ab7aeac5d1d027658b8f" +uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" +version = "1.3.5+1" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.20+0" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+0" + +[[deps.OpenSSL_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e60321e3f2616584ff98f0a4f18d98ae6f89bbb3" +uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" +version = "1.1.17+0" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.5+0" + +[[deps.Opus_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "51a08fb14ec28da2ec7a927c4337e4332c2a4720" +uuid = "91d4177d-7536-5919-b921-800302f37372" +version = "1.3.2+0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.4.1" + +[[deps.PCRE_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b2a7af664e098055a7529ad1a900ded962bca488" +uuid = "2f80f16e-611a-54ab-bc61-aa92de5b98fc" +version = "8.44.0+0" + +[[deps.PDMats]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "cf494dca75a69712a72b80bc48f59dcf3dea63ec" +uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" +version = "0.11.16" + +[[deps.Parsers]] +deps = ["Dates"] +git-tree-sha1 = "0044b23da09b5608b4ecacb4e5e6c6332f833a7e" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "2.3.2" + +[[deps.Pixman_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b4f5d02549a10e20780a24fce72bea96b6329e29" +uuid = "30392449-352a-5448-841d-b1acce4e97dc" +version = "0.40.1+0" + +[[deps.Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +version = "1.8.0" + +[[deps.PlotThemes]] +deps = ["PlotUtils", "Statistics"] +git-tree-sha1 = "8162b2f8547bc23876edd0c5181b27702ae58dce" +uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a" +version = "3.0.0" + +[[deps.PlotUtils]] +deps = ["ColorSchemes", "Colors", "Dates", "Printf", "Random", "Reexport", "Statistics"] +git-tree-sha1 = "9888e59493658e476d3073f1ce24348bdc086660" +uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" +version = "1.3.0" + +[[deps.Plots]] +deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "GeometryBasics", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs", "UnicodeFun", "Unzip"] +git-tree-sha1 = "a19652399f43938413340b2068e11e55caa46b65" +uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" +version = "1.31.7" + +[[deps.PlutoUI]] +deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "Markdown", "Random", "Reexport", "UUIDs"] +git-tree-sha1 = "8d1f54886b9037091edf146b517989fc4a09efec" +uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" +version = "0.7.39" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.3.0" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[deps.Qt5Base_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "xkbcommon_jll"] +git-tree-sha1 = "c6c0f690d0cc7caddb74cef7aa847b824a16b256" +uuid = "ea2cea3b-5b76-57ae-a6ef-0a8af62496e1" +version = "5.15.3+1" + +[[deps.QuadGK]] +deps = ["DataStructures", "LinearAlgebra"] +git-tree-sha1 = "78aadffb3efd2155af139781b8a8df1ef279ea39" +uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" +version = "2.4.2" + +[[deps.REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[deps.Random]] +deps = ["SHA", "Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[deps.Ratios]] +deps = ["Requires"] +git-tree-sha1 = "dc84268fe0e3335a62e315a3a7cf2afa7178a734" +uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439" +version = "0.4.3" + +[[deps.RecipesBase]] +git-tree-sha1 = "6bf3f380ff52ce0832ddd3a2a7b9538ed1bcca7d" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.2.1" + +[[deps.RecipesPipeline]] +deps = ["Dates", "NaNMath", "PlotUtils", "RecipesBase"] +git-tree-sha1 = "e7eac76a958f8664f2718508435d058168c7953d" +uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" +version = "0.6.3" + +[[deps.Reexport]] +git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.2.2" + +[[deps.RelocatableFolders]] +deps = ["SHA", "Scratch"] +git-tree-sha1 = "22c5201127d7b243b9ee1de3b43c408879dff60f" +uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" +version = "0.3.0" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.0" + +[[deps.Rmath]] +deps = ["Random", "Rmath_jll"] +git-tree-sha1 = "bf3188feca147ce108c76ad82c2792c57abe7b1f" +uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" +version = "0.7.0" + +[[deps.Rmath_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "68db32dff12bb6127bac73c209881191bf0efbb7" +uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" +version = "0.3.0+0" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.Scratch]] +deps = ["Dates"] +git-tree-sha1 = "f94f779c94e58bf9ea243e77a37e16d9de9126bd" +uuid = "6c6a2e73-6563-6170-7368-637461726353" +version = "1.1.1" + +[[deps.SentinelArrays]] +deps = ["Dates", "Random"] +git-tree-sha1 = "db8481cf5d6278a121184809e9eb1628943c7704" +uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" +version = "1.3.13" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[deps.SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[deps.Showoff]] +deps = ["Dates", "Grisu"] +git-tree-sha1 = "91eddf657aca81df9ae6ceb20b959ae5653ad1de" +uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f" +version = "1.0.3" + +[[deps.SimpleBufferStream]] +git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1" +uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" +version = "1.1.0" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[deps.SortingAlgorithms]] +deps = ["DataStructures"] +git-tree-sha1 = "b3363d7460f7d098ca0912c69b082f75625d7508" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "1.0.1" + +[[deps.SparseArrays]] +deps = ["LinearAlgebra", "Random"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + +[[deps.SpecialFunctions]] +deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "d75bda01f8c31ebb72df80a46c88b25d1c79c56d" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.1.7" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "Random", "StaticArraysCore", "Statistics"] +git-tree-sha1 = "85bc4b051546db130aeb1e8a696f1da6d4497200" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.5.5" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "5b413a57dd3cea38497d745ce088ac8592fbb5be" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.1.0" + +[[deps.Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.StatsAPI]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "f9af7f195fb13589dd2e2d57fdb401717d2eb1f6" +uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +version = "1.5.0" + +[[deps.StatsBase]] +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "d1bf48bfcc554a3761a133fe3a9bb01488e06916" +uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +version = "0.33.21" + +[[deps.StatsFuns]] +deps = ["ChainRulesCore", "HypergeometricFunctions", "InverseFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] +git-tree-sha1 = "5783b877201a82fc0014cbf381e7e6eb130473a4" +uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" +version = "1.0.1" + +[[deps.StatsPlots]] +deps = ["AbstractFFTs", "Clustering", "DataStructures", "DataValues", "Distributions", "Interpolations", "KernelDensity", "LinearAlgebra", "MultivariateStats", "Observables", "Plots", "RecipesBase", "RecipesPipeline", "Reexport", "StatsBase", "TableOperations", "Tables", "Widgets"] +git-tree-sha1 = "2b35ba790f1f823872dcf378a6d3c3b520092eac" +uuid = "f3b207a7-027a-5e70-b257-86293d7955fd" +version = "0.15.1" + +[[deps.StructArrays]] +deps = ["Adapt", "DataAPI", "StaticArraysCore", "Tables"] +git-tree-sha1 = "8c6ac65ec9ab781af05b08ff305ddc727c25f680" +uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +version = "0.6.12" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.0" + +[[deps.TableOperations]] +deps = ["SentinelArrays", "Tables", "Test"] +git-tree-sha1 = "e383c87cf2a1dc41fa30c093b2a19877c83e1bc1" +uuid = "ab02a1b2-a7df-11e8-156e-fb1833f50b87" +version = "1.2.0" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits", "Test"] +git-tree-sha1 = "5ce79ce186cc678bbb5c5681ca3379d1ddae11a1" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.7.0" + +[[deps.Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" +version = "1.10.0" + +[[deps.TensorCore]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" +uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" +version = "0.1.1" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.TranscodingStreams]] +deps = ["Random", "Test"] +git-tree-sha1 = "4ad90ab2bbfdddcae329cba59dab4a8cdfac3832" +uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +version = "0.9.7" + +[[deps.Tricks]] +git-tree-sha1 = "6bac775f2d42a611cdfcd1fb217ee719630c4175" +uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" +version = "0.1.6" + +[[deps.URIs]] +git-tree-sha1 = "e59ecc5a41b000fa94423a578d29290c7266fc10" +uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" +version = "1.4.0" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[deps.UnicodeFun]] +deps = ["REPL"] +git-tree-sha1 = "53915e50200959667e78a92a418594b428dffddf" +uuid = "1cfade01-22cf-5700-b092-accc4b62d6e1" +version = "0.4.1" + +[[deps.Unzip]] +git-tree-sha1 = "34db80951901073501137bdbc3d5a8e7bbd06670" +uuid = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" +version = "0.1.2" + +[[deps.Wayland_jll]] +deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "3e61f0b86f90dacb0bc0e73a0c5a83f6a8636e23" +uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" +version = "1.19.0+0" + +[[deps.Wayland_protocols_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4528479aa01ee1b3b4cd0e6faef0e04cf16466da" +uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91" +version = "1.25.0+0" + +[[deps.Widgets]] +deps = ["Colors", "Dates", "Observables", "OrderedCollections"] +git-tree-sha1 = "fcdae142c1cfc7d89de2d11e08721d0f2f86c98a" +uuid = "cc8bc4a8-27d6-5769-a93b-9d913e69aa62" +version = "0.6.6" + +[[deps.WoodburyMatrices]] +deps = ["LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "de67fa59e33ad156a590055375a30b23c40299d3" +uuid = "efce3f68-66dc-5838-9240-27a6d6f5f9b6" +version = "0.5.5" + +[[deps.XML2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "58443b63fb7e465a8a7210828c91c08b92132dff" +uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" +version = "2.9.14+0" + +[[deps.XSLT_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"] +git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" +uuid = "aed1982a-8fda-507f-9586-7b0439959a61" +version = "1.1.34+0" + +[[deps.Xorg_libX11_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] +git-tree-sha1 = "5be649d550f3f4b95308bf0183b82e2582876527" +uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" +version = "1.6.9+4" + +[[deps.Xorg_libXau_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4e490d5c960c314f33885790ed410ff3a94ce67e" +uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" +version = "1.0.9+4" + +[[deps.Xorg_libXcursor_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "12e0eb3bc634fa2080c1c37fccf56f7c22989afd" +uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" +version = "1.2.0+4" + +[[deps.Xorg_libXdmcp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4fe47bd2247248125c428978740e18a681372dd4" +uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" +version = "1.1.3+4" + +[[deps.Xorg_libXext_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "b7c0aa8c376b31e4852b360222848637f481f8c3" +uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" +version = "1.3.4+4" + +[[deps.Xorg_libXfixes_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "0e0dc7431e7a0587559f9294aeec269471c991a4" +uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" +version = "5.0.3+4" + +[[deps.Xorg_libXi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] +git-tree-sha1 = "89b52bc2160aadc84d707093930ef0bffa641246" +uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" +version = "1.7.10+4" + +[[deps.Xorg_libXinerama_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll"] +git-tree-sha1 = "26be8b1c342929259317d8b9f7b53bf2bb73b123" +uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" +version = "1.1.4+4" + +[[deps.Xorg_libXrandr_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "34cea83cb726fb58f325887bf0612c6b3fb17631" +uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" +version = "1.5.2+4" + +[[deps.Xorg_libXrender_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "19560f30fd49f4d4efbe7002a1037f8c43d43b96" +uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" +version = "0.9.10+4" + +[[deps.Xorg_libpthread_stubs_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "6783737e45d3c59a4a4c4091f5f88cdcf0908cbb" +uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" +version = "0.1.0+3" + +[[deps.Xorg_libxcb_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] +git-tree-sha1 = "daf17f441228e7a3833846cd048892861cff16d6" +uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" +version = "1.13.0+3" + +[[deps.Xorg_libxkbfile_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "926af861744212db0eb001d9e40b5d16292080b2" +uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" +version = "1.1.0+4" + +[[deps.Xorg_xcb_util_image_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "0fab0a40349ba1cba2c1da699243396ff8e94b97" +uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll"] +git-tree-sha1 = "e7fd7b2881fa2eaa72717420894d3938177862d1" +uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_keysyms_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "d1151e2c45a544f32441a567d1690e701ec89b00" +uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_renderutil_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "dfd7a8f38d4613b6a575253b3174dd991ca6183e" +uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e" +version = "0.3.9+1" + +[[deps.Xorg_xcb_util_wm_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "e78d10aab01a4a154142c5006ed44fd9e8e31b67" +uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361" +version = "0.4.1+1" + +[[deps.Xorg_xkbcomp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxkbfile_jll"] +git-tree-sha1 = "4bcbf660f6c2e714f87e960a171b119d06ee163b" +uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" +version = "1.4.2+4" + +[[deps.Xorg_xkeyboard_config_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xkbcomp_jll"] +git-tree-sha1 = "5c8424f8a67c3f2209646d4425f3d415fee5931d" +uuid = "33bec58e-1273-512f-9401-5d533626f822" +version = "2.27.0+4" + +[[deps.Xorg_xtrans_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "79c31e7844f6ecf779705fbc12146eb190b7d845" +uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" +version = "1.4.0+3" + +[[deps.Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.12+3" + +[[deps.Zstd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e45044cd873ded54b6a5bac0eb5c971392cf1927" +uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" +version = "1.5.2+0" + +[[deps.libaom_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3a2ea60308f0996d26f1e5354e10c24e9ef905d4" +uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" +version = "3.4.0+0" + +[[deps.libass_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "5982a94fcba20f02f42ace44b9894ee2b140fe47" +uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" +version = "0.15.1+0" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.1.1+0" + +[[deps.libfdk_aac_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "daacc84a041563f965be61859a36e17c4e4fcd55" +uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" +version = "2.0.2+0" + +[[deps.libpng_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "94d180a6d2b5e55e447e2d27a29ed04fe79eb30c" +uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" +version = "1.6.38+0" + +[[deps.libvorbis_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll", "Pkg"] +git-tree-sha1 = "b910cb81ef3fe6e78bf6acee440bda86fd6ae00c" +uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" +version = "1.3.7+1" + +[[deps.nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" +version = "1.48.0+0" + +[[deps.p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "17.4.0+0" + +[[deps.x264_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4fea590b89e6ec504593146bf8b988b2c00922b2" +uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a" +version = "2021.5.5+0" + +[[deps.x265_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "ee567a171cce03570d77ad3a43e90218e38937a9" +uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" +version = "3.5.0+0" + +[[deps.xkbcommon_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll", "Wayland_protocols_jll", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] +git-tree-sha1 = "9ebfc140cc56e8c2156a15ceac2f0302e327ac0a" +uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" +version = "1.4.1+0" +""" + +# ╔═╡ Cell order: +# ╟─f3770e42-edff-4c9f-9a13-47edaf8a8cae +# ╟─fe7f2df3-8c27-4e80-a633-386e8643e6e1 +# ╟─baf83ba6-2079-11ed-1505-cb44aea4377e +# ╟─c85214aa-83b1-41f0-b856-f85435db6e1d +# ╟─e6c8aca8-1907-49b0-ba11-62fda98418fc +# ╟─a5654402-f51d-468e-99fb-09a5c69a6421 +# ╟─b145ea5b-9fc0-4a57-b41b-ad8c825eaccc +# ╟─de6fc3a6-78dc-489a-8ac3-3642e0760d6a +# ╟─a3a93c83-94c8-44e7-a62f-46cae602ac77 +# ╟─1635054e-3e02-4f3b-8726-bef468c11a82 +# ╟─2b52dcf7-f8aa-49ea-a8e5-df4d819fc970 +# ╟─3adfcebb-e620-4c41-b9a7-3584fbfd61c1 +# ╟─0f9ce7d3-ccf3-40f6-9573-ec40dc643749 +# ╠═bcf4086f-1469-49d4-a3f5-730a30771da4 +# ╟─6be2784a-cf0c-4d75-9858-b063880c4e98 +# ╟─3520ad46-7ac5-47bf-9389-62a46f6a26f8 +# ╟─65ae3b8f-a33a-49ba-b135-ab20674ec67a +# ╠═c3fe7693-8425-4f6b-8529-c9b242073334 +# ╟─045474d2-18f1-45b1-8c5d-9a82980e96bd +# ╠═287d41f1-9ade-4a73-b8ea-1e11aaf62fbe +# ╟─d51ba0c0-9ca1-47aa-8364-080abc8175c3 +# ╠═ae200380-7c83-4fa6-9661-9cf1999732e3 +# ╟─b3919bcb-c2e7-442b-a06c-93d172878f9c +# ╠═ed8457c7-9547-4953-ae72-121572fe8495 +# ╟─49a993c4-27c9-4c89-b4c4-04c294f044c0 +# ╟─a091f1d5-29c0-4a98-b1b8-4177cd6cd2f7 +# ╟─a6c186ae-9d7a-452e-bfb2-b303c0cfea5a +# ╠═cbd40c3a-cf65-4d1c-833a-29a1e39dc893 +# ╟─a08b431d-86b4-4f03-b0aa-eadba6284e95 +# ╠═82b73754-f164-4bc0-82d9-fd0311a59919 +# ╠═a12d7a2e-5a4e-46db-b802-1af1331456dd +# ╟─911bf98c-130c-4e20-a353-bc290c865a27 +# ╠═5c15f435-8ea6-446e-a27d-3270b463f681 +# ╟─b8d452b1-b75b-4012-872a-3baced9c1cb6 +# ╠═054d075f-4e1c-42b2-955e-70ac1e36144b +# ╟─2d934969-c540-4e88-b137-d22e836e7daa +# ╠═d8764bd8-7d7d-4910-80ee-2187ad31f336 +# ╟─d78b7c17-1f6d-424c-aeed-e35a9d3db49e +# ╠═d349aa84-4b2a-42c9-98a4-5849ece5e6ae +# ╟─6950f0da-d61a-465b-aaaf-8a802f50452a +# ╟─c68f7d30-3061-40db-8af3-369149cd5ff9 +# ╠═84710a37-34c3-4c20-bd5c-b293d23bc7cf +# ╠═45037f4e-5744-4de7-885d-f0a678b72ec1 +# ╟─b3d46870-ef00-4fec-a5f2-2f3b6b11687c +# ╠═52a6e45f-b458-463a-95b8-0f8a184ce171 +# ╠═b078d4c9-7638-43a4-bd77-57a40b1511ef +# ╠═2b305ef2-551e-4327-ad56-2bd3a12f51fc +# ╟─84713022-8e34-4e57-aa2f-cf9d6cf61cad +# ╟─36824286-375a-48db-af65-b6dcaf6497b8 +# ╟─46be754e-ec2f-4e0d-aef3-865492d2dd0c +# ╟─1af4b04a-a7a1-4808-9cf0-038c95037fa5 +# ╟─7d897f13-7358-446f-b87a-60ad945769ea +# ╠═7cd155b2-f76e-4152-9d79-ac9ea8c32b16 +# ╟─d0b5cc5a-f0cf-44e8-9e2a-e28b94d4429f +# ╟─04065f11-4748-4cf0-abf4-01484454da0b +# ╟─aed0ed19-0183-4eb8-83c9-3d2419d299b8 +# ╟─02938204-99d2-4209-abcf-cbcfd62f9c04 +# ╠═8548c4cb-9e9b-4ca7-bd4e-97e16058606d +# ╟─c2ee8d41-eec8-43ad-b4c0-2f859ad03b93 +# ╠═c195aa69-89f6-4417-b602-67922a76b87a +# ╟─4a51bb66-f4d4-4a7d-8e07-91d3ff5f4f28 +# ╟─17b5759c-deab-4bc0-b7b6-fc2c0e64eebb +# ╠═c52294ca-49fb-43f7-87bb-860c8088506d +# ╟─fcd72da9-e175-4fd1-a047-7dd3711dcbf4 +# ╠═6df9180f-59bf-4462-ae9d-a2623379071a +# ╟─a1aa6ab4-f183-4adc-9ad8-70d80deaa15f +# ╠═dfa4201c-19da-4ca9-b537-8396c2899d42 +# ╟─dbc643ae-d68c-416f-b1b9-dc8a0025dfe0 +# ╠═e1de498d-d66f-42c8-bb22-e80d623c4554 +# ╟─6c4ede4f-a566-4dfc-bfdf-f4feadac84aa +# ╠═14fc0ff8-2284-412f-99af-6264d24d6198 +# ╠═4958c15f-5725-4645-a71d-e8a26a94a894 +# ╟─a5c62a3c-2a59-4388-adb5-b0d93be2360d +# ╟─5f31fe56-ff6c-4cae-b835-15e100771a82 +# ╠═a1b6c516-0d3a-4add-990c-9ea755d6c7b6 +# ╟─9fbbb50d-ebb8-4e13-b28c-fbde63926cae +# ╟─3f9138da-c21a-458f-8eaa-a10079a2ee35 +# ╠═d0d5068b-f58d-4835-81eb-7cdc3273961e +# ╠═bcaf0dba-c26c-41f2-b5ad-34fb81b4e34d +# ╟─a748b9e1-dd0c-4899-bf04-42a831e95434 +# ╠═22aa7b65-94f7-4cd7-a3f6-49d70c88e8e1 +# ╟─3cfdb5c7-5ca3-4f86-ac9f-b3456b03303b +# ╠═60c7ec9a-a6e4-43a5-921a-b6ba3ba511d0 +# ╟─8e0c8524-3142-498b-bac1-60f591ede438 +# ╟─42d47b65-5b68-4f81-af5f-17a1df35c1cb +# ╟─0ff926f9-a294-4846-b7ab-d02203a73a13 +# ╠═482b83c6-fe77-41ea-bc4a-4a9b76bf30ac +# ╟─77ec658a-0fe5-4fc4-81ac-70336e46096b +# ╠═528d9adb-1888-4f31-91eb-450879053bf6 +# ╟─49c595cf-4a6f-43fe-9c0e-365effd70f96 +# ╠═58a419b4-4017-474f-a3e9-cc58d2aaa29a +# ╟─f38cf720-5346-4590-b466-c42c86fe1555 +# ╠═b6637bc1-a63c-44cc-bf57-ae2c7252e176 +# ╟─9d25c7c8-252c-4998-9d7c-f93be58ec671 +# ╠═8416fec3-5460-441a-b415-40d04075ccf3 +# ╟─0eb81388-75c6-40c6-ad2e-04baf59a7d71 +# ╟─56961f01-40b2-4a18-90a2-a0ebeeebd16c +# ╠═e65a6edb-12ab-44c4-a1ff-94a457583c49 +# ╟─c8ab39c8-a3e0-4ef5-8a47-365b5c484042 +# ╠═9f420af3-f080-411d-bc14-e2e45572ac77 +# ╟─da4fb082-1f42-41ac-a0eb-55a087b4b4a5 +# ╠═d0646d89-64a4-4eb3-8739-2cac268abcf3 +# ╟─a5212ff7-0416-440d-8ad6-9b6e0ac35a8d +# ╠═de16ea53-0391-41b5-950f-0c60654d0cd7 +# ╟─fcdfed67-380d-4b11-8881-2575df2008b0 +# ╠═0ee0e688-9bc7-489b-a4ae-a4f09477fd33 +# ╟─00000000-0000-0000-0000-000000000001 +# ╟─00000000-0000-0000-0000-000000000002 diff --git a/section1_introduction.jl b/section1_introduction.jl new file mode 100644 index 0000000..a1fbe6d --- /dev/null +++ b/section1_introduction.jl @@ -0,0 +1,1881 @@ +### A Pluto.jl notebook ### +# v0.19.11 + +using Markdown +using InteractiveUtils + +# ╔═╡ 078e8979-6753-411f-9c34-ba0164ea9cb2 +begin + using PlutoUI + using Distributions + using StatsPlots + using Random + using LaTeXStrings + using Logging; Logging.disable_logging(Logging.Info); +end; + +# ╔═╡ af174ba8-fd36-11ec-10a6-a3506bbed95f +md""" +##### Package initialization +""" + +# ╔═╡ b2ad130c-5d40-4a4b-adbe-5880984a9460 +TableOfContents() + +# ╔═╡ 97d325ca-2c41-42b4-82b8-f74659e61dc3 +md""" + +## Introduction + +**Statistical inference**, or learning in the machine learning community, is the process of inferring properties about the population distribution from observed data. The observed data is usually assumed to be drawn from the population: + +$$d_1, d_2, \ldots, d_N \sim \mathcal P,$$ + +where "``\sim``" means the data are distributed according to, or equivalently, drawn from the distribution. And we want to *infer* some properties of the population distribution ``\mathcal P`` based on the sample ``\mathcal D = \{d_n\}``. + + +The most common inference case is parametric inference: that is when the population ``\mathcal P`` is some probability distribution with some finite number of parameters. For example, to test whether a coin is fair, we toss the coin ``N`` times. In this case, the population distribution is a Bernoulli distribution, i.e. a random variable with binary outcomes. The population distribution is fully determined by one parameter ``\theta \in [0,1]``, i.e. the bias of the coin: + +$$\mathcal P \triangleq \text{Bernoulli}(d; \theta)= \begin{cases} \theta, & d=\texttt{head} \\ 1-\theta, & d= \texttt{tail}\end{cases}$$ + + +and ``d_i`` are random independent samples from the distribution: for ``i \in 1, \ldots, N`` + +$$d_i \sim \text{Bernoulli}(\theta).$$ + +Then a typical inference query is: + + +> Based on the observed data ``\mathcal D=\{d_1, d_2, \ldots, d_N\},`` what the population distribution's bias ``\theta`` is? + +There are two camps of statistical inference: the frequentist and the Bayesian approach. Historically, the frequentist's approach has been more widely taught and used. However, the Bayesian approach has gained a lot more attention lately, especially in the machine learning community. In this course, we are going to see how Bayesian approach the statistical inference questions. We will see how Bayesian inference provides us with an alternative solution which is usually more overfitting proof, numerically stable, and natural to understand. + +In the next section, we are going to first review Baye's theorem, which is the cornerstone of Bayesian inference. Some key Bayesian inference concepts will be introduced afterwards. +""" + +# ╔═╡ 300929c0-3279-47ef-b165-0e936b757679 +md""" + +## Baye's theorem + +We first review Baye's theorem, which forms the core idea of Bayesian inference. + + +!!! infor "Baye's theorem" + Baye's rule provides us with a mechanism to infer an unknown quantity $\theta$ based on observed data $\mathcal D$: + + $$\text{posterior}=\frac{\text{prior} \times \text{likelihood}}{\text{evidence}}\;\;\text{or}\;\;p(\theta|\mathcal D) =\frac{\overbrace{p(\theta)}^{\text{prior}} \overbrace{p(\mathcal D|\theta)}^{\text{likelihood}}}{\underbrace{p(\mathcal D)}_{\text{evidence}}},$$ + + which is often simplified to: + + $$p(\theta|\mathcal D) \propto {p(\theta)} p(\mathcal D|\theta),$$ + + ("``\propto``" denotes "proportional to") as the evidence term + + $$p(\mathcal D) = \int p(\theta) (\mathcal D|\theta)\mathrm{d}\theta$$ is constant respect to ``\theta``. + * ``p(\theta)`` **prior** distribution: prior belief of ``\theta`` before we observe the data + * ``p(\mathcal D|\theta)`` **likelihood**: conditional probability of observing the data given a particular $\theta$ + * ``p(\mathcal D)`` **evidence**. It scales the product of prior and likelihood, ``p(\theta) \times p(\mathcal D|\theta)``, such that the posterior ``p(\theta|\mathcal D)`` is a valid probability distribution. That is the total probability mass sum to one. +""" + +# ╔═╡ 41e15a4f-8ddc-47f9-8286-bf583b7d748a +md""" +### Why Baye's theorem is useful? + +Human brains are not very good at doing reverse logic reasoning directly. We are however good at thinking in the forward direction. Baye's rule provides us with a tool to do the reverse reasoning routinely based on the forward logic. + +When it comes to statistical inference, it is way more straightforward to specify the *forward probability*: + +$$\theta \xRightarrow[\text{probability}]{\text{forward}} \mathcal{D}.$$ + +That is assuming the unknown parameter ``\theta``, how likely one observes the data, which is known as **likelihood** function and denoted as a conditional probability: + +$$p(\mathcal D|\theta):\;\; \text{likelihood function}.$$ + +In practice, we are more interested in the opposite direction: + +$$\mathcal D \xRightarrow[\text{probability}]{\text{inverse}} \theta.$$ + + +That is given the observed data ``\mathcal D``, what ``\theta \in \Theta`` is more likely to have been used to generate data, which is exactly the posterior distribution: + +$$p(\theta|\mathcal D):\;\; \text{Posterior distribution}.$$ + + +Baye's rule provides the exact tool to do this reverse engineering. And the recipe is simple and mechanical: multiply a prior with the likelihood (forward probability): + +$$p(\theta|\mathcal D) \propto p(\theta) p(\mathcal D|\theta).$$ + +The following example demonstrates how Baye's rule is used to answer a non-trivial inverse probability problem. + +""" + +# ╔═╡ c91937d3-1a46-4dc2-9d0d-f6fda482ea36 +md""" + +**Example (Switch point detection)** Your friend has two coins: one fair (i.e. with the probability of a head turning up $p=0.5$) and one bent (with a probability of head turning up $p= 0.2$). He always uses the fair coin at the beginning and then switches to the bent coin at some unknown time. +You have observed the following tossing results: ``\mathcal{D}= [0,1, 0,0,0,0]``. We use 1 to represent the head and 0 for the tail. When did he switch the coin? +""" + +# ╔═╡ 41bd090a-ed31-4ebc-ad57-0785323378d4 +function ℓ_switch(D, p₁=0.5, p₂=0.2) + likes = zeros(length(D)-1) + for t in 1:length(likes) +# Bernoulli(p) return a instance of Bernoulli r.v. +# pdf(Bernoulli(p), y) return the probability, either p or 1-p depends on y +# prod times everything together + likes[t] = prod(pdf.(Bernoulli(p₁), D[1:t])) * prod(pdf.(Bernoulli(p₂), D[(t+1):end])) + end + return likes, sum(likes) +end; + +# ╔═╡ 6f57947d-0ecb-4e9c-b8c7-6ca8de2630d8 +md""" +**Solution** + +We identify the unknown $\theta \triangleq S$: i.e. the unknown switching point ``S``: +* ``S\in \{1,2,3,\ldots, 5\}``: after $S$-th toss, he switches the coin; + + +First, we determine the **likelihood**, or **forward probability**: the conditional probability of observing the data ``\mathcal D`` assuming (i.e. conditioning on) we know the switching point S. It is worth noting that this forward probability is straightforward to specify. Knowing the switching point, the whole data becomes two segments of independent coin tosses: + +$$p(\mathcal D|S) = \underbrace{\prod_{i=1}^S p(d_i|p =0.5)}_{\text{coin 1}} \underbrace{\prod_{j=S+1}^N p(d_j|p = 0.2)}_{\text{coin 2}};$$ + +For example, if ``S=2``, the likelihood is ``p(\mathcal D|S=2) = \underbrace{0.5\cdot 0.5}_{\text{before switch}} \times \underbrace{(1-0.2)^4}_{\text{after switch}}``. + + +$(begin + Plots.plot(1:5, ℓ_switch([0,1,0,0,0,0])[1], xlabel=L"S", ylabel=L"p(\mathcal{D}|S)", title="Likelihood function", st=:sticks, marker=:circle, label="") +end) + +To apply Baye's rule, we need to impose a *prior* distribution over the unknown. To reflect our ignorance, a natural choice is a uniform distribution: for ``S \in \{1,2,\ldots, 5\}``: ``p(S) = 1/5.`` + +Lastly, we combine the prior and likelihood according to Baye's rule: + +$$p(S|\mathcal D) \propto p(S) p(\mathcal D|S).$$ + + +$(begin + Plots.plot(1:5, 1/5 * ones(5), st=:sticks, color=1,marker=:circle, label="") + Plots.plot!(1:5, 1/5 * ones(5), st=:path, fill=true, color=1, alpha= 0.3, label="Prior") + Plots.plot!(1:5, ℓ_switch([0,1,0,0,0,0])[1]./ℓ_switch([0,1,0,0,0,0])[2], xlabel=L"S", ylabel=L"p(S|\mathcal{D})", title="Posterior distribution of the switching point", st=:sticks, marker=:circle, color=2, label="") + Plots.plot!(1:5, ℓ_switch([0,1,0,0,0,0])[1]./ℓ_switch([0,1,0,0,0,0])[2], st=:path, fill=true, alpha=0.3, color=2, label="Posterior") +end) + +Baye's theorem **updates** our prior belief to the posterior by combining the likelihood. And according to the posterior, it is *most likely* that the switch point is after the second toss. + +However, there is a great amount of uncertainty about this *single point estimator*: an alternative hypothesis ``S=3`` is also likely. A true Bayesian way to answer the question is to ship the posterior distribution as an answer rather than just report the most likely point estimator. +""" + +# ╔═╡ dc551c95-cae5-4459-bdcd-d98aecb8b5e5 +md""" + + +## Bayesian inference procedure + +The switching point example demonstrates how Baye's theorem is used to answer an inference question. The whole process can be summarised in two stages: **modelling** +and **computation**. + + +**Bayesian *modelling* stage** + +At the modelling stage, we are *telling a story* of the forward probability: i.e. how the data is generated hypothetically. + +Different from the frequentist approach, Bayesian inference assumes both the **unknown parameter** ``\theta`` and the **observed data** ``\mathcal D`` random. +Therefore, Bayesian's storyline includes data generation process for ``theta``, i.e. **prior** and the observed ``\mathcal D``, i.e. **likelihood**. + +In other words, both methods require the likelihoodm but specifying priors for the unknowns is unique to the Bayesian approach. + +**Bayesian *computation* stage** + +At the **computation** stage, we routinely apply Baye's rule to answer the inverse inference question or the posterior distribution and finally summarise the posterior to answer specific downstream inference questions. + +However, the computation step is only *conceptually* straightforward. There is no technical difficulty when the parameter space $\Theta$ is discrete and finite: e.g. the unknown switching point can take one of the five discrete choices. In practice, this exact enumeration method becomes unattainable when the parameter space is continuous and higher-dimensional. And we need more advanced algorithms, e.g. Markov Chain Monte Carlo (MCMC) or variational method, to make the computation scalable. We will discuss the advanced computation algorithm in the next chapter. + +""" + + +# ╔═╡ 07e16486-c07c-450c-8de3-8c088c80816a +md""" +It is also worth noting that all Bayesian inference problems follow the same two procedures. Compared with the frequentist methods which are formed by a variety of techniques (to name a few: *Z-test, T-test, Χ²-test, bootstrap*), the Bayesian procedure is uniform and standard. +""" + +# ╔═╡ fcb0fab4-d2f7-411f-85f6-0db536f8ee5a +md""" + +In summary, Bayesian inference is formed by two blocks of steps: modelling, and computation. + +!!! note "Modelling" + + 1. Specify **Prior** distribution for the unknown: ``p(\theta)``. As the name suggests, a prior represents our prior belief of the unknown variable *before* we see the data. It represents a subjective belief. + + + 2. Determine **Likelihood** function for the observed: ``p(\mathcal D|\theta)``. A likelihood function is a conditional probability of observing the data $\mathcal D$ given a particular $\theta \in \Theta$. The likelihood is used both in classic Frequentist and Bayesian inference. + + +!!! note "Computation" + 3. Compute **Posterior** distribution: ``p(\theta|\mathcal D)``. The third step is straightforward, at least conceptually: i.e. mechanically apply Baye's rule to find the posterior. + 4. (optional) Report findings. Summarise the posterior to answer the inference question at hand. This step is optional as Bayesians report the posterior distribution from step three as the answer. +""" + +# ╔═╡ 481044fe-07ea-4118-83d8-e9f287406d10 +md""" + +To consolidate the idea of Bayesian inference's procedure, we will see a few inference examples. When possible, both the frequentist and Bayesian methods will be applied and compared. +""" + +# ╔═╡ 198e2787-4901-4478-a092-a84410ad2dd5 +md""" + +## An example: coin-flipping + +To better understand the Bayesian inference procedure and also draw comparisons with the Frequentist's approach, we revisit the inference problem mentioned earlier: inferring the bias of a coin. + +> A coin 🪙 is tossed 10 times. And the tossing results are recorded: +> $$\mathcal D=\{1, 1, 1, 0, 1, 0, 1, 1, 1, 0\}$$; +> i.e. seven out of the ten tosses are heads (ones). Is the coin **fair**? + + +We will first see how the frequentist approach solves the problem then the Bayesian method. +""" + +# ╔═╡ 14710249-9dc1-4a75-b0b3-25ac565452a5 +begin + head, tail = 1, 0 + 𝒟 = [head, head, head, tail, head, tail, head, head, head, tail] + h_total = sum(𝒟) + N = length(𝒟) + ℓ(θ, N, Nₕ) = θ^Nₕ * (1-θ)^(N-Nₕ) + θs = 0:0.1:1.0 + likes = ℓ.(θs, N, h_total) +end; + +# ╔═╡ be2a2acd-5633-45cc-ab8c-8a064324b287 +begin + cint_normal(n, k; θ=k/n, z=1.96) = max(k/n - z * sqrt(θ*(1-θ)/n),0), min(k/n + z * sqrt(θ*(1-θ)/n),1.0) + within_int(intv, θ=0.5) = θintv[1] +end; + +# ╔═╡ bd85c6ef-8623-4e06-8f7e-1e30927b25b7 +begin + Random.seed!(100) + θ_null = 0.5 + n_exp = 100 + trials = 10 + outcomes = rand(Binomial(trials, θ_null), n_exp) + intvs = cint_normal.(trials, outcomes; z= 1.645) + true_intvs = within_int.(intvs) + ϵ⁻ = outcomes/trials .- [intvs[i][1] for i in 1:length(intvs)] + ϵ⁺ = [intvs[i][2] for i in 1:length(intvs)] .- outcomes/trials +end; + +# ╔═╡ 32c1a567-0b61-4927-81fc-f66773ed3e05 +md""" + +### Method 1. Frequentist approach* + +The frequentist approach believes ``\theta`` is not a random variable but some fixed constant. Therefore, they will not use Baye's rule, which treats ``\theta`` as a random variable (with prior and posterior distributions). Instead, the frequentists will form some estimator for ``\theta`` and try to find some long-term frequency property of the estimator. A natural estimator for the bias ``\theta`` is the observed frequency: + +$$\hat\theta = \frac{1}{N}\sum_{n=1}^N d_n = \frac{N_h}{N} =0.7,$$ + +where ``N_h=\sum_n d_n`` denotes the total count of heads, and ``N`` is the number of tosses. However, the true bias of the coin will not exactly be ``\hat\theta=0.7``. If we toss the coin another 10 times, the observed frequency will likely be different from ``0.7``. So how serious shall we think about this ``0.7``? The frequentist wants to know the long-term frequency pattern of the estimator ``\hat\theta`` (but **not** ``\theta``). + +One of the frequentist's methods to achieve this is to form a **confidence interval**: an interval ``\theta \in (l, u)`` that traps the true unknown parameter with some good confidence or high probability. + +""" + +# ╔═╡ ff41d114-0bd4-41ea-9c22-b6af52b3fa21 +md""" + + + +A Gaussian-based confidence interval can be formed for the coin's unknown bias: + +$$(\hat{\theta} - z_{\alpha/2} \hat{\texttt{se}}, \hat{\theta} + z_{\alpha/2} \hat{\texttt{se}}),$$ + +where + +$$\hat{\texttt{se}}= \sqrt{\frac{\hat{\theta}(1-\hat{\theta})}{N}}.$$ + +""" + +# ╔═╡ 278d302f-6b81-4b00-bdd2-55057417809e +md""" + +For our case, +``\hat\theta = \frac{\sum_{n=1}^N d_n}{N}=0.7`` and the standard error about ``\hat \theta`` is: ``\hat{\texttt{se}} = \sqrt{\frac{\hat{\theta} (1-\hat{\theta})}{N}}\approx 0.145.`` + + +Picking a significance level at ``\alpha = 10\%``, the corresponding $z_{\alpha/2}=1.645$. A confidence interval of ``90\%`` therefore is + +$$(0.46, 0.94).$$ + +Since the confidence interval encloses ``\theta=0.5``, the frequentists conclude that we do not have overwhelming evidence to rule out the coin being fair. + +But what confidence interval means here? Frequentist's methods assume ``\theta`` is a fixed unknown quantity (but only data $\mathcal D$ is random). The confidence interval surely is **not** a probability statement about ``\theta`` but a probability statement about the random interval. The idea can be interpreted as: + +!!! danger "" + + + A ``\alpha=10\%`` **confidence interval** here means if you + + *repeat the following two steps, say 10,000 times:* + + 1. *toss the coin another 10 times* + 2. *calculate another confidence interval*: ``(\hat{\theta} - 1.645 \hat{\texttt{se}}, \hat{\theta} + 1.645 \hat{\texttt{se}})`` *as above* + + Over the 10,000 random intervals, which should be all different from each other, approximately 90% of them trap the true parameter. Check the diagram below for illustration. + + +The animation below illustrates the idea of a confidence interval. Conditional on the hypothesis that the coin is fair, i.e. ``\theta =0.5`` (it works for any ``\theta\in [0,1]``), the above two steps were repeated 100 times, i.e. tossing the coin ten times and then forming a confidence interval. The red vertical intervals (there are roughly 10 of them) are the 10% CIs that do not trap the true bias. +""" + +# ╔═╡ b113a7ce-7e00-4df3-b1a4-4cf7af005aaf +begin + p = hline([0.5], label=L"\mathrm{true}\;θ=0.5", color= 3, linestyle=:dash, linewidth=2, xlabel="Experiments", ylim =[0,1]) + @gif for i in 1:n_exp + k_ = outcomes[i] + # intv = cint_normal(trials, k_; z= 1.645) + # intv = intvs[i] + in_out = true_intvs[i] + col = in_out ? 1 : 2 + θ̂ = k_/trials + scatter!([i], [θ̂], label="", yerror= ([ϵ⁻[i]], [ϵ⁺[i]]), markerstrokecolor=col, color=col) + end +end + +# ╔═╡ 1c64b953-5a3d-4a80-b523-8b8f213f6849 +md""" +The final plot of the 100 confidence intervals is also listed. +""" + +# ╔═╡ 8332304c-2264-46df-baf1-0a1070927152 +begin + first_20_intvs = true_intvs[1:100] + scatter(findall(first_20_intvs), outcomes[findall(first_20_intvs)]/trials, ylim= [0,1], yerror =(ϵ⁻[findall(first_20_intvs)], ϵ⁺[findall(first_20_intvs)]), label="true", markerstrokecolor=:auto, legend=:outerbottom,legendtitle = "true θ within CI ?") + scatter!(findall(.!first_20_intvs), outcomes[findall(.!first_20_intvs)]/trials, ylim= [0,1], yerror =(ϵ⁻[findall(.!first_20_intvs)],ϵ⁺[findall(.!first_20_intvs)]), label="false", markerstrokecolor=:auto) + hline!([0.5], label=L"\mathrm{true}\;θ=0.5", linewidth =2, linestyle=:dash, xlabel="Experiments") +end + +# ╔═╡ 65b17042-1e16-4097-86c9-83c516de803d +md""" +In practice, we make an inference decision based on one of the realised CI (0.46, 0.94), or one experiment: it either traps or misses the true value. However, it is likely (90% of chance) that the CI at hand is one of the good CIs. Equally, there is a small chance the CI is wrong, i.e. it misses the true value. The error is known as the **Type 1** error. +""" + +# ╔═╡ b42dc5e4-143e-4469-be7f-7b1f73ca9064 +md""" + +If you think the Frequentist's confidence interval is confusing, I agree with you. The thought experiment of repeated experiments does not even make sense in cases like time series analysis: how can one travel back in time to collect another sample? + +If you want to know a more direct answer about the unknown ``\theta``, we need to resort to Bayesian inference. It provides us with a probability statement about the unknown quantity directly: +> "*In light of the observed data, what ``\theta`` is more credible, i.e. what is ``p(\theta|\mathcal D)``?*'' + +""" + +# ╔═╡ c8c99b5a-1bd2-4762-beb2-518e0e8c9aa3 +md""" + +### Method 2. Bayesian approach + +The Bayesian approach assumes ``\theta`` is a random variable with some prior distribution. And apply Baye's rule to answer the question. + + +Bayesian inference starts with a model: or "a story on how the data is observed". Note that, from Bayesian's perspective, the data here include **all** data: both known (or observed) and the unknown. On the other hand, the frequentists' storyline only cares about the observed. + +For the coin flipping problem, the *story* is straightforward: the unknown ``\theta`` is first drawn from a prior distribution, and then ``N`` realisations ``d_n`` are drawn from tossing the coin. + + +**Step 1. set a prior for the unknown: ``p(\theta)``** + +The bias, denoted as ``\theta``, is the unknown parameter. To make the posterior computation easier, let's assume $\theta$ can only take 11 discrete values: 0, 0.1, 0.2 up to 1.0: + +$\theta \in [0.0, 0.1, 0.2, \ldots, 1.0],$ + +To show our ignorance, we can further assume a uniform prior over the 11 discrete choices, i.e. + +$$p(\theta) = \begin{cases} 1/11, & \theta \in \{0, 0.1, \ldots, 1.0\} \\ +0, & \text{otherwise}; \end{cases}$$ + +The prior distribution is shown below: + +$(begin + prior_plt = Plots.plot(0:0.1:1.0, 1/11 * ones(11), ylim= [0,1], seriestype=[:path, :sticks], color= 1, fill=true, alpha=0.3, markershape=:circle, xlabel=L"θ", ylabel=L"p(θ)", label="", title="Prior") +end) + +""" + +# ╔═╡ 94ae916e-49fb-4426-b261-57b39599a4e7 +md""" + +**Step 2. Determine the likelihood function: ``p(\mathcal D|\theta)``** + +Next, we need to determine the likelihood function: how the observed data, ``\mathcal D``, *is generated* conditional on ``\theta``. A coin toss follows a Bernoulli distribution: + +$$p(d|\theta) = \begin{cases} \theta, & d = \texttt{h} \\ 1-\theta, & d= \texttt{t},\end{cases}$$ + +Due to the independence assumption, the likelihood for ``\mathcal D`` is just the product: + +$$p(\mathcal D|\theta) = p(d_1|\theta)p(d_2|\theta)\ldots p(d_{10}|\theta)= \prod_{n=1}^{N} p(d_n|\theta) = \theta^{\sum_{n}d_n} (1-\theta)^{N-\sum_{n}d_n},$$ + +For our case, we have observed ``N_h=\sum_n d_n = 7`` heads out of ``N=10`` total tosses, we can therefore evaluate the likelihood function at the pre-selected 11 values of $\theta$. + +$(begin + like_plt = + Plots.plot(0:0.1:1.0, θ -> ℓ(θ, N, h_total), seriestype=:sticks, color=1, markershape=:circle, xlabel=L"θ", ylabel=L"p(𝒟|θ)", label="", title="Likelihood") +end) + +""" + +# ╔═╡ 65ef62da-f095-4bb2-aa0f-120827bed6e0 +md""" + +After spelling out the model (i.e. prior and likelihood), we apply Baye's rule to find the posterior. + +**Step 3. Apply Baye's theorem** + +Mechanically apply Baye's rule: i.e. multiplying the prior and likelihood then normalise. + +Note the prior is a constant, the posterior is proportional to the likelihood: + +$$p(\theta|\mathcal D) \propto p(\theta)\cdot p(\mathcal D|\theta) = \frac{1}{11} \cdot p(\mathcal D|\theta)\propto p(\mathcal D|\theta).$$ + +The normalising constant $p(\mathcal D)$ is + +$$p(\mathcal D) = \sum_{\theta\in \{0.0, 0.1, \ldots, 1.0\}} p(\theta)\cdot p(\mathcal D|\theta).$$ + + + +""" + +# ╔═╡ 785bdafd-4bfc-441b-bd79-f1bbced4efb9 +md""" +The posterior can be calculated as follows: for ``\theta \in \{0.0, 0.1, \ldots, 1.0\}``: + +$$p(\theta|\mathcal D) = \frac{p(\mathcal D|\theta)}{\sum_{\theta} p(\mathcal D|\theta)}$$ + +The posterior update procedure is illustrated below. Note that the posterior is of the same shape as the likelihood (due to a flat prior being used). After observing the data, the posterior now centres around 0.7. But it seems 0.8 and 0.6 are also likely. +""" + +# ╔═╡ 009a824f-c26d-43e9-bb6d-fd538a19863b +begin + l = @layout [a b; c] + posterior_dis = likes/ sum(likes) + post_plt = Plots.plot(0:0.1:1.0, posterior_dis, seriestype=:sticks, markershape=:circle, label="", color=2, title="Posterior", xlabel=L"θ", ylabel=L"p(θ|𝒟)", legend=:outerleft) + Plots.plot!(post_plt, 0:0.1:1.0, posterior_dis, color=2, label ="Posterior", fill=true, alpha=0.5) + Plots.plot!(post_plt, 0:0.1:1.0, 1/11 * ones(11), seriestype=:sticks, markershape=:circle, color =1, label="") + Plots.plot!(post_plt, 0:0.1:1.0, 1/11 * ones(11), color=1, label ="Prior", fill=true, alpha=0.5) + # Plots.plot!(post_plt, 0.5:0.1:0.9, posterior_dis[6:10], seriestype=:sticks, markershape=:circle, label="95% credible interval", legend=:topleft) + Plots.plot(prior_plt, like_plt, post_plt, layout=l) + + +end + +# ╔═╡ d31477e0-35b0-4968-bfbf-aefa727f3a41 +md""" + +**Step 4. (optional) Report findings** + +Technically, the Bayesian approach has finished once the posterior is finalised. One can ship the full posterior as an answer. However, to answer the particular question of the coin's fairness, we can proceed to *summarise the posterior*. + +One way to summarise a posterior distribution is to find the most likely region of the posterior, or **highest probability density interval (HPDI)** such that the enclosed probability within the interval is some number close to 100 %, e.g. 90%: + +$$p(l \leq \theta \leq u|\mathcal D) = 90 \%.$$ + +Based on the posterior, we find the corresponding interval is between 0.5 and 0.9 inclusive: i.e. + +$$p(0.5 \leq \theta \leq 0.9|\mathcal D) \approx 0.90.$$ +""" + +# ╔═╡ dcc5758e-b1da-48c6-a9cf-5f906fcf76a9 +md""" + +The fair coin hypothesis, i.e. $\theta=0.5$ is within the 90% HPDI. Therefore, we should *not* reject the hypothesis that the coin is fair, which agrees with the frequentist's judgement. + +However, compared with Frequentist's confidence interval, **the credible interval is a probability statement about the unknown bias**: the coin's unknown bias is likely to lie within the range 0.5 to 0.9 with a probability of 0.9. +""" + +# ╔═╡ 633ad986-dc19-4994-b04e-4ec34432dbf2 +begin + θs_refined = 0:0.01:1 + posterior_dis_refined = ℓ.(θs_refined, N, h_total) + posterior_dis_refined ./= sum(posterior_dis_refined) +end; + +# ╔═╡ bc4d9710-7e6c-4bc9-905b-7b3c0c8e9abe +md""" + +## What's next? + +In the following sections, we are going to discuss topics revolving around the two core building blocks of Bayesian inference: **modelling** and **computation**. + + +**Modelling** + +We will introduce more Bayesian modelling concepts in the next chapter, e.g. generative model and prior choices, and model checking. However, the modelling step is more an art than science. Ideally, each problem should have its own bespoke model. Therefore, more model-specific details will be introduced later when we introduce the individual models. + +**Computation** + +In chapter 3, we will introduce Markov Chain Monte Carlo (MCMC), a core algorithm that makes Bayesian inference feasible. We will focus on the intuitions behind some popular MCMC algorithms and also practical applied issues on using MCMC, such as chain diagnostics. + + +**Probabilistic programming `Turing.jl`** + +Implementing each Bayesian model and its inference algorithm from scratch is not practical for applied users. Instead, we can specify a Bayesian model effortless with the help of probabilistic programming languages, such as `Turing.jl`[^1] and `Stan`[^2]. The downstream Bayesian computation tasks can also be done automatically by the packages. We will see how to use `Turing.jl` to do applied Bayesian inference in chapter 4. + +**Bayesian models** + +After the general concepts being introduced in the first four chapters, the second half of the course will cover a range of commonly used Bayesian models. + +* parametric density estimation +* linear regression +* generalised linear regressions +* multi-level models *a.k.a.* hierarchical Bayesian models +* and so on +""" + +# ╔═╡ 66159a91-6a82-4a52-b3fb-9749bb66d4e2 +md""" + +## Notes + +[^1]: [Turing.jl: Bayesian inference with probabilistic programming.](https://turing.ml/stable/) + +[^2]: [Stan Development Team. 2022. Stan Modeling Language Users Guide and Reference Manual](https://mc-stan.org/users/documentation/) + +""" + +# ╔═╡ 6a49bd7b-1211-4480-83a3-ca87e26f9b97 +md""" +## Appendix + +Code used for this chapter. +""" + +# ╔═╡ 5db12a02-7c7c-47f3-8bea-24e4b5d67cae +# only works for uni-modal +function find_hpdi(ps, α = 0.95) + cum_p, idx = findmax(ps) + l = idx - 1 + u = idx + 1 + while cum_p <= α + if l >= 1 + if u > length(ps) || ps[l] > ps[u] + cum_p += ps[l] + l = max(l - 1, 0) + continue + end + end + + if u <= length(ps) + if l == 0 || ps[l] < ps[u] + cum_p += ps[u] + u = min(u + 1, length(ps)) + end + end + end + return l+1, u-1, cum_p +end + +# ╔═╡ ccc239c6-327f-4905-9040-4a7b4a51e6e1 +begin + post_plt2 = Plots.plot(θs, posterior_dis, seriestype=:sticks, markershape=:circle, label="", title=L"\mathrm{Posterior}\, \, p(\theta|\mathcal{D})", xlabel=L"θ", ylabel=L"p(θ|𝒟)") + l1, u1, _ = find_hpdi(posterior_dis, 0.87) + Plots.plot!(post_plt2, θs[l1:u1], posterior_dis[l1:u1], seriestype=:sticks, markershape=:circle, label="90% credible interval", legend=:topleft) + Plots.plot!(post_plt2, θs[l1:u1], posterior_dis[l1:u1], seriestype=:path, color=2, fill=true, alpha=0.3, label="") + Plots.annotate!((0.7, maximum(posterior_dis)/2, ("90 % HDI", 14, :red, :center, "courier"))) +end + +# ╔═╡ 954ea5d8-ba25-44b9-ac7b-7d3e683cc8e0 +begin + post_plt3 = Plots.plot(θs_refined, posterior_dis_refined, seriestype=:sticks, markershape=:circle, markersize=2, label="", title=L"\mathrm{Posterior}\, \, p(\theta|\mathcal{D}) \mathrm{with\; refined\; space}", xlabel=L"θ", ylabel=L"p(θ|𝒟)") + l2, u2, _ = find_hpdi(posterior_dis_refined, 0.9) + Plots.plot!(post_plt3, θs_refined[l2:u2], posterior_dis_refined[l2:u2], seriestype=:sticks, markershape=:circle, markersize=2, label="", legend=:topleft) + Plots.plot!(post_plt3, θs_refined[l2:u2], posterior_dis_refined[l2:u2], seriestype=:path, fill=true, alpha=0.3, color=2, label="90% credible interval", legend=:topleft) + Plots.annotate!((0.7, maximum(posterior_dis_refined)/2, ("90 % HDI", 15, :red, :center, "courier"))) + +end + +# ╔═╡ 8f46fde2-c906-4d2f-804d-0ae83fb4c87f +md""" + +**A more refined approximation:** +We can have a more refined discretisation of the parameter space. For example, we can choose $$\theta \in [0, 0.01, 0.02, \ldots, 1.0],$$ a step size of ``0.01`` rather than 0.1. Check next chapter for a continuous posterior approach. The corresponding 90% HPDI is +``p(``$(θs_refined[l2]) ``\leq \theta \leq`` $(θs_refined[u2])``|\mathcal D)= 90\%.`` We still reach the same conclusion: the null hypothesis cannot be rejected. + +""" + +# ╔═╡ 8076bac8-6501-4792-8e8e-0f57e40cde4d +begin + begin + struct Foldable{C} + title::String + content::C + end + + function Base.show(io, mime::MIME"text/html", fld::Foldable) + write(io,"
$(fld.title)

") + show(io, mime, fld.content) + write(io,"

") + end + end +end + +# ╔═╡ ccd3bb12-02a9-4593-b53c-d7081c4e743f +Foldable("Details about the Gaussian based confidence interval.", md" +Based on central limit theory, we know all sample average, regardless of their population distribution, asymptotically converges to a Gaussian: i.e. + +$$\hat\theta \sim \mathcal N\left (\theta, \frac{\theta(1-\theta)}{N}\right ).$$ + +*Note that ``\hat\theta`` (the estimator rather than the parameter) is assumed a random variable here as it is a function of the data ``d_i``, which are assumed to be drawn from a Bernoulli distribution. Therefore, we can find ``\hat\theta``'s mean and variance.* + +And we apply the so called *plug-in principle*: replace all ``\theta`` in the sampling distribution with its estimator ``\hat\theta``. + +Note that better methods exist for the model. Ideally, the Gaussian-based confidence interval should only be used when ``N`` is large. We are only illustrating the idea of the frequentist's confidence interval here. +") + +# ╔═╡ db7f7652-c37d-4f3c-a7c6-0fc57112c3ba +Foldable("Why it is called normalising constant?*", md"It *normalises* the unnormalised posterior (the product of prior and likelihood) such that the posterior probability mass add to one: + +$$\sum_\theta p(\theta|\mathcal D) = \sum_\theta \frac{p(\theta) \cdot p(\mathcal D|\theta)}{p(\mathcal D)} = \sum_\theta \frac{p(\theta) \cdot p(\mathcal D|\theta)}{\sum_\theta p(\theta)\cdot p(\mathcal D|\theta)} = 1.$$") + +# ╔═╡ 00000000-0000-0000-0000-000000000001 +PLUTO_PROJECT_TOML_CONTENTS = """ +[deps] +Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" +LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" +PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd" + +[compat] +Distributions = "~0.25.66" +LaTeXStrings = "~1.3.0" +PlutoUI = "~0.7.39" +StatsPlots = "~0.14.34" +""" + +# ╔═╡ 00000000-0000-0000-0000-000000000002 +PLUTO_MANIFEST_TOML_CONTENTS = """ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.8.0" +manifest_format = "2.0" +project_hash = "1f21bd69bc5be33b7eb46b5234ff6dcf3d5a301d" + +[[deps.AbstractFFTs]] +deps = ["ChainRulesCore", "LinearAlgebra"] +git-tree-sha1 = "69f7020bd72f069c219b5e8c236c1fa90d2cb409" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.2.1" + +[[deps.AbstractPlutoDingetjes]] +deps = ["Pkg"] +git-tree-sha1 = "8eaf9f1b4921132a4cff3f36a1d9ba923b14a481" +uuid = "6e696c72-6542-2067-7265-42206c756150" +version = "1.1.4" + +[[deps.Adapt]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "af92965fb30777147966f58acb05da51c5616b5f" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "3.3.3" + +[[deps.ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" +version = "1.1.1" + +[[deps.Arpack]] +deps = ["Arpack_jll", "Libdl", "LinearAlgebra", "Logging"] +git-tree-sha1 = "91ca22c4b8437da89b030f08d71db55a379ce958" +uuid = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97" +version = "0.5.3" + +[[deps.Arpack_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "OpenBLAS_jll", "Pkg"] +git-tree-sha1 = "5ba6c757e8feccf03a1554dfaf3e26b3cfc7fd5e" +uuid = "68821587-b530-5797-8361-c406ea357684" +version = "3.5.1+1" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[deps.AxisAlgorithms]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"] +git-tree-sha1 = "66771c8d21c8ff5e3a93379480a2307ac36863f7" +uuid = "13072b0f-2c55-5437-9ae7-d433b7a33950" +version = "1.0.1" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[deps.Bzip2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2" +uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" +version = "1.0.8+0" + +[[deps.Cairo_jll]] +deps = ["Artifacts", "Bzip2_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "4b859a208b2397a7a623a03449e4636bdb17bcf2" +uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" +version = "1.16.1+1" + +[[deps.Calculus]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" +uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" +version = "0.5.1" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "2dd813e5f2f7eec2d1268c57cf2373d3ee91fcea" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.15.1" + +[[deps.ChangesOfVariables]] +deps = ["ChainRulesCore", "LinearAlgebra", "Test"] +git-tree-sha1 = "1e315e3f4b0b7ce40feded39c73049692126cf53" +uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" +version = "0.1.3" + +[[deps.Clustering]] +deps = ["Distances", "LinearAlgebra", "NearestNeighbors", "Printf", "SparseArrays", "Statistics", "StatsBase"] +git-tree-sha1 = "75479b7df4167267d75294d14b58244695beb2ac" +uuid = "aaaa29a8-35af-508c-8bc3-b662a17a0fe5" +version = "0.14.2" + +[[deps.ColorSchemes]] +deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "Random"] +git-tree-sha1 = "1fd869cc3875b57347f7027521f561cf46d1fcd8" +uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" +version = "3.19.0" + +[[deps.ColorTypes]] +deps = ["FixedPointNumbers", "Random"] +git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4" +uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" +version = "0.11.4" + +[[deps.ColorVectorSpace]] +deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "SpecialFunctions", "Statistics", "TensorCore"] +git-tree-sha1 = "d08c20eef1f2cbc6e60fd3612ac4340b89fea322" +uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" +version = "0.9.9" + +[[deps.Colors]] +deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] +git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40" +uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" +version = "0.12.8" + +[[deps.Compat]] +deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] +git-tree-sha1 = "9be8be1d8a6f44b96482c8af52238ea7987da3e3" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "3.45.0" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "0.5.2+0" + +[[deps.Contour]] +git-tree-sha1 = "a599cfb8b1909b0f97c5e1b923ab92e1c0406076" +uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" +version = "0.6.1" + +[[deps.DataAPI]] +git-tree-sha1 = "fb5f5316dd3fd4c5e7c30a24d50643b73e37cd40" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.10.0" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "d1fff3a548102f48987a52a2e0d114fa97d730f0" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.13" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.DataValues]] +deps = ["DataValueInterfaces", "Dates"] +git-tree-sha1 = "d88a19299eba280a6d062e135a43f00323ae70bf" +uuid = "e7dc6d0d-1eca-5fa6-8ad6-5aecde8b7ea5" +version = "0.4.13" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[deps.DelimitedFiles]] +deps = ["Mmap"] +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" + +[[deps.DensityInterface]] +deps = ["InverseFunctions", "Test"] +git-tree-sha1 = "80c3e8639e3353e5d2912fb3a1916b8455e2494b" +uuid = "b429d917-457f-4dbc-8f4c-0cc954292b1d" +version = "0.4.0" + +[[deps.Distances]] +deps = ["LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "3258d0659f812acde79e8a74b11f17ac06d0ca04" +uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" +version = "0.10.7" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[deps.Distributions]] +deps = ["ChainRulesCore", "DensityInterface", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"] +git-tree-sha1 = "aafa0665e3db0d3d0890cdc8191ea03dc279b042" +uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" +version = "0.25.66" + +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.8.6" + +[[deps.Downloads]] +deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +version = "1.6.0" + +[[deps.DualNumbers]] +deps = ["Calculus", "NaNMath", "SpecialFunctions"] +git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566" +uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74" +version = "0.6.8" + +[[deps.EarCut_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3f3a2501fa7236e9b911e0f7a588c657e822bb6d" +uuid = "5ae413db-bbd1-5e63-b57d-d24a61df00f5" +version = "2.2.3+0" + +[[deps.Expat_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "bad72f730e9e91c08d9427d5e8db95478a3c323d" +uuid = "2e619515-83b5-522b-bb60-26c02a35a201" +version = "2.4.8+0" + +[[deps.FFMPEG]] +deps = ["FFMPEG_jll"] +git-tree-sha1 = "b57e3acbe22f8484b4b5ff66a7499717fe1a9cc8" +uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" +version = "0.4.1" + +[[deps.FFMPEG_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "Pkg", "Zlib_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] +git-tree-sha1 = "d8a578692e3077ac998b50c0217dfd67f21d1e5f" +uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" +version = "4.4.0+0" + +[[deps.FFTW]] +deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] +git-tree-sha1 = "90630efff0894f8142308e334473eba54c433549" +uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" +version = "1.5.0" + +[[deps.FFTW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "c6033cc3892d0ef5bb9cd29b7f2f0331ea5184ea" +uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" +version = "3.3.10+0" + +[[deps.FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" + +[[deps.FillArrays]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"] +git-tree-sha1 = "246621d23d1f43e3b9c368bf3b72b2331a27c286" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "0.13.2" + +[[deps.FixedPointNumbers]] +deps = ["Statistics"] +git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc" +uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" +version = "0.8.4" + +[[deps.Fontconfig_jll]] +deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "21efd19106a55620a188615da6d3d06cd7f6ee03" +uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" +version = "2.13.93+0" + +[[deps.Formatting]] +deps = ["Printf"] +git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" +uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" +version = "0.4.2" + +[[deps.FreeType2_jll]] +deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "87eb71354d8ec1a96d4a7636bd57a7347dde3ef9" +uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" +version = "2.10.4+0" + +[[deps.FriBidi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "aa31987c2ba8704e23c6c8ba8a4f769d5d7e4f91" +uuid = "559328eb-81f9-559d-9380-de523a88c83c" +version = "1.0.10+0" + +[[deps.GLFW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll"] +git-tree-sha1 = "51d2dfe8e590fbd74e7a842cf6d13d8a2f45dc01" +uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" +version = "3.3.6+0" + +[[deps.GR]] +deps = ["Base64", "DelimitedFiles", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Pkg", "Printf", "Random", "RelocatableFolders", "Serialization", "Sockets", "Test", "UUIDs"] +git-tree-sha1 = "c98aea696662d09e215ef7cda5296024a9646c75" +uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" +version = "0.64.4" + +[[deps.GR_jll]] +deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Pkg", "Qt5Base_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "3a233eeeb2ca45842fe100e0413936834215abf5" +uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" +version = "0.64.4+0" + +[[deps.GeometryBasics]] +deps = ["EarCut_jll", "IterTools", "LinearAlgebra", "StaticArrays", "StructArrays", "Tables"] +git-tree-sha1 = "83ea630384a13fc4f002b77690bc0afeb4255ac9" +uuid = "5c1252a2-5f33-56bf-86c9-59e7332b4326" +version = "0.4.2" + +[[deps.Gettext_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "9b02998aba7bf074d14de89f9d37ca24a1a0b046" +uuid = "78b55507-aeef-58d4-861c-77aaff3498b1" +version = "0.21.0+0" + +[[deps.Glib_jll]] +deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "a32d672ac2c967f3deb8a81d828afc739c838a06" +uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" +version = "2.68.3+2" + +[[deps.Graphite2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "344bf40dcab1073aca04aa0df4fb092f920e4011" +uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" +version = "1.3.14+0" + +[[deps.Grisu]] +git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" +uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" +version = "1.0.2" + +[[deps.HTTP]] +deps = ["Base64", "Dates", "IniFile", "Logging", "MbedTLS", "NetworkOptions", "Sockets", "URIs"] +git-tree-sha1 = "0fa77022fe4b511826b39c894c90daf5fce3334a" +uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" +version = "0.9.17" + +[[deps.HarfBuzz_jll]] +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] +git-tree-sha1 = "129acf094d168394e80ee1dc4bc06ec835e510a3" +uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" +version = "2.8.1+1" + +[[deps.HypergeometricFunctions]] +deps = ["DualNumbers", "LinearAlgebra", "SpecialFunctions", "Test"] +git-tree-sha1 = "cb7099a0109939f16a4d3b572ba8396b1f6c7c31" +uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" +version = "0.3.10" + +[[deps.Hyperscript]] +deps = ["Test"] +git-tree-sha1 = "8d511d5b81240fc8e6802386302675bdf47737b9" +uuid = "47d2ed2b-36de-50cf-bf87-49c2cf4b8b91" +version = "0.0.4" + +[[deps.HypertextLiteral]] +deps = ["Tricks"] +git-tree-sha1 = "c47c5fa4c5308f27ccaac35504858d8914e102f9" +uuid = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2" +version = "0.9.4" + +[[deps.IOCapture]] +deps = ["Logging", "Random"] +git-tree-sha1 = "f7be53659ab06ddc986428d3a9dcc95f6fa6705a" +uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" +version = "0.2.2" + +[[deps.IniFile]] +git-tree-sha1 = "f550e6e32074c939295eb5ea6de31849ac2c9625" +uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f" +version = "0.5.1" + +[[deps.IntelOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "d979e54b71da82f3a65b62553da4fc3d18c9004c" +uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" +version = "2018.0.3+2" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[deps.Interpolations]] +deps = ["AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "Requires", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"] +git-tree-sha1 = "b7bc05649af456efc75d178846f47006c2c4c3c7" +uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" +version = "0.13.6" + +[[deps.InverseFunctions]] +deps = ["Test"] +git-tree-sha1 = "b3364212fb5d870f724876ffcd34dd8ec6d98918" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.7" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "7fd44fd4ff43fc60815f8e764c0f352b83c49151" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.1.1" + +[[deps.IterTools]] +git-tree-sha1 = "fa6287a4469f5e048d763df38279ee729fbd44e5" +uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" +version = "1.4.0" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLLWrappers]] +deps = ["Preferences"] +git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.4.1" + +[[deps.JSON]] +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "3c837543ddb02250ef42f4738347454f95079d4e" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.21.3" + +[[deps.JpegTurbo_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b53380851c6e6664204efb2e62cd24fa5c47e4ba" +uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" +version = "2.1.2+0" + +[[deps.KernelDensity]] +deps = ["Distributions", "DocStringExtensions", "FFTW", "Interpolations", "StatsBase"] +git-tree-sha1 = "591e8dc09ad18386189610acafb970032c519707" +uuid = "5ab0869b-81aa-558d-bb23-cbf5423bbe9b" +version = "0.6.3" + +[[deps.LAME_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "f6250b16881adf048549549fba48b1161acdac8c" +uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" +version = "3.100.1+0" + +[[deps.LERC_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" +uuid = "88015f11-f218-50d7-93a8-a6af411a945d" +version = "3.0.0+1" + +[[deps.LZO_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e5b909bcf985c5e2605737d2ce278ed791b89be6" +uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" +version = "2.10.1+0" + +[[deps.LaTeXStrings]] +git-tree-sha1 = "f2355693d6778a178ade15952b7ac47a4ff97996" +uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +version = "1.3.0" + +[[deps.Latexify]] +deps = ["Formatting", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "Printf", "Requires"] +git-tree-sha1 = "46a39b9c58749eefb5f2dc1178cb8fab5332b1ab" +uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" +version = "0.15.15" + +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" + +[[deps.LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" +version = "0.6.3" + +[[deps.LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" +version = "7.84.0+0" + +[[deps.LibGit2]] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[deps.LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" +version = "1.10.2+0" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[deps.Libffi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "0b4a5d71f3e5200a7dff793393e09dfc2d874290" +uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" +version = "3.2.2+1" + +[[deps.Libgcrypt_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"] +git-tree-sha1 = "64613c82a59c120435c067c2b809fc61cf5166ae" +uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" +version = "1.8.7+0" + +[[deps.Libglvnd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"] +git-tree-sha1 = "7739f837d6447403596a75d19ed01fd08d6f56bf" +uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" +version = "1.3.0+3" + +[[deps.Libgpg_error_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "c333716e46366857753e273ce6a69ee0945a6db9" +uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" +version = "1.42.0+0" + +[[deps.Libiconv_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "42b62845d70a619f063a7da093d995ec8e15e778" +uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" +version = "1.16.1+1" + +[[deps.Libmount_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "9c30530bf0effd46e15e0fdcf2b8636e78cbbd73" +uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" +version = "2.35.0+0" + +[[deps.Libtiff_jll]] +deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "Pkg", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "3eb79b0ca5764d4799c06699573fd8f533259713" +uuid = "89763e89-9b03-5906-acba-b20f662cd828" +version = "4.4.0+0" + +[[deps.Libuuid_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "7f3efec06033682db852f8b3bc3c1d2b0a0ab066" +uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" +version = "2.36.0+0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[deps.LogExpFunctions]] +deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "09e4b894ce6a976c354a69041a04748180d43637" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.15" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[deps.MKL_jll]] +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] +git-tree-sha1 = "e595b205efd49508358f7dc670a940c790204629" +uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" +version = "2022.0.0+0" + +[[deps.MacroTools]] +deps = ["Markdown", "Random"] +git-tree-sha1 = "3d3e902b31198a27340d0bf00d6ac452866021cf" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.9" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[deps.MbedTLS]] +deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "Random", "Sockets"] +git-tree-sha1 = "891d3b4e8f8415f53108b4918d0183e61e18015b" +uuid = "739be429-bea8-5141-9913-cc70e7f3736d" +version = "1.1.0" + +[[deps.MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +version = "2.28.0+0" + +[[deps.Measures]] +git-tree-sha1 = "e498ddeee6f9fdb4551ce855a46f54dbd900245f" +uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" +version = "0.3.1" + +[[deps.Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "bf210ce90b6c9eed32d25dbcae1ebc565df2687f" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "1.0.2" + +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[deps.MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" +version = "2022.2.1" + +[[deps.MultivariateStats]] +deps = ["Arpack", "LinearAlgebra", "SparseArrays", "Statistics", "StatsBase"] +git-tree-sha1 = "6d019f5a0465522bbfdd68ecfad7f86b535d6935" +uuid = "6f286f6a-111f-5878-ab1e-185364afe411" +version = "0.9.0" + +[[deps.NaNMath]] +git-tree-sha1 = "737a5957f387b17e74d4ad2f440eb330b39a62c5" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.0.0" + +[[deps.NearestNeighbors]] +deps = ["Distances", "StaticArrays"] +git-tree-sha1 = "0e353ed734b1747fc20cd4cba0edd9ac027eff6a" +uuid = "b8a86587-4115-5ab1-83bc-aa920d37bbce" +version = "0.4.11" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" +version = "1.2.0" + +[[deps.Observables]] +git-tree-sha1 = "dfd8d34871bc3ad08cd16026c1828e271d554db9" +uuid = "510215fc-4207-5dde-b226-833fc4488ee2" +version = "0.5.1" + +[[deps.OffsetArrays]] +deps = ["Adapt"] +git-tree-sha1 = "1ea784113a6aa054c5ebd95945fa5e52c2f378e7" +uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +version = "1.12.7" + +[[deps.Ogg_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "887579a3eb005446d514ab7aeac5d1d027658b8f" +uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" +version = "1.3.5+1" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.20+0" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+0" + +[[deps.OpenSSL_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "9a36165cf84cff35851809a40a928e1103702013" +uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" +version = "1.1.16+0" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.5+0" + +[[deps.Opus_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "51a08fb14ec28da2ec7a927c4337e4332c2a4720" +uuid = "91d4177d-7536-5919-b921-800302f37372" +version = "1.3.2+0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.4.1" + +[[deps.PCRE_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b2a7af664e098055a7529ad1a900ded962bca488" +uuid = "2f80f16e-611a-54ab-bc61-aa92de5b98fc" +version = "8.44.0+0" + +[[deps.PDMats]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "ca433b9e2f5ca3a0ce6702a032fce95a3b6e1e48" +uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" +version = "0.11.14" + +[[deps.Parsers]] +deps = ["Dates"] +git-tree-sha1 = "0044b23da09b5608b4ecacb4e5e6c6332f833a7e" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "2.3.2" + +[[deps.Pixman_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b4f5d02549a10e20780a24fce72bea96b6329e29" +uuid = "30392449-352a-5448-841d-b1acce4e97dc" +version = "0.40.1+0" + +[[deps.Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +version = "1.8.0" + +[[deps.PlotThemes]] +deps = ["PlotUtils", "Statistics"] +git-tree-sha1 = "8162b2f8547bc23876edd0c5181b27702ae58dce" +uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a" +version = "3.0.0" + +[[deps.PlotUtils]] +deps = ["ColorSchemes", "Colors", "Dates", "Printf", "Random", "Reexport", "Statistics"] +git-tree-sha1 = "9888e59493658e476d3073f1ce24348bdc086660" +uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" +version = "1.3.0" + +[[deps.Plots]] +deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "GeometryBasics", "JSON", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs", "UnicodeFun", "Unzip"] +git-tree-sha1 = "93e82cebd5b25eb33068570e3f63a86be16955be" +uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" +version = "1.31.1" + +[[deps.PlutoUI]] +deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "Markdown", "Random", "Reexport", "UUIDs"] +git-tree-sha1 = "8d1f54886b9037091edf146b517989fc4a09efec" +uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" +version = "0.7.39" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.3.0" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[deps.Qt5Base_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "xkbcommon_jll"] +git-tree-sha1 = "c6c0f690d0cc7caddb74cef7aa847b824a16b256" +uuid = "ea2cea3b-5b76-57ae-a6ef-0a8af62496e1" +version = "5.15.3+1" + +[[deps.QuadGK]] +deps = ["DataStructures", "LinearAlgebra"] +git-tree-sha1 = "78aadffb3efd2155af139781b8a8df1ef279ea39" +uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" +version = "2.4.2" + +[[deps.REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[deps.Random]] +deps = ["SHA", "Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[deps.Ratios]] +deps = ["Requires"] +git-tree-sha1 = "dc84268fe0e3335a62e315a3a7cf2afa7178a734" +uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439" +version = "0.4.3" + +[[deps.RecipesBase]] +git-tree-sha1 = "6bf3f380ff52ce0832ddd3a2a7b9538ed1bcca7d" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.2.1" + +[[deps.RecipesPipeline]] +deps = ["Dates", "NaNMath", "PlotUtils", "RecipesBase"] +git-tree-sha1 = "dc1e451e15d90347a7decc4221842a022b011714" +uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" +version = "0.5.2" + +[[deps.Reexport]] +git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.2.2" + +[[deps.RelocatableFolders]] +deps = ["SHA", "Scratch"] +git-tree-sha1 = "cdbd3b1338c72ce29d9584fdbe9e9b70eeb5adca" +uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" +version = "0.1.3" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.0" + +[[deps.Rmath]] +deps = ["Random", "Rmath_jll"] +git-tree-sha1 = "bf3188feca147ce108c76ad82c2792c57abe7b1f" +uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" +version = "0.7.0" + +[[deps.Rmath_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "68db32dff12bb6127bac73c209881191bf0efbb7" +uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" +version = "0.3.0+0" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.Scratch]] +deps = ["Dates"] +git-tree-sha1 = "0b4b7f1393cff97c33891da2a0bf69c6ed241fda" +uuid = "6c6a2e73-6563-6170-7368-637461726353" +version = "1.1.0" + +[[deps.SentinelArrays]] +deps = ["Dates", "Random"] +git-tree-sha1 = "db8481cf5d6278a121184809e9eb1628943c7704" +uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" +version = "1.3.13" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[deps.SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[deps.Showoff]] +deps = ["Dates", "Grisu"] +git-tree-sha1 = "91eddf657aca81df9ae6ceb20b959ae5653ad1de" +uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f" +version = "1.0.3" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[deps.SortingAlgorithms]] +deps = ["DataStructures"] +git-tree-sha1 = "b3363d7460f7d098ca0912c69b082f75625d7508" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "1.0.1" + +[[deps.SparseArrays]] +deps = ["LinearAlgebra", "Random"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + +[[deps.SpecialFunctions]] +deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "d75bda01f8c31ebb72df80a46c88b25d1c79c56d" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.1.7" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "Random", "StaticArraysCore", "Statistics"] +git-tree-sha1 = "9f8a5dc5944dc7fbbe6eb4180660935653b0a9d9" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.5.0" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "66fe9eb253f910fe8cf161953880cfdaef01cdf0" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.0.1" + +[[deps.Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.StatsAPI]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "2c11d7290036fe7aac9038ff312d3b3a2a5bf89e" +uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +version = "1.4.0" + +[[deps.StatsBase]] +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "48598584bacbebf7d30e20880438ed1d24b7c7d6" +uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +version = "0.33.18" + +[[deps.StatsFuns]] +deps = ["ChainRulesCore", "HypergeometricFunctions", "InverseFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] +git-tree-sha1 = "5783b877201a82fc0014cbf381e7e6eb130473a4" +uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" +version = "1.0.1" + +[[deps.StatsPlots]] +deps = ["AbstractFFTs", "Clustering", "DataStructures", "DataValues", "Distributions", "Interpolations", "KernelDensity", "LinearAlgebra", "MultivariateStats", "Observables", "Plots", "RecipesBase", "RecipesPipeline", "Reexport", "StatsBase", "TableOperations", "Tables", "Widgets"] +git-tree-sha1 = "43a316e07ae612c461fd874740aeef396c60f5f8" +uuid = "f3b207a7-027a-5e70-b257-86293d7955fd" +version = "0.14.34" + +[[deps.StructArrays]] +deps = ["Adapt", "DataAPI", "StaticArrays", "Tables"] +git-tree-sha1 = "ec47fb6069c57f1cee2f67541bf8f23415146de7" +uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +version = "0.6.11" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.0" + +[[deps.TableOperations]] +deps = ["SentinelArrays", "Tables", "Test"] +git-tree-sha1 = "e383c87cf2a1dc41fa30c093b2a19877c83e1bc1" +uuid = "ab02a1b2-a7df-11e8-156e-fb1833f50b87" +version = "1.2.0" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits", "Test"] +git-tree-sha1 = "5ce79ce186cc678bbb5c5681ca3379d1ddae11a1" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.7.0" + +[[deps.Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" +version = "1.10.0" + +[[deps.TensorCore]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" +uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" +version = "0.1.1" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.Tricks]] +git-tree-sha1 = "6bac775f2d42a611cdfcd1fb217ee719630c4175" +uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" +version = "0.1.6" + +[[deps.URIs]] +git-tree-sha1 = "97bbe755a53fe859669cd907f2d96aee8d2c1355" +uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" +version = "1.3.0" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[deps.UnicodeFun]] +deps = ["REPL"] +git-tree-sha1 = "53915e50200959667e78a92a418594b428dffddf" +uuid = "1cfade01-22cf-5700-b092-accc4b62d6e1" +version = "0.4.1" + +[[deps.Unzip]] +git-tree-sha1 = "34db80951901073501137bdbc3d5a8e7bbd06670" +uuid = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" +version = "0.1.2" + +[[deps.Wayland_jll]] +deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "3e61f0b86f90dacb0bc0e73a0c5a83f6a8636e23" +uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" +version = "1.19.0+0" + +[[deps.Wayland_protocols_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4528479aa01ee1b3b4cd0e6faef0e04cf16466da" +uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91" +version = "1.25.0+0" + +[[deps.Widgets]] +deps = ["Colors", "Dates", "Observables", "OrderedCollections"] +git-tree-sha1 = "fcdae142c1cfc7d89de2d11e08721d0f2f86c98a" +uuid = "cc8bc4a8-27d6-5769-a93b-9d913e69aa62" +version = "0.6.6" + +[[deps.WoodburyMatrices]] +deps = ["LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "de67fa59e33ad156a590055375a30b23c40299d3" +uuid = "efce3f68-66dc-5838-9240-27a6d6f5f9b6" +version = "0.5.5" + +[[deps.XML2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "58443b63fb7e465a8a7210828c91c08b92132dff" +uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" +version = "2.9.14+0" + +[[deps.XSLT_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"] +git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" +uuid = "aed1982a-8fda-507f-9586-7b0439959a61" +version = "1.1.34+0" + +[[deps.Xorg_libX11_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] +git-tree-sha1 = "5be649d550f3f4b95308bf0183b82e2582876527" +uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" +version = "1.6.9+4" + +[[deps.Xorg_libXau_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4e490d5c960c314f33885790ed410ff3a94ce67e" +uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" +version = "1.0.9+4" + +[[deps.Xorg_libXcursor_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "12e0eb3bc634fa2080c1c37fccf56f7c22989afd" +uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" +version = "1.2.0+4" + +[[deps.Xorg_libXdmcp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4fe47bd2247248125c428978740e18a681372dd4" +uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" +version = "1.1.3+4" + +[[deps.Xorg_libXext_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "b7c0aa8c376b31e4852b360222848637f481f8c3" +uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" +version = "1.3.4+4" + +[[deps.Xorg_libXfixes_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "0e0dc7431e7a0587559f9294aeec269471c991a4" +uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" +version = "5.0.3+4" + +[[deps.Xorg_libXi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] +git-tree-sha1 = "89b52bc2160aadc84d707093930ef0bffa641246" +uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" +version = "1.7.10+4" + +[[deps.Xorg_libXinerama_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll"] +git-tree-sha1 = "26be8b1c342929259317d8b9f7b53bf2bb73b123" +uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" +version = "1.1.4+4" + +[[deps.Xorg_libXrandr_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "34cea83cb726fb58f325887bf0612c6b3fb17631" +uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" +version = "1.5.2+4" + +[[deps.Xorg_libXrender_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "19560f30fd49f4d4efbe7002a1037f8c43d43b96" +uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" +version = "0.9.10+4" + +[[deps.Xorg_libpthread_stubs_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "6783737e45d3c59a4a4c4091f5f88cdcf0908cbb" +uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" +version = "0.1.0+3" + +[[deps.Xorg_libxcb_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] +git-tree-sha1 = "daf17f441228e7a3833846cd048892861cff16d6" +uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" +version = "1.13.0+3" + +[[deps.Xorg_libxkbfile_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "926af861744212db0eb001d9e40b5d16292080b2" +uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" +version = "1.1.0+4" + +[[deps.Xorg_xcb_util_image_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "0fab0a40349ba1cba2c1da699243396ff8e94b97" +uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll"] +git-tree-sha1 = "e7fd7b2881fa2eaa72717420894d3938177862d1" +uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_keysyms_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "d1151e2c45a544f32441a567d1690e701ec89b00" +uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_renderutil_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "dfd7a8f38d4613b6a575253b3174dd991ca6183e" +uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e" +version = "0.3.9+1" + +[[deps.Xorg_xcb_util_wm_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "e78d10aab01a4a154142c5006ed44fd9e8e31b67" +uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361" +version = "0.4.1+1" + +[[deps.Xorg_xkbcomp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxkbfile_jll"] +git-tree-sha1 = "4bcbf660f6c2e714f87e960a171b119d06ee163b" +uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" +version = "1.4.2+4" + +[[deps.Xorg_xkeyboard_config_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xkbcomp_jll"] +git-tree-sha1 = "5c8424f8a67c3f2209646d4425f3d415fee5931d" +uuid = "33bec58e-1273-512f-9401-5d533626f822" +version = "2.27.0+4" + +[[deps.Xorg_xtrans_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "79c31e7844f6ecf779705fbc12146eb190b7d845" +uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" +version = "1.4.0+3" + +[[deps.Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.12+3" + +[[deps.Zstd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e45044cd873ded54b6a5bac0eb5c971392cf1927" +uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" +version = "1.5.2+0" + +[[deps.libass_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "5982a94fcba20f02f42ace44b9894ee2b140fe47" +uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" +version = "0.15.1+0" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.1.1+0" + +[[deps.libfdk_aac_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "daacc84a041563f965be61859a36e17c4e4fcd55" +uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" +version = "2.0.2+0" + +[[deps.libpng_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "94d180a6d2b5e55e447e2d27a29ed04fe79eb30c" +uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" +version = "1.6.38+0" + +[[deps.libvorbis_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll", "Pkg"] +git-tree-sha1 = "b910cb81ef3fe6e78bf6acee440bda86fd6ae00c" +uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" +version = "1.3.7+1" + +[[deps.nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" +version = "1.48.0+0" + +[[deps.p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "17.4.0+0" + +[[deps.x264_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4fea590b89e6ec504593146bf8b988b2c00922b2" +uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a" +version = "2021.5.5+0" + +[[deps.x265_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "ee567a171cce03570d77ad3a43e90218e38937a9" +uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" +version = "3.5.0+0" + +[[deps.xkbcommon_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll", "Wayland_protocols_jll", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] +git-tree-sha1 = "ece2350174195bb31de1a63bea3a41ae1aa593b6" +uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" +version = "0.9.1+5" +""" + +# ╔═╡ Cell order: +# ╟─af174ba8-fd36-11ec-10a6-a3506bbed95f +# ╠═078e8979-6753-411f-9c34-ba0164ea9cb2 +# ╟─b2ad130c-5d40-4a4b-adbe-5880984a9460 +# ╟─97d325ca-2c41-42b4-82b8-f74659e61dc3 +# ╟─300929c0-3279-47ef-b165-0e936b757679 +# ╟─41e15a4f-8ddc-47f9-8286-bf583b7d748a +# ╟─c91937d3-1a46-4dc2-9d0d-f6fda482ea36 +# ╟─6f57947d-0ecb-4e9c-b8c7-6ca8de2630d8 +# ╟─41bd090a-ed31-4ebc-ad57-0785323378d4 +# ╟─dc551c95-cae5-4459-bdcd-d98aecb8b5e5 +# ╟─07e16486-c07c-450c-8de3-8c088c80816a +# ╟─fcb0fab4-d2f7-411f-85f6-0db536f8ee5a +# ╟─481044fe-07ea-4118-83d8-e9f287406d10 +# ╟─198e2787-4901-4478-a092-a84410ad2dd5 +# ╟─14710249-9dc1-4a75-b0b3-25ac565452a5 +# ╟─bd85c6ef-8623-4e06-8f7e-1e30927b25b7 +# ╟─be2a2acd-5633-45cc-ab8c-8a064324b287 +# ╟─32c1a567-0b61-4927-81fc-f66773ed3e05 +# ╟─ff41d114-0bd4-41ea-9c22-b6af52b3fa21 +# ╟─ccd3bb12-02a9-4593-b53c-d7081c4e743f +# ╟─278d302f-6b81-4b00-bdd2-55057417809e +# ╟─b113a7ce-7e00-4df3-b1a4-4cf7af005aaf +# ╟─1c64b953-5a3d-4a80-b523-8b8f213f6849 +# ╟─8332304c-2264-46df-baf1-0a1070927152 +# ╟─65b17042-1e16-4097-86c9-83c516de803d +# ╟─b42dc5e4-143e-4469-be7f-7b1f73ca9064 +# ╟─c8c99b5a-1bd2-4762-beb2-518e0e8c9aa3 +# ╟─94ae916e-49fb-4426-b261-57b39599a4e7 +# ╟─65ef62da-f095-4bb2-aa0f-120827bed6e0 +# ╟─db7f7652-c37d-4f3c-a7c6-0fc57112c3ba +# ╟─785bdafd-4bfc-441b-bd79-f1bbced4efb9 +# ╟─009a824f-c26d-43e9-bb6d-fd538a19863b +# ╟─d31477e0-35b0-4968-bfbf-aefa727f3a41 +# ╟─ccc239c6-327f-4905-9040-4a7b4a51e6e1 +# ╟─dcc5758e-b1da-48c6-a9cf-5f906fcf76a9 +# ╟─8f46fde2-c906-4d2f-804d-0ae83fb4c87f +# ╟─633ad986-dc19-4994-b04e-4ec34432dbf2 +# ╟─954ea5d8-ba25-44b9-ac7b-7d3e683cc8e0 +# ╟─bc4d9710-7e6c-4bc9-905b-7b3c0c8e9abe +# ╟─66159a91-6a82-4a52-b3fb-9749bb66d4e2 +# ╟─6a49bd7b-1211-4480-83a3-ca87e26f9b97 +# ╠═5db12a02-7c7c-47f3-8bea-24e4b5d67cae +# ╟─8076bac8-6501-4792-8e8e-0f57e40cde4d +# ╟─00000000-0000-0000-0000-000000000001 +# ╟─00000000-0000-0000-0000-000000000002 diff --git a/section2_modelling.jl b/section2_modelling.jl new file mode 100644 index 0000000..25869c1 --- /dev/null +++ b/section2_modelling.jl @@ -0,0 +1,2507 @@ +### A Pluto.jl notebook ### +# v0.19.11 + +using Markdown +using InteractiveUtils + +# ╔═╡ 69b19a54-1c79-11ed-2a22-ebe65ccbfcdb +begin + using PlutoUI + using Distributions + using StatsPlots + using Random + using LaTeXStrings + using SpecialFunctions + using Logging; Logging.disable_logging(Logging.Warn); +end; + +# ╔═╡ 904c5f8d-e5a9-4f18-a7d7-b4561ad37655 +TableOfContents() + +# ╔═╡ 5b4c3b01-bd19-4085-8a83-781086c85825 +md""" + + +## Prior choice +""" + +# ╔═╡ 0c123e4e-e0ff-4c47-89d6-fdf514f9e9d0 +md""" +As part of the Bayesian modelling, we need to choose suitable priors for the unknown variables. In this section, we are going to introduce some important concepts about the prior specification. + + +### Priors with matching support +**First and foremost**, when choosing priors for the unknowns, the modeller needs to make sure the prior distribution has the correct *support* of the unknown parameters. + +*Example* For the coin-flipping example, the unknown bias ``\theta`` has a support: ``\theta \in [0,1].`` Therefore, a standard Gaussian distribution is not suitable: as a Gaussian sample can take any value on the real line (so not within the correct range between 0 and 1). A suitable choice for the bias ``\theta`` can be e.g. Uniform distribution between 0 and 1, truncated Gaussian (truncated between 0 and 1) or Beta distribution. The probability density functions are listed below together with their plots. + +```math + +\begin{align} +p(\theta) &= \texttt{TruncNormal}(\mu, \sigma^2) \propto \begin{cases} \mathcal N(\mu, \sigma^2) & {0\leq \theta \leq 1} \\ 0 & \text{otherwise} \end{cases} \\ +p(\theta) &= \texttt{Uniform}(0,1) = \begin{cases} 1 & {0\leq \theta \leq 1} \\ 0 & \text{otherwise} \end{cases} + +\end{align} +``` + +""" + +# ╔═╡ f479a1f3-a008-4622-82f0-ab154a431a33 +let + σ = sqrt(0.1) + Plots.plot(TruncatedNormal(0.5, σ, 0., 1), lw=2, label=L"\texttt{TrunNormal}" *"(0.5, $(round((σ^2);digits=2)))", legend=:outerright, xlabel=L"\theta", ylabel=L"p(\theta)", title="Priors for "*L"θ\in [0,1]") + Plots.plot!(TruncatedNormal(0.25, σ, 0., 1), lw=2, label=L"\texttt{TrunNormal}"*"(0.25, $(round((σ^2);digits=2))))") + Plots.plot!(TruncatedNormal(0.75, σ, 0., 1), lw=2, label=L"\texttt{TrunNormal}"*"(0.75, $(round((σ^2);digits=2))))") + Plots.plot!(Uniform(0,1), lw=2, label=L"\texttt{Uniform}(0, 1)") +end + +# ╔═╡ 2dfafb7b-773a-4c51-92e7-1f192fa354ea +md""" +*Example.* A Gaussian distribution's variance ``\sigma^2`` is a positive number: ``\sigma^2 >0``. Priors on the positive real line are e.g. Exponential distribution, or Half-Cauchy. + +""" + +# ╔═╡ e574a570-a76b-4ab2-a395-ca40dc383e5e +let + Plots.plot(0:0.1:10, Exponential(1),lw=2, label=L"\texttt{Exponential}(1.0)", legend=:best, xlabel=L"\theta", ylabel=L"p(\theta)", title="Priors for "*L"σ^2\in (0,∞)") + Plots.plot!(0:0.1:10, Exponential(2),lw=2, label=L"\texttt{Exponential}(2.0)") + Plots.plot!(0:0.1:10, Exponential(5), lw=2, label=L"\texttt{Exponential}(5.0)") + Plots.plot!(0:0.1:10, truncated(Cauchy(0, 1), lower= 0), lw=2, label=L"\texttt{HalfCauchy}(0, 1)") + # Plots.plot!(0:0.1:10, truncated(Cauchy(0, 2), lower= 0), label="HalfCauchy(0, 2)") + # Plots.plot!(0:0.1:10, truncated(Cauchy(0, 5), lower= 0), label="HalfCauchy(0, 5)") +end + +# ╔═╡ 9bb06170-34d0-4528-bd9b-988ecf952089 +md""" + +### Conjugate prior + +Conjugate prior is a class of prior distributions such that the posterior distribution is of the same distribution form. When conjugacy holds, Bayesian computation becomes very simple: one only needs to update the prior's parameters to find the posterior. Unfortunately, conjugate priors only exist in some very simple Bayesian models. And for most real-world applications, no such conjugate priors can be found. Nevertheless, conjugate models provide us with some insights into the role of prior in Bayesian computation. + +It is easier to study the concept by seeing a few concrete examples. + +#### Example: Beta-Bernoulli model +For the coin flipping example, the conjugate prior is + +```math +p(\theta) = \texttt{Beta}(\theta; a_0, b_0) = \frac{1}{\text{B}(a_0, b_0)} \theta^{a_0-1}(1-\theta)^{b_0-1}, +``` +where ``a_0,b_0 >0`` are the prior's parameter and ``B(a_0,b_0)``, the beta function, is a normalising constant for the Beta distribution: i.e. ``\mathrm{B}(a_0, b_0) = \int \theta^{a_0-1}(1-\theta)^{b_0-1}\mathrm{d}\theta``. + + +*Remarks. +A few Beta distributions with different parameterisations are plotted below. Note that when ``a_0=b_0=1``, the prior reduces to a uniform distribution. Also note that when ``a_0> b_0``, e.g. ``\texttt{Beta}(5,2)``, the prior belief has its peak, or mode, greather 0.5, which implies the prior believe the coin is biased towards the head; and vice versa.* + + +""" + +# ╔═╡ 13cb967f-879e-49c2-b077-e9ac87569d87 +let + plot(Beta(1,1), xlims=[0,1], ylim=[0,3], label=L"\texttt{Beta}(a_0=1,b_0=1)", linewidth=2, legend=:outerright, size=(600,300)) + plot!(Beta(0.5,0.5), xlims=[0,1], ylim=[0,3], label=L"\texttt{Beta}(a_0=.5,b_0=.5)", linewidth=2) + plot!(Beta(5,5), xlims=[0,1], ylim=[0,3], label=L"\texttt{Beta}(a_0=2,b_0=2)", linewidth=2) + plot!(Beta(5,2), xlims=[0,1], ylim=[0,3], label=L"\texttt{Beta}(a_0=5,b_0=2)", linewidth=2) + plot!(Beta(2,5), xlims=[0,1], ylim=[0,3], label=L"\texttt{Beta}(a_0=2,b_0=5)", linewidth=2) +end + +# ╔═╡ 0437436b-16b9-4c90-b554-f7cf5ea8b4c0 +md""" + +Apply Baye's rule, we can find the posterior is still of a Beta form (therefore the conjugacy holds): + +```math +p(\theta|\mathcal D) = \texttt{Beta}(\theta; a_N, b_N) = \frac{1}{\text{B}(a_N, b_N)} \theta^{a_N-1}(1-\theta)^{b_N-1}, +``` + +where ``a_N= a_0 + N_h`` and ``b_N = b_0 + N - N_h``; and ``N_h = \sum_i d_i`` is the total number of heads observed in the ``N`` tosses. + + +""" + +# ╔═╡ 3c5b6566-6e4e-41df-9865-fff8a839a70e +md""" +For our example, we have observed ``N_h = 7`` number of heads in the 10 tosses. Therefore, if we choose a prior of +``p(\theta)= \texttt{Beta}(1, 1),`` +The updated posterior is + +$$p(\theta|\mathcal D)= \texttt{Beta}(1+7, 1+3).$$ + +The prior and posterior distributions are plotted below. The posterior now peaks at 0.7 which is in agreement with the observed data. Also note the uncertainty (spread of the density) around the peak. + +""" + +# ╔═╡ f10d3513-77ee-426a-aa5c-d2bf887572d9 +let + nh, nt = 7, 3 + plot(Beta(1,1), xlims=[0,1], label=L"p(\theta)= \texttt{Beta}(1,1)", linewidth=1, xlabel=L"\theta", ylabel="density" ,fill= true, lw=2, alpha=0.2, legend=:outerright, color=1, title="Conjugate posterior update") + vline!([mean(Beta(1,1))], label="prior mean", lw=2, lc=1, ls=:dash) + plot!(Beta(1+nh,1+nt), xlims=[0,1], fill= true, lw=2, alpha=0.2, color=2, label=L"p(\theta|\mathcal{D})= \texttt{Beta}(8,4)", linewidth=2) + vline!([mean(Beta(1+nh,1+nt))], label="posterior mean", lw=2, lc=2, ls=:dash) +end + +# ╔═╡ 8c6233e0-14fb-4202-92b9-3eddaea3e107 +md""" +**Interpretation of the prior parameters.** +Conjugate priors usually lead to very convenient posterior computation. For the coin-flipping example, we only need to update the prior's parameters with the count of heads and tails respectively: + +$$a_N= a_0+ N_h\;\; b_N= b_0+N_t.$$ If we choose a truncated Gaussian prior, then the posterior distribution is much harder to compute. For more general prior choices, we need to resort to advanced methods like Markov Chain Monte Carlo (MCMC). + + +The updated parameters ``a_N`` ``b_N`` are the posterior counts of the heads and tails. And they together determine the shape of the posterior (check the plot above). For our case, the posterior peaks at ``0.7`` which is in agreement with the oberved data. And the posterior mean is ``\frac{8}{8+4} \approx 0.67``. + +As a result, we can interpret the prior parameters ``a_0, b_0`` as some pseudo observations contained in the prior distribution. For example, ``a_0=b_0=1`` implies the prior contains one pseudo count of head and tail each (therefore, the prior is flat). + + +""" + +# ╔═╡ 7fd2a003-bed6-45d4-8335-f8d4f149c8d8 +md""" + +*Remark. One benefit of Bayesian inference arises when we have observed little data. Assume we have only tossed the coin twice and observed two heads: i.e. ``N_h=2, N_t=0``. Frequentist's estimation of the bias will be ``\hat{\theta}=\frac{N_h}{N_h+N_t}=0``, the observed frequency. This is clearly an over-confident conclusion (a.k.a. over-fitting). After all, we have only observed two data points. On the other hand, the Bayesian estimation will make better sense. The posterior is ``p(\theta|N_h=2, N_t=0) = \texttt{Beta}(3, 1),`` which is plotted below. The posterior peaks at 1.0 but there is a great amount of uncertainty about the bias, which leads to a posterior mean ``E[\theta|\mathcal D] =\frac{3}{3+1} = 0.75``. One should expect 0.75 (a.k.a. a maximum a posteriori estimator) makes better sense here. However, as stated before, a true Bayesian answer is to report the posterior distribution as an answer.* + + +$(begin +plot(Beta(1,1), label=L"p(\theta)", fill=true, alpha=0.3, xlabel=L"\theta", ylabel=L"p(\theta|\mathcal{D})", legend=:outerright) +plot!(Beta(3,1), label=L"p(\theta|N_h=2, N_t=0)", xlabel=L"\theta", ylabel=L"p(\theta|\mathcal{D})", legend=:outerright, fill=true, alpha=0.3, lw=2, title="Bayesian inference with little data") +vline!([mean(Beta(3,1))], ylim = [0,3],label="posterior mean", lw=2, lc=2, ls=:dash) +end) + +""" + +# ╔═╡ f5dfcd1f-9d10-49d1-b68b-eafdf10baaec +begin + # simulate 200 tosses of a fair coin + N_tosses = 200 + true_θ = 0.5 + Random.seed!(100) + coin_flipping_data = rand(N_tosses) .< true_θ + Nh = sum(coin_flipping_data) + Nt = N_tosses- Nh +end; + +# ╔═╡ 754c5fe2-3899-4467-8fd4-828fb0ec5040 +md""" +**Sequential update.** The conjugacy also provides us a computational cheap way to sequentially update the posterior. Due to the independence assumption, we do not need to calculate the posterior in one go, but update the posterior incrementally as data arrives. + +```math +\begin{align} +p(\theta|\{d_1, d_2, \ldots, d_N\})&\propto p(\theta) \prod_{n=1}^N p(d_n|\theta) p(d_N|\theta)\\ +&= \underbrace{p(\theta) \prod_{n=1}^{N-1} p(d_n|\theta)}_{p(\theta|\mathcal D_{N-1})}\cdot p(d_N|\theta)\\ +&= \underbrace{p(\theta|\mathcal D_{N-1})}_{\text{new prior}} p(d_N|\theta). +\end{align} +``` +Suppose we have observed ``N-1`` coin tosses, and the posterior so far is ``p(\theta|\mathcal D_{N-1})``. The posterior now serves as a *new prior* to update the next observation ``d_N``. It can be shown that the final posterior sequentially updated this way is the same as the off-line posterior. + +To be more specific, the sequential update algorithm is: + +Initialise with a prior ``p(\theta|\emptyset)= \texttt{Beta}(a_0, b_0)`` + +For ``n = 1,2,\ldots, N``: +* update + +$$a_n = a_{n-1} + \mathbf{1}(d_n=\texttt{head}), \;\; b_n = b_{n-1} + \mathbf{1}(d_n=\texttt{tail})$$ +* report the posterior at ``n`` if needed + +Note that the function ``\mathbf{1}(\cdot)`` returns 1 if the test result of the argument is true and 0 otherwise. + + +*Demonstration.* An animation that demonstrates the sequential update idea is listed below. $(N_tosses) tosses of a fair coin are first simulated to be used for the demonstration. +""" + +# ╔═╡ 2ba73fd3-ae2b-4347-863f-28e6c21e7a91 +md""" +We apply the sequantial learning algorithm on the simulated data. The posterior update starts from a vague flat prior. As more data is observed and absorbed into the posterior, the posterior distribution is more and more informative and finally recovers the final posterior. +""" + +# ╔═╡ 56e80a69-6f84-498d-b04e-5be59c1488eb +let + a₀, b₀ = 1, 1 + prior_θ = Beta(a₀, b₀) + plot(prior_θ, xlim = [0, 1], lw=2, fill=(0, 0.1), label="Prior "* L"p(\theta)", xlabel=L"\theta", ylabel="density", title="Sequential update N=0", legend=:topleft) + plot!(Beta(a₀ + Nh, b₀+ Nt), lw=2, fill=(0, 0.1), label="Posterior "* L"p(\theta|\mathcal{D})") + vline!([true_θ], label="true "*L"θ", lw=4, lc=3) + an = a₀ + bn = b₀ + anim=@animate for n in 1:N_tosses + # if the toss is head, update an + if coin_flipping_data[n] + an += 1 + # otherwise + else + bn += 1 + end + poster_n = Beta(an, bn) + # plot every 5-th frame + if (n % 5) == 0 + plot!(poster_n, lw=1, label="", title="Sequential update with observation N=$(n)") + end + end + gif(anim, fps=15) +end + +# ╔═╡ 65f0dc31-c2bd-464f-983a-9f4ca2c04a35 +md""" + +#### Examples: Gamma-Gaussian model + +> Assume we have made ``N`` independent samples from a Gaussian distribution with known ``\mu`` but unknown variance ``\sigma^2>0``. What is the observation variance ``\sigma^2`` ? + +It is more convenient to model the precision ``\lambda\triangleq 1/\sigma^2``. A conjugate prior for the precision parameter is Gamma distribution. Gamma distributions have support on the positive real line which matches the precision's value range. + +A Gamma distribution, parameterised with a shape ``a_0>0``, and a rate parameter ``b_0>0``, has a probability density function: + +```math +p(\lambda; a_0, b_0) = \texttt{Gamma}(\lambda; a_0, b_0)=\frac{b_0^{a_0}}{\Gamma(b_0)} \lambda^{a_0-1} e^{-b_0\lambda}. +``` +""" + +# ╔═╡ d2c3bd6d-fb8c-41df-8112-c7bfbc180b0a +let + as_ = [1,2,3,5,9,7.5,0.5] + bs_ = [1/2, 1/2, 1/2, 1, 1/0.5, 1, 1] + plt= plot(xlim =[0,20], ylim = [0, 0.8], xlabel=L"λ", ylabel="density") + for i in 1:length(as_) + plot!(Gamma(as_[i], 1/bs_[i]), fill=(0, .1), lw=1.5, label=L"\texttt{Gamma}"*"($(as_[i]),$(bs_[i]))") + end + plt +end + +# ╔═╡ 76c641dd-c790-4f51-abc0-e157c00e3ba7 +md""" + +**Conjugacy.** The data follow a Gaussian distribution. That is for ``n = 1,2,\ldots, N``: +```math +d_n \sim \mathcal N(\mu, 1/\lambda); +``` +The likelihood therefore is a product of Gaussian likelihoods: + + +```math +p(\mathcal D|\mu, \lambda) = \prod_{n=1}^N p(d_n|\mu, \lambda) = \prod_{n=1}^N \mathcal N(d_n; \mu, 1/\lambda) . +``` + +It can be shown that the posterior formed according to Baye's rule + +```math + +p(\lambda|\mathcal D, \mu) \propto p(\lambda) p(\mathcal D|\mu, \lambda) + +``` + + + +is still of a Gamma form (therefore conjugacy is established): + +```math +p(\lambda|\mathcal D, \mu) = \texttt{Gamma}(a_N, b_N), +``` + +where + +$$a_n= a_0 +\frac{N}{2}, \;\;b_N = b_0 + \frac{\sum_{n} (d_n- \mu)^2}{2}.$$ + +The Bayesian computation reduces to hyperparameter update again. Note the posterior mean (standard result of a Gamma distribution) is + +$$\mathbb{E}[\lambda|\mathcal D] = \frac{a_N}{b_N} = \frac{a_0 + N/2}{b_0 + {\sum_n (d_n -\mu)^2}/{2}}.$$ + +If we assume ``a_0= b_0=0`` (a flat prior), we recover the regular maximum likelihood estimator for ``{\sigma^2}``: + +$$\hat \sigma^2 =1/\hat{\lambda} = \frac{\sum_n (d_n-\mu)^2}{N}.$$ + +Based on the above result, we can intuitively interpret the hyperparameters as +* ``a_N`` : the total count of observations contained in the posterior (both pseudo ``a_0`` and real observation ``N/2``) ; +* ``b_N`` : the rate parameter is the total sum of squares; + + +""" + +# ╔═╡ edbf5fa3-a064-47a4-9ff4-a93dbd7b9112 +md""" +**Demonstration:** We first simulate ``N=100`` Gaussian observations with unknown ``\mu=0`` and ``\lambda= 1/\sigma^2 = 2``. + +""" + +# ╔═╡ 958d6028-e38f-4a56-a606-47b6f8ee86f1 +begin + σ² = 0.5 + true_λ = 1/σ² + N = 100 + Random.seed!(100) + # Gaussian's density in Distributions.jl is implemented with standard deviation σ rather than σ² + gaussian_data = rand(Normal(0, sqrt(σ²)), N) + plot(Normal(0, sqrt(σ²)), xlabel=L"d", ylabel="density", label=L"\mathcal{N}(0, 1/2)", title="Simulated Gaussian observations") + scatter!(gaussian_data, 0.01 .* ones(N), markershape=:vline, c=1, label=L"d_n") +end + +# ╔═╡ 59975c2b-c537-4950-aeea-985377f22d93 +md""" +We have used a relatively vague Gamma prior with ``a_0=b_0=0.5``; and the posterior can be easily calculated by updating the hyperparameters: ``\texttt{Gamma}(a_0+ 100/2, b_0+ \texttt{sse}/2).`` The update can be easily in Julia: +""" + +# ╔═╡ cb9ad8b5-7975-4d54-bb94-afc9f4953a67 +begin + a₀ = 0.5 + b₀ = 0.5 + # Gamma in Distributions.jl is implemented with shape and scale parameters where the second parameter is 1/b + prior_λ = Gamma(a₀, 1/b₀) + posterior_λ = Gamma(a₀+ N/2, 1/(b₀+ sum(gaussian_data.^2)/2)) +end; + +# ╔═╡ 03a650cb-7610-4d20-8ae7-2c6e308770f6 +md""" +We can plot the prior and posterior distributions to visually check the Bayesian update's effect. To plot a random variable in Julia, one can simply use `plot()` function from `StatsPlots.jl` package. The figure of both the prior and posterior plots is shown below. +""" + +# ╔═╡ cb37f8a8-83aa-44f6-89a5-43fe0e4a5fa8 +let + plot(prior_λ, xlim = [0, 5], ylim=[0, 1.5], lw=2, fill=(0, 0.2), label="Prior "* L"p(\lambda)", xlabel=L"\lambda", ylabel="density", title="Conjugate inference of a Gaussian's precision") + + plot!(posterior_λ, lw=2,fill=(0, 0.2), label="Posterior "* L"p(\lambda|\mathcal{D})") + vline!([true_λ], label="true "*L"λ", lw=4) + vline!([mean(prior_λ)], label="prior mean", lw=2, lc=1, ls=:dash) + vline!([mean(posterior_λ)], label="posterior mean", lw=2, lc=2, ls=:dash) + # vline!([1/σ²], label="true "*L"λ", lw=2) + # end +end + +# ╔═╡ 2d7792cd-5b32-4228-bfef-e1ab250724f3 +md""" +**Sequential update.** The conjugacy also provides us a computational cheap way to sequentially update the posterior. Due to the independence assumption, we do not need to calculate the posterior in one go. + +```math +\begin{align} +p(\lambda|\{d_1, d_2, \ldots, d_N\})&\propto p(\lambda) \prod_{n=1}^N p(d_n|\lambda) p(d_N|\lambda)\\ +&= \underbrace{p(\lambda) \prod_{n=1}^{N-1} p(d_n|\lambda)}_{p(\lambda|\mathcal D_{N-1})}\cdot p(d_N|\lambda)\\ +&= \underbrace{p(\lambda|\mathcal D_{N-1})}_{\text{new prior}} p(d_N|\lambda) +\end{align} +``` +With observations up to ``N-1``, we obtain a posterior ``p(\lambda|\mathcal D_{N-1})``. +The posterior now serves as the new prior to update the next observation ``d_N``. It can be shown that the final posterior sequentially updated this way is the same as the off-line posterior. + +To be more specific, the sequential update algorithm for the precision example is: + +Initialise with a prior ``p(\lambda|\emptyset)``; +for ``n = 1,2,\ldots, N`` +* update ``a_n = a_{n-1} + 0.5 ``, ``b_n = b_{n-1} + 0.5 \cdot (d_n-\mu)^2`` +* report the posterior at ``n`` if needed + +To demonstrate the idea, check the following animatin. The posterior update starts from a vague prior. As more data observed and absorbed to the posterior, the posterior distribution is more and more informative and finally recover the ground truth. +""" + +# ╔═╡ 7ccd4caf-ef8f-4b78-801f-b000f5aad430 +let + plot(prior_λ, xlim = [0, 5], ylim=[0, 1.5], lw=2, fill=(0, 0.1), label="Prior "* L"p(\lambda)", xlabel=L"\lambda", ylabel="density", title="Sequential update N=0") + plot!(posterior_λ, lw=2, fill=(0, 0.1), label="Posterior "* L"p(\lambda|\mathcal{D})") + vline!([true_λ], label="true "*L"λ", lw=2, lc=3) + anim=@animate for n in [(1:9)..., (10:10:N)...] + an = a₀ + n/2 + bn = b₀ + sum(gaussian_data[1:n].^2)/2 + poster_n = Gamma(an, 1/bn) + plot!(poster_n, lw=1, label="", title="Sequential update N=$(n)") + end + gif(anim, fps=3) +end + +# ╔═╡ 87b411d1-a62f-4462-b81b-ef0e8ac97d7e +md""" +### Informative vs Non-informative + +All priors can be largely classified into two groups: **informative** prior and **non-informative** prior. + +**Non-informative** prior, as the name suggests, contains no information in the prior [^1] and *let the data speak to itself*. For our coin-flipping case, a possible choice is a flat uniform prior: i.e. ``p(\theta) \propto 1`` when ``\theta\in[0,1]``. + + +**Informative** prior, on the other hand, contains the modeller's subjective prior judgement. + +For example, if we believe our coin should be fair, we can impose an informative prior such as ``p(\theta) =\texttt{Beta}(n,n)``. When ``n`` gets larger, e.g. ``n=5``, the prior becomes more concentrated around ``\theta=0.5``, which implies a stronger prior belief on the coin being fair. + +$(begin +plot(Beta(1,1), lw=2, xlabel=L"\theta", ylabel="density", label=L"\texttt{Unif}(0,1)", title="Priors with different level of information", legend=:topleft) +plot!(Beta(2,2), lw=2,label= L"\texttt{Beta}(2,2)") +plot!(Beta(3,3), lw=2,label= L"\texttt{Beta}(3,3)") +plot!(Beta(5,5), lw=2,label= L"\texttt{Beta}(5,5)") +# vline!([0.5], lw=2, ls=:dash, label= "") +end) + +After we observe ``N_h=7, N_t=3``, the posteriors can be calculated by updating the pseudo counts: ``\texttt{Beta}(n+7, n+3)``. The corresponding posteriors together with their posterior means (thick dashed lines) are plotted below. + +$(begin +nh, nt= 7, 3 +plot(Beta(1+7,1+3), lw=2,xlabel=L"\theta", ylabel="density", label=L"\texttt{Beta}(1+7,1+3)", title="Posteriors with different priors",legend=:topleft) +plot!(Beta(2+7,2+3), lw=2,label= L"\texttt{Beta}(2+7,2+3)") +plot!(Beta(3+7,3+3), lw=2,label= L"\texttt{Beta}(3+7,3+3)") +plot!(Beta(5+7,5+3), lw=2,label= L"\texttt{Beta}(5+3,5+3)") +vline!([mean(Beta(5+7, 5+3))], color=4, ls=:dash, lw=2, label="") +vline!([mean(Beta(1+7, 1+3))], color=1, ls=:dash, lw=2, label="") +vline!([mean(Beta(2+7, 2+3))], color=2, ls=:dash, lw=2, label="") +vline!([mean(Beta(3+7, 3+3))], color=3, ls=:dash, lw=2, label="") +end) +""" + +# ╔═╡ 58d7878a-f9d6-46b4-9ac4-1944f7508f03 +md""" + +It can be observed that all posteriors peak at different locations now. When the prior is more informative (that the coin is fair), it shrinks the posterior closer to the centre ``\theta=0.5``. +""" + +# ╔═╡ 3cdf9875-9c42-46b3-b88c-74e0f363bc4a +md""" +Historically, **non-informative** Bayesian was the dominating choice due to its *objectiveness*. However, it should be noted that it is almost impossible to be completely non-informative. Indeed, for our coin-flipping example, the flat uniform distributed prior still shrinks the posterior mean towards 0.5, therefore not non-informative or objective. + +The flexibility of introducing priors that reflect a modeller's local expert knowledge, however, is now more considered an *advantage* of the Bayesian approach. After all, modelling itself is a subjective matter. A modeller needs to take the responsibility for their modelling choices. The preferred approach is to impose subjective (possibly weak) informative priors but carefully check one's prior assumptions via methods such as posterior/prior predictive checks. + +""" + +# ╔═╡ 3ca3ee53-c744-4474-a8da-6209ec5e6904 +md""" + +## More on Bayesian modelling + +""" + +# ╔═╡ 5cbace78-8a92-43aa-9d3a-45054be48532 +md""" +Bayesian modelling is more an art than science. Ideally, each problem should have its own bespoke model. We have only seen problems where the observed data is assumed to be independently and identically distributed (**i.i.d.**). For example, in the coin-flipping example, since the ten coin tosses ``\{d_1, d_2, \ldots, d_{10}\}`` are *independent* tossing realisations of the *same* coin, the i.i.d. assumption makes sense. We assume each ``d_i`` follows the same Bernoulli distribution and they are all independent. + +However, there are problems in which more elaborate modelling assumptions are required. To demonstrate the idea, we consider the following inference problem. + + + +""" + +# ╔═╡ 2cb31d23-a542-4f8d-a056-025fa574f0d7 +md""" + +!!! question "Seven scientist problem" + [*The question is adapted from [^1]*] Seven scientists (A, B, C, D, E, F, G) with widely-differing experimental skills measure some signal ``\mu``. You expect some of them to do accurate work (i.e. to have small observation variance ``\sigma^2``, and some of them to turn in wildly inaccurate answers (i.e. to have enormous measurement error). What is the unknown signal ``\mu``? + + The seven measurements are: + + | Scientists | A | B | C | D | E | F | G | + | -----------| ---|---|---|--- | ---|---|---| + | ``d_n`` | -27.020| 3.570| 8.191| 9.898| 9.603| 9.945| 10.056| +""" + +# ╔═╡ 31afbad6-e447-44d2-94cf-c8f99c7fa64a +begin + scientist_data = [-27.020, 3.57, 8.191, 9.898, 9.603, 9.945, 10.056] + μ̄ = mean(scientist_data) +end + +# ╔═╡ de5c3254-1fbe-46ec-ab09-77889405510d +md""" +The measurements are also plotted below. +""" + +# ╔═╡ ff49403c-8e0e-407e-8141-6ccf178c152b +let + ylocations = range(0, 2, length=7) .+ 0.5 + plt = plot(ylim = [0., 3.0], xminorticks =5, yticks=false, showaxis=:x, size=(600,200)) + scientists = 'A':'G' + δ = 0.1 + for i in 1:7 + plot!([scientist_data[i]], [ylocations[i]], label="", markershape =:circle, markersize=5, markerstrokewidth=1, st=:sticks, c=1) + annotate!([scientist_data[i]].+7*(-1)^i * δ, [ylocations[i]].+ δ, scientists[i], 8) + end + vline!([μ̄], lw=2, ls=:dash, label="sample mean", legend=:topleft) + # density!(scientist_data, label="") + plt +end + +# ╔═╡ 024ce64f-29ef-49f2-a66f-87c2d4eb67a7 +md""" +*Remarks. Based on the plot, scientists C,D,E,F,G all made similar measurements. Scientists A, B's experimental skills seem questionable. This is a problem in which the frequentist method should find challenging. If all 7 measurements were observed by one scientist or scientists with a similar level of experimental skill, the sample mean: +$$\frac{\sum_n d_n}{N} \approx 3.46$$ +would have been a good estimator. +An ad hoc remedy is probably to treat the first two observations as outliers and take an average over the rest of 5 measurements. This remedy is lack formal justification and does not scale well with problems with a lot of measurements. One cannot check every observation individually.* + +""" + +# ╔═╡ 52fd1028-05aa-4b37-b57c-daabf4d77f50 +md""" + +### A bad Bayesian model + +**Modelling** +One possible model is to ignore the sutblies and reuse our coin-flipping model's assumption. Since the observed data is real-valued, we only need to replace a Bernoulli likelihood with a Gaussian. We then assume observations ``d_n`` are i.i.d distributed with a Gaussian + +$$d_n \overset{\mathrm{i.i.d}}{\sim} \mathcal N(\mu, \sigma^2),$$ + +where the mean is the unknown signal ``\mu`` and a shared ``\sigma^2`` is the observation variance. The model implies each scientist's observation is the true signal ``\mu`` plus some Gaussian distributed observation noise. + +To specify a Bayesian model, we need to continue to specify a prior model for the two unknowns ``\mu``, ``\sigma^2``. For computational convenience, we assume a Gaussian prior for the signal ``\mu``: + +$$\mu \sim \mathcal N(m_0, v_0),$$ +* ``m_0`` is our prior guess of the signal's centre +* ``v_0`` represents our prior belief strength; + +To show our ignorance, we can set ``m_0=0`` (or the sample average) and ``v_0`` to a very large positive number, say 10,000. The prior then becomes a very flat vague distribution. + +It is more convenient to model the observation precision ``\lambda \triangleq 1/\sigma^2`` instead of variance ``\sigma^2``. Here we assume a Gamma prior for the precision parameter: + +$$\lambda \sim \texttt{Gamma}(a_0, b_0)$$ + +Again, to show our ignorance, we can set ``a_0, b_0`` such that the distribution is as flat and vague as possible. A possible parameterisation is ``a_0=b_0=0.5.`` Note that Gamma is a distribution on the positive real line which has matching support for the precision parameter. + +To put them together, the full Bayesian model is: +```math +\begin{align} +\text{prior}: \mu &\sim \mathcal N(m_0=0, v_0=10000)\\ +\lambda &\sim \texttt{Gamma}(a_0=0.5, b_0=0.5)\\ +\text{likelihood}: d_n &\overset{\mathrm{i.i.d}}{\sim} \mathcal N(\mu, 1/\lambda) \;\; \text{for } n = 1,2,\ldots, 7. +\end{align} +``` +**Computation:** +After specifying the model, we need to apply Baye's rule to compute the posterior distribution: + +```math +\begin{align} +p(\mu, \lambda|\mathcal D) &\propto p(\mu, \lambda) p(\mathcal D|\mu, \lambda) +\\ +&= p(\mu)p(\lambda) p(\mathcal D|\mu, \lambda) \\ +&= p(\mu)p(\lambda) \prod_{n=1}^N p(d_n|\mu, \lambda); +\end{align} +``` +where we have assumed the prior for ``\mu`` and ``\lambda`` are independent. Sub-in the definition of the prior and likelihood, we can plot the posterior. +""" + +# ╔═╡ d6056188-9a46-4b5f-801b-e028b6eb0b7f +let + m₀, v₀ = 0, 10000 + a₀, b₀ = 0.5, 0.5 + function ℓπ(μ, λ; data) + σ² = 1/λ + logprior = logpdf(Normal(m₀, v₀), μ) + logpdf(Gamma(a₀, 1/b₀), λ) + logLik = sum(logpdf.(Normal(μ, sqrt(σ²)), data)) + return logprior + logLik + end + + plot(-13:0.05:20, 0:0.001:0.019, (x, y) -> exp(ℓπ(x, y; data=scientist_data)), st=:contour,fill=true, ylim=[0.001, 0.015], xlabel=L"μ", ylabel=L"λ", title="Contour plot of "*L"p(\mu, \lambda|\mathcal{D})") +end + +# ╔═╡ bbbb73c8-0254-463a-8e81-5acdd08583ac +md""" +**Marginal posterior ``p(\mu|\mathcal D)``:** +The posterior distribution shows the posterior peaks around ``\mu = 3.5``, which is roughly the same as the sample average. However, to better answer the question, we should treat ``\lambda`` as a *nuisance* parameter, and integrate it out to find the marginal posterior for ``\mu`` only. After some algebra, we find the unnormalised marignal posterior is of the form: + +```math +p(\mu|\mathcal D) \propto p(\mu)\cdot \Gamma\left (a_0+ \frac{N}{2}\right )\left (b_0+\frac{\sum_n (d_n-\mu)^2}{2}\right )^{- (a_0+ \frac{N}{2})}, +``` +where ``N=7`` for our problem. + +""" + +# ╔═╡ 2f2e3e34-76c0-4f35-8c9b-21184f86cf66 +md""" + +We can implement the (log) density in Julia (check `log_marginal_μ_wrong` function below). It is more common to compute log probability to avoid numerical issues. For reference, the log posterior density is: + +```math + +\ln p(\mu|\mathcal D) = \ln p(\mu) + \ln\Gamma\left (a_0+ \frac{N}{2}\right )- \left (a_0+ \frac{N}{2}\right )\cdot \ln \left (b_0+\frac{\sum_n (d_n-\mu)^2}{2}\right ) +``` +""" + +# ╔═╡ 9732358b-f592-4c66-9d8a-fdc221249a56 +function log_marginal_μ_wrong(μ; data, a₀=0.5, b₀=0.5, m₀=0, v₀=10000) + N = length(data) + logprior = logpdf(Normal(m₀, sqrt(v₀)), μ) + logLik = loggamma(a₀ + N/2) - (a₀+ N/2)* log(b₀+ 0.5 * sum((data .- μ).^2)) + return logprior + logLik +end + +# ╔═╡ 9d737cc5-c533-4e86-8654-b1adba943fc0 +md""" +We plot the unnormalised marginal posterior below. It shows the most likely estimate for the signal is about 3.46, which is counter-intuitive. +""" + +# ╔═╡ 1d7783bf-a8d0-47d6-812d-b31ae0c0b138 +let + μs = -30:0.01:30 + ℓs = log_marginal_μ_wrong.(μs; data= scientist_data) + _, maxμ = findmax(ℓs) + plot(μs, (ℓs), color=2, alpha=0.5, label="", fillrange = -100, ylim=[-39, -28], + fillalpha = 0.5, + fillcolor = 2, xlabel=L"μ", yaxis=false, ylabel="log density",title="Unnormalised marginal posterior "*L"\ln p(μ|\mathcal{D})") + vline!([μs[maxμ]], lw=2, color=2, ls=:dash, label="Mode") + xticks!([(-30:10:30)...; μs[maxμ]]) +end + +# ╔═╡ 73bb12a3-db59-4e71-bf05-5a4b4e018f51 +md""" + +### A better Bayesian model +""" + +# ╔═╡ 8eb641f0-a01f-43f9-a362-e7d54c26411a +md""" + +**Modelling:** +The i.i.d assumption does not reflect the sutblties of the data generation process. A better model should assume each observation follows an independent but not identical Gaussian distribution. In particular, for each scientist, we should introduce their own observation precision, ``\lambda_n \triangleq \sigma^2_n`` to reflect their "different levels of experimental skills". + + +The improved model now includes 7+1 unknown parameters: the unknown signal ``\mu`` and seven observation precisions ``\lambda_n`` for the seven scientists: + +```math +\begin{align} +\mu &\sim \mathcal N(m_0, v_0)\\ +\lambda_n &\sim \texttt{Gamma}(a_0, b_0)\;\; \text{for }n = 1,2,\ldots,7\\ +d_n &\sim \mathcal N(\mu, 1/\lambda_n)\;\; \text{for }n = 1,2,\ldots,7\\ +\end{align} +``` +""" + +# ╔═╡ a06f8785-fbbc-4973-b3d0-5a6db967b3cc +md""" +**Computation:** + +Similarly, we want to find out the marginal posterior distribution. After integrating out the nuisance parameters ``\{\lambda_n\}`` from the posterior, we can find the marginal posterior is of the following form: + +```math +p(\mu|\mathcal D) \propto p(\mu)\prod_{n=1}^N p(d_n|\mu) \propto p(\mu)\prod_{n=1}^N \frac{\Gamma{(a_n)}}{b_n^{a_n}}, +``` + +where for ``n= 1,2\ldots, 7``: + +$$a_n = a_0 + \frac{1}{2}, b_n = b_0+ \frac{1}{2} (d_n-\mu)^2.$$ +""" + +# ╔═╡ 5fc1d8aa-5835-4559-860b-b73031d3bfe7 +md""" +We can implement the log posterior distribution in Julia and plot the density. +""" + +# ╔═╡ da7f1485-a532-4d3c-96db-d1d50f2bdee6 +function log_marginal_μ(μ; data, a₀=0.5, b₀=0.5, m₀=0, v₀=10000) + aₙ = a₀ + 0.5 + bₙ = b₀ .+ 0.5 .* (data .-μ).^2 + logpdf(Normal(m₀, sqrt(v₀)), μ) + length(data) * loggamma(a₀) - sum(aₙ * log.(bₙ)) +end + +# ╔═╡ ee8fce9a-0a5b-40c2-a4d9-f124b40188f4 +md""" +The posterior distribution looks more complicated now but makes much better sense. + +* the mode now correctly sits around 10 (circa 9.7) +* also note a few small bumps near locations of -27 and 3.5 + +The posterior makes much better sense. It not only correctly identifies the consensus of the majority of the scientists (i.e. scientists C, D, E,..., G) and also takes into account scientists A and B's noisy observations. +""" + +# ╔═╡ d6341bf9-7a95-4a10-8a26-9495b724b907 +let + + μs = -30:0.01:30 + ℓs = log_marginal_μ.(μs; data= scientist_data) + _, maxμ = findmax(ℓs) + plot(μs, ℓs, xlabel=L"μ", ylabel="log density", title="Unnormalised marginal log posterior: "*L"\ln p(\mu|\mathcal{D})", lw=2, label="", lc=2) + vline!([μs[maxμ]], lw=2, color=2, ls=:dash, label="Mode") + # xticks!([(-30:10:30)...; μs[maxμ]]) +end + +# ╔═╡ 0a8a5aae-3567-41a3-9f15-d07235d07da2 +md""" + +## Predictive checks +""" + +# ╔═╡ 8fe3ed2f-e826-4faa-ace0-2286b944991f +md""" + +### Posterior predictive check +Bayesian inference provides a great amount of modelling freedom to its user. The modeller, for example, can incorporate his or her expert knowledge in the prior distribution and also choose a suitable likelihood that best matches the data generation process. However, greater flexibility comes with a price. The modeller also needs to take full responsibility for the modelling decisions. For example, for a Bayesian model, one needs to check whether +* the prior makes sense? +* the generative model as a whole (i.e. prior plus likelihood) match the observed data? +In other words, the user needs to **validate the model** before making any final inference decisions. **Predictive checks** are a great way to empirically validate a model. + +The idea of predictive checks is to generate future *pseudo observations* based on the assumed model's (posterior) **prediction distribution**: + +$$\mathcal{D}^{(r)} \sim p(\mathcal D_{pred}|\mathcal D, \mathcal M), \;\; \text{for }r= 1\ldots, R$$ + +where ``\mathcal D`` is the observed data and ``\mathcal M`` denotes the Bayesian model. Note that the posterior predictive distribution indicates what future data might look like, given the observed data and our model. If the model assumptions (both the prior and likelihood) are reasonable, we should expect the generated pseudo data agree with the observed. + +Comparing vector data is not easy (note that a sample ``\mathcal D`` is usually a vector). In practice, we compute the predictive distribution of some summary statistics, say mean, variance, median, or any meaningful statistic instead, and visually check whether the observed statistic falls within the prediction. Based on the Monte Carlo principle, after simulating ``R`` pseudo samples, + +$$\tilde{\mathcal D}^{(1)}, \tilde{\mathcal D}^{(2)}, \tilde{\mathcal D}^{(3)},\ldots, \tilde{\mathcal D}^{(R)} \sim p(\mathcal D_{pred}|\mathcal D, \mathcal M),$$ the predictive distribution of a summary statistic ``t(\cdot)``: ``p(t(D_{pred})|\mathcal D, \mathcal M)``, can be approximated by the empirical distribution of ``\{t(\tilde{\mathcal D}^{(1)}), t(\tilde{\mathcal D}^{(2)}), \ldots, t(\tilde{\mathcal D}^{(R)})\}``. + + +### Prior predictive check +Alternatively, one can use a **prior predictive distribution** to simulate the *future* data: i.e. + +$$\mathcal{D}^{(r)} \sim p(\mathcal D_{pred}|\mathcal M), \;\; \text{for }r= 1\ldots, R$$ +and the visual check based on the sample is called **prior predictive check**. The prior predictive distribution is a distribution of possible data sets given the priors and the likelihood, *before any real observations are taken into account*. Since the distribution relies on the prior information only, a prior predictive check is particularly useful to validate a prior's specification. + +Note that the two predictive distributions are very much related. By setting ``\mathcal D=\emptyset``, we recover the prior predictive distribution from the posterior predictive distribution. + + + + + +""" + +# ╔═╡ 79b85624-a68d-41df-856a-7a7670ff4d0e +md""" + +### Approximate predictive distributions + +The predictive distribution, in general, can be found by applying the sum rule, + +```math + +p(\mathcal D_{pred}|\mathcal D, \mathcal M) = \int p(\mathcal D_{pred}, \theta|\mathcal D, \mathcal M) \mathrm{d}\theta= \int p(\mathcal D_{pred} |\theta, \mathcal D, \mathcal M) p(\theta|\mathcal D, \mathcal M) \mathrm{d}\theta + +``` +in which the unknown parameters ``\theta`` are integrated out. Assuming that past and future observations are conditionally independent given ``\theta``, i.e. ``p(\mathcal D_{pred} |\theta, \mathcal D, \mathcal M) = p(\mathcal D_{pred} |\theta, \mathcal M)``, the above equation can be written as: + +```math + +p(\mathcal D_{pred}|\mathcal D, \mathcal M) = \int p(\mathcal D_{pred} |\theta, \mathcal M) p(\theta|\mathcal D, \mathcal M) \mathrm{d}\theta + +``` + +The integration in general is intractable. However, we can rely on sampling-based methods to approximate the integration. + + +!!! information "" + Repeat the following many times: + + 1. Draw one sample from the posterior (or the prior for prior predictive): $$\tilde \theta \sim p(\theta|\mathcal D)$$ + 2. Conditioning on ``\tilde \theta``, simulate the pseudo observations: ``\tilde{\mathcal D}\sim p(\mathcal D|\tilde{\theta}) `` + +The Monte Carlo approximation method can also be viewed as an ensemble method: + + +$$p(\mathcal D_{pred}|\mathcal D, \mathcal M) \approx \frac{1}{R} \sum_{r} p(\mathcal D_{pred}|\theta^{(r)}).$$ +We are making predictions of future data on an ensemble of ``R`` models by taking the average, and each ensemble element model is indexed by one posterior (prior) sample. + + +The ensemble view highlights a key difference between the Bayesian and frequentist methods. When it comes to prediction, the frequentist usually applies the plut-in principle: use a point estimator of ``\theta`` (e.g. the maximum likelihood estimator) and that singleton model to predict: + +$$p(\mathcal D_{pred}|\hat{\theta}, \mathcal M).$$ +On the other hand, the Bayesian adopts a more democratic approach: an ensemble of models is consulted. + + +*Remarks. In simulating a pseudo sample ``\tilde{\mathcal D}``, we need to generate the same number of observations as ``\mathcal D``. For example, in the coin flipping example, for each ``\tilde\theta``, we need to simulate 10 tosses.* + + + +""" + +# ╔═╡ e9a87ae2-f906-4be9-a969-7b681c2cff7b +md""" +### Example: coin-flipping model + +For the conjugate coin-flipping model, the parameter sampling step is straightforward since both the prior and posterior distributions ``p(\theta|\mathcal M)`` (or ``p(\theta|\mathcal M)``) are both Beta distributed. + +Similarly, it is also easy to simulate coin flip observations conditional on the bias ``\theta``. For example, one can simulate a tuple ``(\theta, \mathcal D_{pred})`` in Julia by + +```julia +# draw a coin's bias from a Beta distribution +θ = rand(Beta(a, b)) +# draw a pseudo coin-flipping sample of 10 tosses +D = rand(Bernoulli(θ), 10) +``` + +One should repeat the above two steps ``R`` (e.g. 2000) times to obtain an approximation of the predictive distribution of future data. +""" + +# ╔═╡ ebdb9711-20cc-458c-9474-8e3ace69797e +function predictive_simulate(a, b; N=10 , R=2000) + θ = rand(Beta(a,b), R) + D = rand(N, R) .< θ' + return D +end; + +# ╔═╡ 13fae558-d12e-4e27-b36f-ec59eabb65cf +let + Random.seed!(100) + D = predictive_simulate(1, 1; N=10 , R=5000) + histogram(sum(D, dims=1)[:], bins = 20, xticks=0:10, normed=true, label="Prior predictive on Nₕ", legend=:outerbottom, xlabel="number of heads "*L"N_h", title="Prior predictive check with a₀=b₀=1") + vline!([7], lw=4, lc=2, label="Observed Nₕ") +end + +# ╔═╡ 5bc82f81-1c49-47e3-b9c8-6c5b79b4e88a +let + Random.seed!(100) + D = predictive_simulate(8, 4; N=10 , R=5000) + histogram(sum(D, dims=1)[:], normed=true, xticks = 0:10, label="Posterior predictive on Nₕ", legend=:outerbottom, xlabel="number of heads "*L"N_h", title="Posterior predictive check with a₀=b₀=1") + # density!(sum(D, dims=1)[:], xlim=[0,10], lc=1, lw=2, label="") + vline!([7], lw=4, lc=2, label="Observed Nₕ") +end + +# ╔═╡ 858d3a5f-053d-4282-83f7-ff33ad8b5f58 +md""" +**A model with mis-specified prior.** Predictive checks can identify potential problems in a misspecified model. Suppose the modeller has mistakenly specified a very strong informative prior: + +$$\theta \sim \text{Beta}(50, 1),$$ + +And the posterior becomes + +$$\theta \sim \text{Beta}(50+7, 1+3).$$ + +The prior and posterior plots are shown below. + + +""" + +# ╔═╡ 4c1f3725-ddfa-4a19-adaf-4b48ef47c79b +let + nh, nt = 7, 3 + a₀, b₀ = 50, 1 + plot(Beta(a₀,b₀), xlims=[0.6,1], label=L"p(\theta)= \mathcal{Beta}(50,1)", linewidth=1, xlabel=L"\theta", ylabel=L"p(\theta|\cdot)" ,fill= true, lw=2, alpha=0.2, legend=:outerright, color=1, title="A mis-specified model") + vline!([mean(Beta(a₀,b₀))], label="prior mean", lw=2, lc=1, ls=:dash) + plot!(Beta(a₀+nh,b₀+nt), fill= true, lw=2, alpha=0.2, color=2, label=L"p(\theta|\mathcal{D})= \mathcal{Beta}(57,4)", linewidth=2) + vline!([mean(Beta(a₀+nh,b₀+nt))], label="posterior mean", lw=2, lc=2, ls=:dash) +end + +# ╔═╡ 461dd52d-478e-4b1e-b0e0-55ecb98d4022 +md""" + +It can be observed that the prior (blue curve) has a strong belief that the coin is biased towards the head, which does not agree with the observed data (7 out of 10 tosses are head)! As a result, the posterior is heavily influenced by the prior and deviates a lot from the observed frequency. +""" + +# ╔═╡ 97f2393d-d433-40b6-8189-61f0aace3760 +md""" + +Predictive checks can spot the problem for us. Let's first use the prior predictive check. The figure below shows the prior predictive check result. 5000 pseudo data sample were simulated from the prior predictive distribution. It can be observed that the observed count of heads ``N_h=7`` has zero probability of being generated from the prior. + +""" + +# ╔═╡ c8c7d2d7-4971-4852-aff9-a0c85a0881b3 +let + Random.seed!(100) + D = predictive_simulate(50, 1; N=10 , R=5000) + histogram(sum(D, dims=1)[:], xlim = [0,11], xticks=0:10, normed=false, label="Prior predictive on Nₕ", legend=:outerbottom, xlabel="number of heads", title="Prior predictive check with a₀=50, b₀=1", ylabel=L"\#"* " of counts") + vline!([7], lw=4, lc=2, label="Observed Nₕ") +end + +# ╔═╡ edf0f6ab-3ace-47b0-9b6f-26154859862b +md""" + +The posterior predictive check shows a similar story: the observed and what is expected from the posterior model are drastically different. Both checks signal that there are some problems in the model assumption. +""" + +# ╔═╡ 960ec68f-75bc-4543-b91c-c06b27e54926 +let + Random.seed!(100) + D = predictive_simulate(50+7, 1+3; N=10 , R=5000) + histogram(sum(D, dims=1)[:], xlim = [0,11], xticks=0:10,normed=false, label="Posterior predictive on Nₕ", legend=:outerbottom, xlabel="number of heads", title="Posterior predictive check with a₀=50, b₀=1", ylabel=L"\#"* " of counts") + # density!(sum(D, dims=1)[:], xlim=[0,10], lc=1, lw=2, label="") + vline!([7], lw=4, lc=2, label="Observed Nₕ") +end + +# ╔═╡ 1ee811d8-36f7-42b1-be50-c68ee9cabf23 +md""" + +### Example: seven-scientist problem + +""" + +# ╔═╡ 83f3ee86-567b-4998-9216-2cca4bdaad0a +md""" + +As a final example, we revisit the seven scientist problem and carry out model checks on the two models: the one with an oversimplified i.i.d assumption and also the better one. Instead of computing summary statistics on the predicted pseudo data, we can also simply check their empirical distributions. One possibility is to plot the fitted kernel density estimation (KDE) of the observed and simulated data and check their discrepancy. +""" + +# ╔═╡ 9790024a-6cc8-47fe-892e-9ce32d7399a5 +md""" + +One can visualise KDE of a dataset by using `density(data)` command. For the seven scientist data, the observed density is: +""" + +# ╔═╡ 36ba6267-db0b-4147-b376-49106a15426f +let + density(scientist_data, lw=2, label="KDE density", xlabel=L"d", ylabel="density", legend=:topleft, size=(550,350), title="Density estimation of the seven-scientist data") + plot!(scientist_data, 0.001 * ones(7), st=:scatter, label="observed data", markersize=5, color=1, markerstrokewidth=2, shape=:vline) +end + +# ╔═╡ dd91becf-167e-40eb-83e1-d1f004eb5491 +md""" + +**Predictive check on the wrong model.** +To carry out posterior predictive checks, one can plot KDE densities of each simulated pseudo data: ``\mathcal D_{pred}`` [^2]. The following figure carries out a posterior check on the over-simplified model with i.i.d assumption. 30 pseudo observations ``\mathcal D_{pred}`` are simulated from the predictive distribution first; then their empirical KDE estimated densities are estimated and plotted. It can be seen that the observed density has a hump around 10 but none of the simulated datasets shows a similar pattern, which signals there is a problem with the model assumption. +""" + +# ╔═╡ 2ca82ec8-5350-4d21-9738-487d4181bf73 +md""" +**Predictive check on the correct model.** We carry out the same check on the more realistic model where each scientist has his/her own observation precision parameter. The plot of both the observed and simulated posterior predictive densities is shown below. Compared with the previous model, the pseudo observation look alike the observed: which indicates the data generation scheme of the model matches better with the observed. + +""" + +# ╔═╡ 0864aa09-97b0-4421-b3be-2c621323503a +md""" + +## What's next ? + +Bayesian inference is powerful but the drawback is that it cannot be simply treated as a black box. One does need to understand the problem and come up with a model that matches the problem's context, *i.e.* a story about the hypothetical data generation process. In this chapter, we have focused on some **general** modelling concepts and tools. More task-specific, such as linear regression and classification, details will be introduced later in the second half of the course. + +In the next chapter, we will move on to the computation part. A powerful inference algorithm called MCMC will be introduced. The algorithm can be used to infer complicated Bayesian models when conjugate models do not exist. + +So far we have done Bayesian inferences by hand: that is all modelling and computation are manually implemented. It is not practical for day-to-day users. We will see how to do Bayesian inference with the help of probabilistic programming languages in chapter 4. With the help of PPL, an inference problem can be done easily with 4-5 lines of code. + +""" + +# ╔═╡ 058134b1-19b0-4f19-9508-e288e613b116 +md""" +## Notes + +[^1]: [MacKay, D. J. C. Information Theory, Inference, and Learning Algorithms. (Cambridge University Press, 2003).](https://www.inference.org.uk/itprnn/book.pdf) + +[^2]: Simulating predictive data for this case is bit more involved. The difficulty lies in simulating posterior samples from the posterior distribution: ``p(\mu, \{\lambda_n\}|\mathcal D)``. The joint distribution is not in any simple form. We need algorithms such as MCMC to draw samples from such a complicated posterior. MCMC will be introduced in the next chapter. +""" + +# ╔═╡ 83bf58df-e2d0-4552-98b7-29ce0ce5fb5e +md""" +## Appendix + +""" + +# ╔═╡ a30e54cb-b843-428b-b2f0-f5cf84961ce0 +begin + begin + struct Foldable{C} + title::String + content::C + end + + function Base.show(io, mime::MIME"text/html", fld::Foldable) + write(io,"
$(fld.title)

") + show(io, mime, fld.content) + write(io,"

") + end + end +end + +# ╔═╡ 13f7968f-fde3-4204-8237-ab33a2a5cfd0 +Foldable("Details about Beta-Binomial model's conjugacy", md" +Apply Baye's rule, we have + +```math +\begin{align} +p(\theta|\mathcal D) &\propto p(\theta) p(\mathcal D|\theta) \\ +&= \frac{1}{\text{B}(a_0, b_0)} \theta^{a_0-1}(1-\theta)^{b_0-1} \theta^{\sum_n d_n} (1-\theta)^{N-\sum_n d_n}\\ +&= \theta^{a_0+ \sum_{n} d_n -1}(1-\theta)^{b_0+N-\sum_n d_n -1}\\ +&= \theta^{a_N -1}(1-\theta)^{b_N -1}, +\end{align} +``` +where ``a_N= a_0 + N_h`` and ``b_N = b_0 + N - N_h``. +Next we needs to normalise the non-normalised posterior to find the exact posterior distribution. The normalising constant is: + +$$\int_{0}^1 \theta^{a_N -1}(1-\theta)^{b_N -1} d\theta$$ + +We recognise the unnormalised distribution is a Beta distribution with the updated parameters ``a_N= a_0 + N_h`` and ``b_N = b_0 + N - N_h``; the normalising constant must be ``B(a_N, b_N)``. Therefore, + +$$p(\theta|\mathcal D) =\text{Beta}(a_N, b_N).$$ +") + +# ╔═╡ cb3191ef-3b54-48ff-996c-d4993c876063 +Foldable("Derivation details on the Gamma-Gaussian conjugacy.", md" +```math +\begin{align} + p(\lambda|\mathcal D)&\propto p(\lambda) p(\mathcal D|\mu, \lambda)\\ +&= \underbrace{\frac{b_0^{a_0}}{\Gamma(a_0)} \lambda^{a_0-1} e^{-b_0 \lambda}}_{p(\lambda)} \underbrace{\frac{1}{ (\sqrt{2\pi})^N}\lambda^{\frac{N}{2}}e^{\frac{-\lambda\cdot \sum_{n} (d_n-\mu)^2}{2}}}_{p(\mathcal D|\lambda, \mu)}\\ +&\propto \lambda^{a_0+\frac{N}{2}-1} \exp\left \{-\left (b_0 + \frac{\sum_{n} (d_n- \mu)^2}{2}\right )\lambda\right \} \\ +&= \lambda^{a_N-1} e^{- b_N \lambda}, +\end{align} +``` +where ``a_n= a_0 +\frac{N}{2}, \;\;b_N = b_0 + \frac{\sum_{n} (d_n- \mu)^2}{2}.`` Note this is a unnormalised Gamma distribution (whose normalising constant can be read off directly from a Gamma distribution), therefore + + +$$p(\lambda|\mathcal D)= \text{Gamma}(a_N, b_N).$$ + +") + +# ╔═╡ 546cfb29-6f60-44be-9450-b4d33c8238e6 +Foldable("Details on the posterior marginal distribution of μ.", md" +```math +\begin{align} +p(\mu|\mathcal D) &= \int_0^\infty p(\mu, \lambda|\mathcal D) \mathrm{d}\lambda \\ +&= \int_0^\infty p(\mu, \lambda|\mathcal D) \mathrm{d}\lambda\\ +&= \frac{1}{p(\mathcal D)} \int_0^\infty p(\mu)p(\lambda) p(\mathcal D|\mu, \lambda)\mathrm{d}\lambda\\ +&\propto p(\mu)\int_0^\infty p(\lambda) p(\mathcal D|\mu, \lambda)\mathrm{d}\lambda\\ +&= p(\mu)\int_0^\infty \frac{b_0^{a_0}}{\Gamma(a_0)} \lambda^{a_0-1} e^{-b_0 \lambda} \frac{1}{ (\sqrt{2\pi})^N}\lambda^{\frac{N}{2}}e^{\frac{-\lambda\cdot \sum_{n} (d_n-\mu)^2}{2}}\mathrm{d}\lambda\\ +&\propto p(\mu)\int_0^\infty\lambda^{a_0+\frac{N}{2}-1} \exp\left \{-\left (b_0 + \frac{\sum_{n} (d_n- \mu)^2}{2}\right )\lambda\right \}\mathrm{d}\lambda \\ +&= p(\mu)\int_0^\infty\lambda^{a_N-1} e^{- b_N \lambda}\mathrm{d}\lambda \\ +&= p(\mu)\frac{\Gamma(a_N)}{b_N^{a_N}}, +\end{align} +``` +where ``a_n= a_0 +\frac{N}{2}`` and ``b_N = b_0 + \frac{\sum_{n} (d_n- \mu)^2}{2}``. Note that we have used the normalising constant trick of Gamma distribution in the second last step, where we recognise ``\lambda^{a_N-1} e^{- b_N \lambda}`` is the unnormalised part of a Gamma distribution with ``a_N, b_N`` as parameters; Then the corresponding Gamma density must integrates to one: + +```math +\int_{0}^\infty \frac{b_N^{a_N}}{\Gamma(a_N)}\lambda^{a_N-1} e^{- b_N \lambda}\mathrm{d}\lambda =1, +``` +which leads to ``\int_{0}^\infty \lambda^{a_N-1} e^{- b_N \lambda}\mathrm{d}\lambda= \frac{\Gamma(a_N)}{b_N^{a_N}}.`` +") + +# ╔═╡ 15b09064-2c48-4013-8a08-c32e32d1f4df +Foldable("Derivation details on the marginal distribution.", md" + +To find the marginal posterior for ``\mu``, we need to find the following marginal likelihood for observation ``d_n``: + +$p(d_n|\mu) = \int p(\lambda_n) p(d_n|\mu, \lambda_n)\mathrm{d}\lambda_n,$ + +where we have assumed ``\mu, \lambda_n`` are independent, i.e. ``p(\lambda_n|\mu) = p(\lambda_n)``. + +The marginal likelihood is the normalising constant of the marginal posterior ``p(\lambda_n|d_n, \mu)``, since + +$$p(\lambda_n|d_n, \mu) = \frac{p(\lambda_n) p(d_n|\mu, \lambda_n)}{p(d_n|\mu)}.$$ + +Due to conjugacy, it can be shown that the conditional posterior of ``\lambda_n`` is of Gamma form + +$p(\lambda_n|\mu, x_n) = \text{Gamma}(a_n, b_n),$ where +$$a_n = a_0 + \frac{1}{2}, b_n = b_0+ \frac{1}{2} (d_n-\mu)^2.$$ + +The normalising constant of the unnormalised posterior is therefore the corresponding Gamma distribution's normalising constant: + +$$p(d_n|\mu) \propto \frac{b_0^{a_0}}{\Gamma(a_0)} \frac{\Gamma{(a_n)}}{b_n^{a_n}}.$$ +") + +# ╔═╡ 7b4d6471-59f5-4167-bc35-a61549aaaef9 +Foldable("More explanation on predictive distribution approximation.", md" +Note that the sampling procedure starts with + +```math +\tilde{\theta} \sim p(\theta|\mathcal D, \mathcal M) +``` + +Then conditional on ``\theta``, simulate pseudo observation: + +```math +\tilde{\mathcal{D}} \sim p(\mathcal D_{pred}|\tilde{\theta}, \mathcal M) +``` + +Due to the independence assumption, the joint can be factored as: + +$$p(\theta, \mathcal D_{pred}|\mathcal D, \mathcal M)= p( \mathcal D_{pred}|\theta, \mathcal M)p(\theta|\mathcal D, \mathcal M).$$ + +As a result, the tuple ``\tilde\theta, \tilde{\mathcal{D}}`` is actually drawn from the joint distribution: + +$$\tilde{\theta}, \tilde{\mathcal{D}} \sim p(\theta, \mathcal D_{pred}|\mathcal D,\mathcal M),$$ + +we can therefore retain the marginal sample ``\{\tilde{\mathcal{D}}\}`` to approximate the marginal distribution ``p(\mathcal{D}_{pred}|\mathcal D, \mathcal M)``, which provides another way to show the correctness of the approximation method. +") + +# ╔═╡ 2747567e-dcab-4a99-885f-5bb19a33ab27 +function gibbs_seven_scientists(data ; discard = 1000, mc= 1000, a₀=0.5, b₀=.5, m₀=0, v₀=1e4) + μsample = zeros(mc) + λsample = zeros(length(data), mc) + μ = 0.0 + λ = ones(length(data)) + aₙ = a₀ + 0.5 + r₀ = 1/v₀ + for i in 1:(mc+discard) + # sample λs + bₙ = b₀ .+ 0.5 .* (data .- μ).^2 + λ = rand.(Gamma.(aₙ, 1.0 ./ bₙ)) + # sample μ + vₙ = 1/(r₀ + sum(λ)) + mₙ = (m₀ * r₀ + sum(λ .* data)) * vₙ + μ = rand(Normal(mₙ, sqrt(vₙ))) + if i > discard + μsample[i-discard] = μ + λsample[:, i-discard] = λ + end + end + return μsample, λsample +end + +# ╔═╡ bcfd15ba-807f-4886-86fd-3e8e8661a87b +begin + Random.seed!(100) + mus, lambdas = gibbs_seven_scientists(scientist_data; mc= 2000) +end; + +# ╔═╡ dae0d74e-3f6d-4f5d-8ece-390a4e1a170a +let + R = 30 + D_pred = zeros(7, R) + Random.seed!(321) + for i in 1:R + D_pred[:, i] = rand.(Normal.(mus[i], sqrt.(1 ./lambdas[:, i]))) + end + + plt = density(scientist_data, label="Observed", lw=2, xlim=[-32,30], ylim=[0, 0.25], xlabel=L"d", ylabel="density", title="Posterior predictive check on the correct model") + + for i in 1: R + density!(D_pred[:, i], label="", lw=0.4) + end + plt +end + +# ╔═╡ b640bef2-a58f-44ee-955e-586fd2c9ac11 +function gibbs_seven_scientists_wrong(data ; discard = 1000, mc= 1000, a₀=0.5, b₀=.5, m₀=0, v₀=1e4) + μsample = zeros(mc) + λsample = zeros(mc) + μ = 0.0 + λ = 1.0 + N = length(data) + aₙ = a₀ + 0.5 * N + r₀ = 1/v₀ + for i in 1:(mc+discard) + # sample λs + bₙ = b₀ + 0.5 * sum((data .- μ).^2) + λ = rand(Gamma(aₙ, 1.0 / bₙ)) + # sample μ + vₙ = 1/(r₀ + λ * N) + mₙ = (m₀ * r₀ + sum(λ .* data)) * vₙ + μ = rand(Normal(mₙ, sqrt(vₙ))) + if i > discard + μsample[i-discard] = μ + λsample[i-discard] = λ + end + end + return μsample, λsample +end + +# ╔═╡ 7becd0a5-d391-4947-96ee-89b2ebed5759 +begin + Random.seed!(100) + mus_wrong, lambda_wrong = gibbs_seven_scientists_wrong(scientist_data; mc= 2000) +end; + +# ╔═╡ b035c02f-9362-4f8c-926c-71eefed7fbc5 +let + R = 30 + D_pred = zeros(7, R) + Random.seed!(123) + for i in 1:R + # mus_wrong, lambda_wrong are posterior draws from the posterior by Gibbs sampling + D_pred[:, i] = rand(Normal(mus_wrong[i], sqrt(1.0 /lambda_wrong[i])), 7) + end + plt = density(scientist_data, label="Observed", lw=2, xlim=[-32,30], ylim=[0, 0.25], legend =:topleft, xlabel=L"d", ylabel="density", title="Posterior predictive check on the wrong model") + + for i in 1: R + density!(D_pred[:, i], label="", lw=0.4) + end + plt +end + +# ╔═╡ 00000000-0000-0000-0000-000000000001 +PLUTO_PROJECT_TOML_CONTENTS = """ +[deps] +Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" +LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" +PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" +StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd" + +[compat] +Distributions = "~0.25.66" +LaTeXStrings = "~1.3.0" +PlutoUI = "~0.7.39" +SpecialFunctions = "~2.1.7" +StatsPlots = "~0.15.1" +""" + +# ╔═╡ 00000000-0000-0000-0000-000000000002 +PLUTO_MANIFEST_TOML_CONTENTS = """ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.8.0" +manifest_format = "2.0" +project_hash = "9e7c33f8b66bcf1aff44f5bd106dce65ecb9c825" + +[[deps.AbstractFFTs]] +deps = ["ChainRulesCore", "LinearAlgebra"] +git-tree-sha1 = "69f7020bd72f069c219b5e8c236c1fa90d2cb409" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.2.1" + +[[deps.AbstractPlutoDingetjes]] +deps = ["Pkg"] +git-tree-sha1 = "8eaf9f1b4921132a4cff3f36a1d9ba923b14a481" +uuid = "6e696c72-6542-2067-7265-42206c756150" +version = "1.1.4" + +[[deps.Adapt]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "195c5505521008abea5aee4f96930717958eac6f" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "3.4.0" + +[[deps.ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" +version = "1.1.1" + +[[deps.Arpack]] +deps = ["Arpack_jll", "Libdl", "LinearAlgebra", "Logging"] +git-tree-sha1 = "91ca22c4b8437da89b030f08d71db55a379ce958" +uuid = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97" +version = "0.5.3" + +[[deps.Arpack_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "OpenBLAS_jll", "Pkg"] +git-tree-sha1 = "5ba6c757e8feccf03a1554dfaf3e26b3cfc7fd5e" +uuid = "68821587-b530-5797-8361-c406ea357684" +version = "3.5.1+1" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[deps.AxisAlgorithms]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"] +git-tree-sha1 = "66771c8d21c8ff5e3a93379480a2307ac36863f7" +uuid = "13072b0f-2c55-5437-9ae7-d433b7a33950" +version = "1.0.1" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[deps.Bzip2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2" +uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" +version = "1.0.8+0" + +[[deps.Cairo_jll]] +deps = ["Artifacts", "Bzip2_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "4b859a208b2397a7a623a03449e4636bdb17bcf2" +uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" +version = "1.16.1+1" + +[[deps.Calculus]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" +uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" +version = "0.5.1" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "80ca332f6dcb2508adba68f22f551adb2d00a624" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.15.3" + +[[deps.ChangesOfVariables]] +deps = ["ChainRulesCore", "LinearAlgebra", "Test"] +git-tree-sha1 = "38f7a08f19d8810338d4f5085211c7dfa5d5bdd8" +uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" +version = "0.1.4" + +[[deps.Clustering]] +deps = ["Distances", "LinearAlgebra", "NearestNeighbors", "Printf", "SparseArrays", "Statistics", "StatsBase"] +git-tree-sha1 = "75479b7df4167267d75294d14b58244695beb2ac" +uuid = "aaaa29a8-35af-508c-8bc3-b662a17a0fe5" +version = "0.14.2" + +[[deps.CodecZlib]] +deps = ["TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "ded953804d019afa9a3f98981d99b33e3db7b6da" +uuid = "944b1d66-785c-5afd-91f1-9de20f533193" +version = "0.7.0" + +[[deps.ColorSchemes]] +deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "Random"] +git-tree-sha1 = "1fd869cc3875b57347f7027521f561cf46d1fcd8" +uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" +version = "3.19.0" + +[[deps.ColorTypes]] +deps = ["FixedPointNumbers", "Random"] +git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4" +uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" +version = "0.11.4" + +[[deps.ColorVectorSpace]] +deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "SpecialFunctions", "Statistics", "TensorCore"] +git-tree-sha1 = "d08c20eef1f2cbc6e60fd3612ac4340b89fea322" +uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" +version = "0.9.9" + +[[deps.Colors]] +deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] +git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40" +uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" +version = "0.12.8" + +[[deps.Compat]] +deps = ["Dates", "LinearAlgebra", "UUIDs"] +git-tree-sha1 = "924cdca592bc16f14d2f7006754a621735280b74" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.1.0" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "0.5.2+0" + +[[deps.Contour]] +git-tree-sha1 = "d05d9e7b7aedff4e5b51a029dced05cfb6125781" +uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" +version = "0.6.2" + +[[deps.DataAPI]] +git-tree-sha1 = "fb5f5316dd3fd4c5e7c30a24d50643b73e37cd40" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.10.0" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "d1fff3a548102f48987a52a2e0d114fa97d730f0" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.13" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.DataValues]] +deps = ["DataValueInterfaces", "Dates"] +git-tree-sha1 = "d88a19299eba280a6d062e135a43f00323ae70bf" +uuid = "e7dc6d0d-1eca-5fa6-8ad6-5aecde8b7ea5" +version = "0.4.13" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[deps.DelimitedFiles]] +deps = ["Mmap"] +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" + +[[deps.DensityInterface]] +deps = ["InverseFunctions", "Test"] +git-tree-sha1 = "80c3e8639e3353e5d2912fb3a1916b8455e2494b" +uuid = "b429d917-457f-4dbc-8f4c-0cc954292b1d" +version = "0.4.0" + +[[deps.Distances]] +deps = ["LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "3258d0659f812acde79e8a74b11f17ac06d0ca04" +uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" +version = "0.10.7" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[deps.Distributions]] +deps = ["ChainRulesCore", "DensityInterface", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"] +git-tree-sha1 = "aafa0665e3db0d3d0890cdc8191ea03dc279b042" +uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" +version = "0.25.66" + +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "5158c2b41018c5f7eb1470d558127ac274eca0c9" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.9.1" + +[[deps.Downloads]] +deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +version = "1.6.0" + +[[deps.DualNumbers]] +deps = ["Calculus", "NaNMath", "SpecialFunctions"] +git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566" +uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74" +version = "0.6.8" + +[[deps.EarCut_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3f3a2501fa7236e9b911e0f7a588c657e822bb6d" +uuid = "5ae413db-bbd1-5e63-b57d-d24a61df00f5" +version = "2.2.3+0" + +[[deps.Expat_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "bad72f730e9e91c08d9427d5e8db95478a3c323d" +uuid = "2e619515-83b5-522b-bb60-26c02a35a201" +version = "2.4.8+0" + +[[deps.Extents]] +git-tree-sha1 = "5e1e4c53fa39afe63a7d356e30452249365fba99" +uuid = "411431e0-e8b7-467b-b5e0-f676ba4f2910" +version = "0.1.1" + +[[deps.FFMPEG]] +deps = ["FFMPEG_jll"] +git-tree-sha1 = "b57e3acbe22f8484b4b5ff66a7499717fe1a9cc8" +uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" +version = "0.4.1" + +[[deps.FFMPEG_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] +git-tree-sha1 = "ccd479984c7838684b3ac204b716c89955c76623" +uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" +version = "4.4.2+0" + +[[deps.FFTW]] +deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] +git-tree-sha1 = "90630efff0894f8142308e334473eba54c433549" +uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" +version = "1.5.0" + +[[deps.FFTW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "c6033cc3892d0ef5bb9cd29b7f2f0331ea5184ea" +uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" +version = "3.3.10+0" + +[[deps.FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" + +[[deps.FillArrays]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"] +git-tree-sha1 = "246621d23d1f43e3b9c368bf3b72b2331a27c286" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "0.13.2" + +[[deps.FixedPointNumbers]] +deps = ["Statistics"] +git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc" +uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" +version = "0.8.4" + +[[deps.Fontconfig_jll]] +deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "21efd19106a55620a188615da6d3d06cd7f6ee03" +uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" +version = "2.13.93+0" + +[[deps.Formatting]] +deps = ["Printf"] +git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" +uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" +version = "0.4.2" + +[[deps.FreeType2_jll]] +deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "87eb71354d8ec1a96d4a7636bd57a7347dde3ef9" +uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" +version = "2.10.4+0" + +[[deps.FriBidi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "aa31987c2ba8704e23c6c8ba8a4f769d5d7e4f91" +uuid = "559328eb-81f9-559d-9380-de523a88c83c" +version = "1.0.10+0" + +[[deps.GLFW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll"] +git-tree-sha1 = "d972031d28c8c8d9d7b41a536ad7bb0c2579caca" +uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" +version = "3.3.8+0" + +[[deps.GR]] +deps = ["Base64", "DelimitedFiles", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Pkg", "Printf", "Random", "RelocatableFolders", "Serialization", "Sockets", "Test", "UUIDs"] +git-tree-sha1 = "037a1ca47e8a5989cc07d19729567bb71bfabd0c" +uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" +version = "0.66.0" + +[[deps.GR_jll]] +deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Pkg", "Qt5Base_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "c8ab731c9127cd931c93221f65d6a1008dad7256" +uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" +version = "0.66.0+0" + +[[deps.GeoInterface]] +deps = ["Extents"] +git-tree-sha1 = "fb28b5dc239d0174d7297310ef7b84a11804dfab" +uuid = "cf35fbd7-0cd7-5166-be24-54bfbe79505f" +version = "1.0.1" + +[[deps.GeometryBasics]] +deps = ["EarCut_jll", "GeoInterface", "IterTools", "LinearAlgebra", "StaticArrays", "StructArrays", "Tables"] +git-tree-sha1 = "a7a97895780dab1085a97769316aa348830dc991" +uuid = "5c1252a2-5f33-56bf-86c9-59e7332b4326" +version = "0.4.3" + +[[deps.Gettext_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "9b02998aba7bf074d14de89f9d37ca24a1a0b046" +uuid = "78b55507-aeef-58d4-861c-77aaff3498b1" +version = "0.21.0+0" + +[[deps.Glib_jll]] +deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "a32d672ac2c967f3deb8a81d828afc739c838a06" +uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" +version = "2.68.3+2" + +[[deps.Graphite2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "344bf40dcab1073aca04aa0df4fb092f920e4011" +uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" +version = "1.3.14+0" + +[[deps.Grisu]] +git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" +uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" +version = "1.0.2" + +[[deps.HTTP]] +deps = ["Base64", "CodecZlib", "Dates", "IniFile", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "f0956f8d42a92816d2bf062f8a6a6a0ad7f9b937" +uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" +version = "1.2.1" + +[[deps.HarfBuzz_jll]] +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] +git-tree-sha1 = "129acf094d168394e80ee1dc4bc06ec835e510a3" +uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" +version = "2.8.1+1" + +[[deps.HypergeometricFunctions]] +deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions", "Test"] +git-tree-sha1 = "709d864e3ed6e3545230601f94e11ebc65994641" +uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" +version = "0.3.11" + +[[deps.Hyperscript]] +deps = ["Test"] +git-tree-sha1 = "8d511d5b81240fc8e6802386302675bdf47737b9" +uuid = "47d2ed2b-36de-50cf-bf87-49c2cf4b8b91" +version = "0.0.4" + +[[deps.HypertextLiteral]] +deps = ["Tricks"] +git-tree-sha1 = "c47c5fa4c5308f27ccaac35504858d8914e102f9" +uuid = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2" +version = "0.9.4" + +[[deps.IOCapture]] +deps = ["Logging", "Random"] +git-tree-sha1 = "f7be53659ab06ddc986428d3a9dcc95f6fa6705a" +uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" +version = "0.2.2" + +[[deps.IniFile]] +git-tree-sha1 = "f550e6e32074c939295eb5ea6de31849ac2c9625" +uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f" +version = "0.5.1" + +[[deps.IntelOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "d979e54b71da82f3a65b62553da4fc3d18c9004c" +uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" +version = "2018.0.3+2" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[deps.Interpolations]] +deps = ["Adapt", "AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "Requires", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"] +git-tree-sha1 = "64f138f9453a018c8f3562e7bae54edc059af249" +uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" +version = "0.14.4" + +[[deps.InverseFunctions]] +deps = ["Test"] +git-tree-sha1 = "b3364212fb5d870f724876ffcd34dd8ec6d98918" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.7" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "7fd44fd4ff43fc60815f8e764c0f352b83c49151" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.1.1" + +[[deps.IterTools]] +git-tree-sha1 = "fa6287a4469f5e048d763df38279ee729fbd44e5" +uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" +version = "1.4.0" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLLWrappers]] +deps = ["Preferences"] +git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.4.1" + +[[deps.JSON]] +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "3c837543ddb02250ef42f4738347454f95079d4e" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.21.3" + +[[deps.JpegTurbo_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b53380851c6e6664204efb2e62cd24fa5c47e4ba" +uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" +version = "2.1.2+0" + +[[deps.KernelDensity]] +deps = ["Distributions", "DocStringExtensions", "FFTW", "Interpolations", "StatsBase"] +git-tree-sha1 = "9816b296736292a80b9a3200eb7fbb57aaa3917a" +uuid = "5ab0869b-81aa-558d-bb23-cbf5423bbe9b" +version = "0.6.5" + +[[deps.LAME_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "f6250b16881adf048549549fba48b1161acdac8c" +uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" +version = "3.100.1+0" + +[[deps.LERC_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" +uuid = "88015f11-f218-50d7-93a8-a6af411a945d" +version = "3.0.0+1" + +[[deps.LZO_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e5b909bcf985c5e2605737d2ce278ed791b89be6" +uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" +version = "2.10.1+0" + +[[deps.LaTeXStrings]] +git-tree-sha1 = "f2355693d6778a178ade15952b7ac47a4ff97996" +uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +version = "1.3.0" + +[[deps.Latexify]] +deps = ["Formatting", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "Printf", "Requires"] +git-tree-sha1 = "1a43be956d433b5d0321197150c2f94e16c0aaa0" +uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" +version = "0.15.16" + +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" + +[[deps.LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" +version = "0.6.3" + +[[deps.LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" +version = "7.84.0+0" + +[[deps.LibGit2]] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[deps.LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" +version = "1.10.2+0" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[deps.Libffi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "0b4a5d71f3e5200a7dff793393e09dfc2d874290" +uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" +version = "3.2.2+1" + +[[deps.Libgcrypt_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"] +git-tree-sha1 = "64613c82a59c120435c067c2b809fc61cf5166ae" +uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" +version = "1.8.7+0" + +[[deps.Libglvnd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"] +git-tree-sha1 = "7739f837d6447403596a75d19ed01fd08d6f56bf" +uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" +version = "1.3.0+3" + +[[deps.Libgpg_error_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "c333716e46366857753e273ce6a69ee0945a6db9" +uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" +version = "1.42.0+0" + +[[deps.Libiconv_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "42b62845d70a619f063a7da093d995ec8e15e778" +uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" +version = "1.16.1+1" + +[[deps.Libmount_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "9c30530bf0effd46e15e0fdcf2b8636e78cbbd73" +uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" +version = "2.35.0+0" + +[[deps.Libtiff_jll]] +deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "Pkg", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "3eb79b0ca5764d4799c06699573fd8f533259713" +uuid = "89763e89-9b03-5906-acba-b20f662cd828" +version = "4.4.0+0" + +[[deps.Libuuid_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "7f3efec06033682db852f8b3bc3c1d2b0a0ab066" +uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" +version = "2.36.0+0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[deps.LogExpFunctions]] +deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "361c2b088575b07946508f135ac556751240091c" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.17" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "5d4d2d9904227b8bd66386c1138cf4d5ffa826bf" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "0.4.9" + +[[deps.MKL_jll]] +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] +git-tree-sha1 = "e595b205efd49508358f7dc670a940c790204629" +uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" +version = "2022.0.0+0" + +[[deps.MacroTools]] +deps = ["Markdown", "Random"] +git-tree-sha1 = "3d3e902b31198a27340d0bf00d6ac452866021cf" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.9" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[deps.MbedTLS]] +deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "Random", "Sockets"] +git-tree-sha1 = "d9ab10da9de748859a7780338e1d6566993d1f25" +uuid = "739be429-bea8-5141-9913-cc70e7f3736d" +version = "1.1.3" + +[[deps.MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +version = "2.28.0+0" + +[[deps.Measures]] +git-tree-sha1 = "e498ddeee6f9fdb4551ce855a46f54dbd900245f" +uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" +version = "0.3.1" + +[[deps.Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "bf210ce90b6c9eed32d25dbcae1ebc565df2687f" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "1.0.2" + +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[deps.MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" +version = "2022.2.1" + +[[deps.MultivariateStats]] +deps = ["Arpack", "LinearAlgebra", "SparseArrays", "Statistics", "StatsBase"] +git-tree-sha1 = "6d019f5a0465522bbfdd68ecfad7f86b535d6935" +uuid = "6f286f6a-111f-5878-ab1e-185364afe411" +version = "0.9.0" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "a7c3d1da1189a1c2fe843a3bfa04d18d20eb3211" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.0.1" + +[[deps.NearestNeighbors]] +deps = ["Distances", "StaticArrays"] +git-tree-sha1 = "0e353ed734b1747fc20cd4cba0edd9ac027eff6a" +uuid = "b8a86587-4115-5ab1-83bc-aa920d37bbce" +version = "0.4.11" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" +version = "1.2.0" + +[[deps.Observables]] +git-tree-sha1 = "dfd8d34871bc3ad08cd16026c1828e271d554db9" +uuid = "510215fc-4207-5dde-b226-833fc4488ee2" +version = "0.5.1" + +[[deps.OffsetArrays]] +deps = ["Adapt"] +git-tree-sha1 = "1ea784113a6aa054c5ebd95945fa5e52c2f378e7" +uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +version = "1.12.7" + +[[deps.Ogg_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "887579a3eb005446d514ab7aeac5d1d027658b8f" +uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" +version = "1.3.5+1" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.20+0" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+0" + +[[deps.OpenSSL_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e60321e3f2616584ff98f0a4f18d98ae6f89bbb3" +uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" +version = "1.1.17+0" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.5+0" + +[[deps.Opus_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "51a08fb14ec28da2ec7a927c4337e4332c2a4720" +uuid = "91d4177d-7536-5919-b921-800302f37372" +version = "1.3.2+0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.4.1" + +[[deps.PCRE_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b2a7af664e098055a7529ad1a900ded962bca488" +uuid = "2f80f16e-611a-54ab-bc61-aa92de5b98fc" +version = "8.44.0+0" + +[[deps.PDMats]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "cf494dca75a69712a72b80bc48f59dcf3dea63ec" +uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" +version = "0.11.16" + +[[deps.Parsers]] +deps = ["Dates"] +git-tree-sha1 = "0044b23da09b5608b4ecacb4e5e6c6332f833a7e" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "2.3.2" + +[[deps.Pixman_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b4f5d02549a10e20780a24fce72bea96b6329e29" +uuid = "30392449-352a-5448-841d-b1acce4e97dc" +version = "0.40.1+0" + +[[deps.Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +version = "1.8.0" + +[[deps.PlotThemes]] +deps = ["PlotUtils", "Statistics"] +git-tree-sha1 = "8162b2f8547bc23876edd0c5181b27702ae58dce" +uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a" +version = "3.0.0" + +[[deps.PlotUtils]] +deps = ["ColorSchemes", "Colors", "Dates", "Printf", "Random", "Reexport", "Statistics"] +git-tree-sha1 = "9888e59493658e476d3073f1ce24348bdc086660" +uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" +version = "1.3.0" + +[[deps.Plots]] +deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "GeometryBasics", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs", "UnicodeFun", "Unzip"] +git-tree-sha1 = "a19652399f43938413340b2068e11e55caa46b65" +uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" +version = "1.31.7" + +[[deps.PlutoUI]] +deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "Markdown", "Random", "Reexport", "UUIDs"] +git-tree-sha1 = "8d1f54886b9037091edf146b517989fc4a09efec" +uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" +version = "0.7.39" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.3.0" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[deps.Qt5Base_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "xkbcommon_jll"] +git-tree-sha1 = "c6c0f690d0cc7caddb74cef7aa847b824a16b256" +uuid = "ea2cea3b-5b76-57ae-a6ef-0a8af62496e1" +version = "5.15.3+1" + +[[deps.QuadGK]] +deps = ["DataStructures", "LinearAlgebra"] +git-tree-sha1 = "78aadffb3efd2155af139781b8a8df1ef279ea39" +uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" +version = "2.4.2" + +[[deps.REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[deps.Random]] +deps = ["SHA", "Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[deps.Ratios]] +deps = ["Requires"] +git-tree-sha1 = "dc84268fe0e3335a62e315a3a7cf2afa7178a734" +uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439" +version = "0.4.3" + +[[deps.RecipesBase]] +git-tree-sha1 = "6bf3f380ff52ce0832ddd3a2a7b9538ed1bcca7d" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.2.1" + +[[deps.RecipesPipeline]] +deps = ["Dates", "NaNMath", "PlotUtils", "RecipesBase"] +git-tree-sha1 = "e7eac76a958f8664f2718508435d058168c7953d" +uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" +version = "0.6.3" + +[[deps.Reexport]] +git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.2.2" + +[[deps.RelocatableFolders]] +deps = ["SHA", "Scratch"] +git-tree-sha1 = "22c5201127d7b243b9ee1de3b43c408879dff60f" +uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" +version = "0.3.0" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.0" + +[[deps.Rmath]] +deps = ["Random", "Rmath_jll"] +git-tree-sha1 = "bf3188feca147ce108c76ad82c2792c57abe7b1f" +uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" +version = "0.7.0" + +[[deps.Rmath_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "68db32dff12bb6127bac73c209881191bf0efbb7" +uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" +version = "0.3.0+0" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.Scratch]] +deps = ["Dates"] +git-tree-sha1 = "f94f779c94e58bf9ea243e77a37e16d9de9126bd" +uuid = "6c6a2e73-6563-6170-7368-637461726353" +version = "1.1.1" + +[[deps.SentinelArrays]] +deps = ["Dates", "Random"] +git-tree-sha1 = "db8481cf5d6278a121184809e9eb1628943c7704" +uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" +version = "1.3.13" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[deps.SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[deps.Showoff]] +deps = ["Dates", "Grisu"] +git-tree-sha1 = "91eddf657aca81df9ae6ceb20b959ae5653ad1de" +uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f" +version = "1.0.3" + +[[deps.SimpleBufferStream]] +git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1" +uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" +version = "1.1.0" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[deps.SortingAlgorithms]] +deps = ["DataStructures"] +git-tree-sha1 = "b3363d7460f7d098ca0912c69b082f75625d7508" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "1.0.1" + +[[deps.SparseArrays]] +deps = ["LinearAlgebra", "Random"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + +[[deps.SpecialFunctions]] +deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "d75bda01f8c31ebb72df80a46c88b25d1c79c56d" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.1.7" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "Random", "StaticArraysCore", "Statistics"] +git-tree-sha1 = "2d4e51cfad63d2d34acde558027acbc66700349b" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.5.3" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "66fe9eb253f910fe8cf161953880cfdaef01cdf0" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.0.1" + +[[deps.Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.StatsAPI]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "f9af7f195fb13589dd2e2d57fdb401717d2eb1f6" +uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +version = "1.5.0" + +[[deps.StatsBase]] +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "d1bf48bfcc554a3761a133fe3a9bb01488e06916" +uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +version = "0.33.21" + +[[deps.StatsFuns]] +deps = ["ChainRulesCore", "HypergeometricFunctions", "InverseFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] +git-tree-sha1 = "5783b877201a82fc0014cbf381e7e6eb130473a4" +uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" +version = "1.0.1" + +[[deps.StatsPlots]] +deps = ["AbstractFFTs", "Clustering", "DataStructures", "DataValues", "Distributions", "Interpolations", "KernelDensity", "LinearAlgebra", "MultivariateStats", "Observables", "Plots", "RecipesBase", "RecipesPipeline", "Reexport", "StatsBase", "TableOperations", "Tables", "Widgets"] +git-tree-sha1 = "2b35ba790f1f823872dcf378a6d3c3b520092eac" +uuid = "f3b207a7-027a-5e70-b257-86293d7955fd" +version = "0.15.1" + +[[deps.StructArrays]] +deps = ["Adapt", "DataAPI", "StaticArrays", "Tables"] +git-tree-sha1 = "ec47fb6069c57f1cee2f67541bf8f23415146de7" +uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +version = "0.6.11" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.0" + +[[deps.TableOperations]] +deps = ["SentinelArrays", "Tables", "Test"] +git-tree-sha1 = "e383c87cf2a1dc41fa30c093b2a19877c83e1bc1" +uuid = "ab02a1b2-a7df-11e8-156e-fb1833f50b87" +version = "1.2.0" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits", "Test"] +git-tree-sha1 = "5ce79ce186cc678bbb5c5681ca3379d1ddae11a1" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.7.0" + +[[deps.Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" +version = "1.10.0" + +[[deps.TensorCore]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" +uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" +version = "0.1.1" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.TranscodingStreams]] +deps = ["Random", "Test"] +git-tree-sha1 = "216b95ea110b5972db65aa90f88d8d89dcb8851c" +uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +version = "0.9.6" + +[[deps.Tricks]] +git-tree-sha1 = "6bac775f2d42a611cdfcd1fb217ee719630c4175" +uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" +version = "0.1.6" + +[[deps.URIs]] +git-tree-sha1 = "e59ecc5a41b000fa94423a578d29290c7266fc10" +uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" +version = "1.4.0" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[deps.UnicodeFun]] +deps = ["REPL"] +git-tree-sha1 = "53915e50200959667e78a92a418594b428dffddf" +uuid = "1cfade01-22cf-5700-b092-accc4b62d6e1" +version = "0.4.1" + +[[deps.Unzip]] +git-tree-sha1 = "34db80951901073501137bdbc3d5a8e7bbd06670" +uuid = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" +version = "0.1.2" + +[[deps.Wayland_jll]] +deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "3e61f0b86f90dacb0bc0e73a0c5a83f6a8636e23" +uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" +version = "1.19.0+0" + +[[deps.Wayland_protocols_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4528479aa01ee1b3b4cd0e6faef0e04cf16466da" +uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91" +version = "1.25.0+0" + +[[deps.Widgets]] +deps = ["Colors", "Dates", "Observables", "OrderedCollections"] +git-tree-sha1 = "fcdae142c1cfc7d89de2d11e08721d0f2f86c98a" +uuid = "cc8bc4a8-27d6-5769-a93b-9d913e69aa62" +version = "0.6.6" + +[[deps.WoodburyMatrices]] +deps = ["LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "de67fa59e33ad156a590055375a30b23c40299d3" +uuid = "efce3f68-66dc-5838-9240-27a6d6f5f9b6" +version = "0.5.5" + +[[deps.XML2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "58443b63fb7e465a8a7210828c91c08b92132dff" +uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" +version = "2.9.14+0" + +[[deps.XSLT_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"] +git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" +uuid = "aed1982a-8fda-507f-9586-7b0439959a61" +version = "1.1.34+0" + +[[deps.Xorg_libX11_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] +git-tree-sha1 = "5be649d550f3f4b95308bf0183b82e2582876527" +uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" +version = "1.6.9+4" + +[[deps.Xorg_libXau_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4e490d5c960c314f33885790ed410ff3a94ce67e" +uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" +version = "1.0.9+4" + +[[deps.Xorg_libXcursor_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "12e0eb3bc634fa2080c1c37fccf56f7c22989afd" +uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" +version = "1.2.0+4" + +[[deps.Xorg_libXdmcp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4fe47bd2247248125c428978740e18a681372dd4" +uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" +version = "1.1.3+4" + +[[deps.Xorg_libXext_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "b7c0aa8c376b31e4852b360222848637f481f8c3" +uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" +version = "1.3.4+4" + +[[deps.Xorg_libXfixes_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "0e0dc7431e7a0587559f9294aeec269471c991a4" +uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" +version = "5.0.3+4" + +[[deps.Xorg_libXi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] +git-tree-sha1 = "89b52bc2160aadc84d707093930ef0bffa641246" +uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" +version = "1.7.10+4" + +[[deps.Xorg_libXinerama_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll"] +git-tree-sha1 = "26be8b1c342929259317d8b9f7b53bf2bb73b123" +uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" +version = "1.1.4+4" + +[[deps.Xorg_libXrandr_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "34cea83cb726fb58f325887bf0612c6b3fb17631" +uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" +version = "1.5.2+4" + +[[deps.Xorg_libXrender_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "19560f30fd49f4d4efbe7002a1037f8c43d43b96" +uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" +version = "0.9.10+4" + +[[deps.Xorg_libpthread_stubs_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "6783737e45d3c59a4a4c4091f5f88cdcf0908cbb" +uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" +version = "0.1.0+3" + +[[deps.Xorg_libxcb_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] +git-tree-sha1 = "daf17f441228e7a3833846cd048892861cff16d6" +uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" +version = "1.13.0+3" + +[[deps.Xorg_libxkbfile_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "926af861744212db0eb001d9e40b5d16292080b2" +uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" +version = "1.1.0+4" + +[[deps.Xorg_xcb_util_image_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "0fab0a40349ba1cba2c1da699243396ff8e94b97" +uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll"] +git-tree-sha1 = "e7fd7b2881fa2eaa72717420894d3938177862d1" +uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_keysyms_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "d1151e2c45a544f32441a567d1690e701ec89b00" +uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_renderutil_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "dfd7a8f38d4613b6a575253b3174dd991ca6183e" +uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e" +version = "0.3.9+1" + +[[deps.Xorg_xcb_util_wm_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "e78d10aab01a4a154142c5006ed44fd9e8e31b67" +uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361" +version = "0.4.1+1" + +[[deps.Xorg_xkbcomp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxkbfile_jll"] +git-tree-sha1 = "4bcbf660f6c2e714f87e960a171b119d06ee163b" +uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" +version = "1.4.2+4" + +[[deps.Xorg_xkeyboard_config_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xkbcomp_jll"] +git-tree-sha1 = "5c8424f8a67c3f2209646d4425f3d415fee5931d" +uuid = "33bec58e-1273-512f-9401-5d533626f822" +version = "2.27.0+4" + +[[deps.Xorg_xtrans_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "79c31e7844f6ecf779705fbc12146eb190b7d845" +uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" +version = "1.4.0+3" + +[[deps.Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.12+3" + +[[deps.Zstd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e45044cd873ded54b6a5bac0eb5c971392cf1927" +uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" +version = "1.5.2+0" + +[[deps.libaom_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3a2ea60308f0996d26f1e5354e10c24e9ef905d4" +uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" +version = "3.4.0+0" + +[[deps.libass_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "5982a94fcba20f02f42ace44b9894ee2b140fe47" +uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" +version = "0.15.1+0" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.1.1+0" + +[[deps.libfdk_aac_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "daacc84a041563f965be61859a36e17c4e4fcd55" +uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" +version = "2.0.2+0" + +[[deps.libpng_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "94d180a6d2b5e55e447e2d27a29ed04fe79eb30c" +uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" +version = "1.6.38+0" + +[[deps.libvorbis_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll", "Pkg"] +git-tree-sha1 = "b910cb81ef3fe6e78bf6acee440bda86fd6ae00c" +uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" +version = "1.3.7+1" + +[[deps.nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" +version = "1.48.0+0" + +[[deps.p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "17.4.0+0" + +[[deps.x264_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4fea590b89e6ec504593146bf8b988b2c00922b2" +uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a" +version = "2021.5.5+0" + +[[deps.x265_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "ee567a171cce03570d77ad3a43e90218e38937a9" +uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" +version = "3.5.0+0" + +[[deps.xkbcommon_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll", "Wayland_protocols_jll", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] +git-tree-sha1 = "9ebfc140cc56e8c2156a15ceac2f0302e327ac0a" +uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" +version = "1.4.1+0" +""" + +# ╔═╡ Cell order: +# ╠═69b19a54-1c79-11ed-2a22-ebe65ccbfcdb +# ╟─904c5f8d-e5a9-4f18-a7d7-b4561ad37655 +# ╟─5b4c3b01-bd19-4085-8a83-781086c85825 +# ╟─0c123e4e-e0ff-4c47-89d6-fdf514f9e9d0 +# ╟─f479a1f3-a008-4622-82f0-ab154a431a33 +# ╟─2dfafb7b-773a-4c51-92e7-1f192fa354ea +# ╟─e574a570-a76b-4ab2-a395-ca40dc383e5e +# ╟─9bb06170-34d0-4528-bd9b-988ecf952089 +# ╟─13cb967f-879e-49c2-b077-e9ac87569d87 +# ╟─0437436b-16b9-4c90-b554-f7cf5ea8b4c0 +# ╟─13f7968f-fde3-4204-8237-ab33a2a5cfd0 +# ╟─3c5b6566-6e4e-41df-9865-fff8a839a70e +# ╟─f10d3513-77ee-426a-aa5c-d2bf887572d9 +# ╟─8c6233e0-14fb-4202-92b9-3eddaea3e107 +# ╟─7fd2a003-bed6-45d4-8335-f8d4f149c8d8 +# ╟─754c5fe2-3899-4467-8fd4-828fb0ec5040 +# ╠═f5dfcd1f-9d10-49d1-b68b-eafdf10baaec +# ╟─2ba73fd3-ae2b-4347-863f-28e6c21e7a91 +# ╠═56e80a69-6f84-498d-b04e-5be59c1488eb +# ╟─65f0dc31-c2bd-464f-983a-9f4ca2c04a35 +# ╟─d2c3bd6d-fb8c-41df-8112-c7bfbc180b0a +# ╟─76c641dd-c790-4f51-abc0-e157c00e3ba7 +# ╟─cb3191ef-3b54-48ff-996c-d4993c876063 +# ╟─edbf5fa3-a064-47a4-9ff4-a93dbd7b9112 +# ╠═958d6028-e38f-4a56-a606-47b6f8ee86f1 +# ╟─59975c2b-c537-4950-aeea-985377f22d93 +# ╠═cb9ad8b5-7975-4d54-bb94-afc9f4953a67 +# ╟─03a650cb-7610-4d20-8ae7-2c6e308770f6 +# ╟─cb37f8a8-83aa-44f6-89a5-43fe0e4a5fa8 +# ╟─2d7792cd-5b32-4228-bfef-e1ab250724f3 +# ╟─7ccd4caf-ef8f-4b78-801f-b000f5aad430 +# ╟─87b411d1-a62f-4462-b81b-ef0e8ac97d7e +# ╟─58d7878a-f9d6-46b4-9ac4-1944f7508f03 +# ╟─3cdf9875-9c42-46b3-b88c-74e0f363bc4a +# ╟─3ca3ee53-c744-4474-a8da-6209ec5e6904 +# ╟─5cbace78-8a92-43aa-9d3a-45054be48532 +# ╟─2cb31d23-a542-4f8d-a056-025fa574f0d7 +# ╠═31afbad6-e447-44d2-94cf-c8f99c7fa64a +# ╟─de5c3254-1fbe-46ec-ab09-77889405510d +# ╠═ff49403c-8e0e-407e-8141-6ccf178c152b +# ╟─024ce64f-29ef-49f2-a66f-87c2d4eb67a7 +# ╟─52fd1028-05aa-4b37-b57c-daabf4d77f50 +# ╟─d6056188-9a46-4b5f-801b-e028b6eb0b7f +# ╟─bbbb73c8-0254-463a-8e81-5acdd08583ac +# ╟─546cfb29-6f60-44be-9450-b4d33c8238e6 +# ╟─2f2e3e34-76c0-4f35-8c9b-21184f86cf66 +# ╠═9732358b-f592-4c66-9d8a-fdc221249a56 +# ╟─9d737cc5-c533-4e86-8654-b1adba943fc0 +# ╟─1d7783bf-a8d0-47d6-812d-b31ae0c0b138 +# ╟─73bb12a3-db59-4e71-bf05-5a4b4e018f51 +# ╟─8eb641f0-a01f-43f9-a362-e7d54c26411a +# ╟─a06f8785-fbbc-4973-b3d0-5a6db967b3cc +# ╟─15b09064-2c48-4013-8a08-c32e32d1f4df +# ╟─5fc1d8aa-5835-4559-860b-b73031d3bfe7 +# ╠═da7f1485-a532-4d3c-96db-d1d50f2bdee6 +# ╟─ee8fce9a-0a5b-40c2-a4d9-f124b40188f4 +# ╟─d6341bf9-7a95-4a10-8a26-9495b724b907 +# ╟─0a8a5aae-3567-41a3-9f15-d07235d07da2 +# ╟─8fe3ed2f-e826-4faa-ace0-2286b944991f +# ╟─79b85624-a68d-41df-856a-7a7670ff4d0e +# ╟─7b4d6471-59f5-4167-bc35-a61549aaaef9 +# ╟─e9a87ae2-f906-4be9-a969-7b681c2cff7b +# ╠═ebdb9711-20cc-458c-9474-8e3ace69797e +# ╠═13fae558-d12e-4e27-b36f-ec59eabb65cf +# ╟─5bc82f81-1c49-47e3-b9c8-6c5b79b4e88a +# ╟─858d3a5f-053d-4282-83f7-ff33ad8b5f58 +# ╟─4c1f3725-ddfa-4a19-adaf-4b48ef47c79b +# ╟─461dd52d-478e-4b1e-b0e0-55ecb98d4022 +# ╟─97f2393d-d433-40b6-8189-61f0aace3760 +# ╟─c8c7d2d7-4971-4852-aff9-a0c85a0881b3 +# ╟─edf0f6ab-3ace-47b0-9b6f-26154859862b +# ╟─960ec68f-75bc-4543-b91c-c06b27e54926 +# ╟─1ee811d8-36f7-42b1-be50-c68ee9cabf23 +# ╟─83f3ee86-567b-4998-9216-2cca4bdaad0a +# ╟─9790024a-6cc8-47fe-892e-9ce32d7399a5 +# ╟─36ba6267-db0b-4147-b376-49106a15426f +# ╟─dd91becf-167e-40eb-83e1-d1f004eb5491 +# ╟─b035c02f-9362-4f8c-926c-71eefed7fbc5 +# ╟─2ca82ec8-5350-4d21-9738-487d4181bf73 +# ╠═dae0d74e-3f6d-4f5d-8ece-390a4e1a170a +# ╟─0864aa09-97b0-4421-b3be-2c621323503a +# ╟─058134b1-19b0-4f19-9508-e288e613b116 +# ╟─83bf58df-e2d0-4552-98b7-29ce0ce5fb5e +# ╠═a30e54cb-b843-428b-b2f0-f5cf84961ce0 +# ╠═2747567e-dcab-4a99-885f-5bb19a33ab27 +# ╠═bcfd15ba-807f-4886-86fd-3e8e8661a87b +# ╠═b640bef2-a58f-44ee-955e-586fd2c9ac11 +# ╠═7becd0a5-d391-4947-96ee-89b2ebed5759 +# ╟─00000000-0000-0000-0000-000000000001 +# ╟─00000000-0000-0000-0000-000000000002 diff --git a/section3_mcmc.jl b/section3_mcmc.jl index d5db7e4..747b025 100644 --- a/section3_mcmc.jl +++ b/section3_mcmc.jl @@ -24,7 +24,15 @@ TableOfContents() # ╔═╡ 70f5222b-aadf-4dc0-bc03-b1d10e7db8b6 md""" -# Bayesian computation with MCMC +# Bayesian inference with MCMC +""" + +# ╔═╡ 46af5470-afc8-47a8-a6c4-07de22105e91 +md""" +In this chapter, we introduce a technique called Markov Chain Monte Carlo (MCMC), which is arguably the most important algorithm for Bayesian inference. +In a nutshell, MCMC aims at computing the posterior distribution ``p(\theta|\mathcal{D})`` efficiently. Without it, most Bayesian computations cannot be finished in a realistic timeframe. Therefore, it is safe to say the algorithm is instrumental to the very success of the modern Bayesian method. + +In the following sections, we will first explain why the algorithm is needed for Bayesian inference. Different forms of MCMC algorithms, such as Metropolis-Hastings, Gibbs sampling, and Hamiltonian sampler, are introduced afterwards. The intuitions behind the algorithms are given higher priority than their theoretical buildups. From a Bayesian practitioner's perspective, it is probably more important to know how to use the algorithm in real-world analysis. Therefore, the practical aspects of the technique, such as MCMC diagnostic tools, are also explained in detail. """ # ╔═╡ f9584f19-9020-481d-93b2-8d52e8c4bdfc @@ -660,7 +668,7 @@ describe(chain_mh) # ╔═╡ e0e4f50c-52c0-4261-abae-3cf0399e04e0 md""" -# MCMC diagnosis +# MCMC diagonistics """ # ╔═╡ 81ce6e4c-ef48-4a07-9133-4414867c2b29 @@ -764,7 +772,7 @@ The figure below shows trace plots of four different chains with `ess=` 4.6, 49. # ╔═╡ 68c98e53-7ac3-4832-a7dd-97459a89d7cb md""" -# Other MCMC samplers* +# Other MCMC samplers """ # ╔═╡ 5f1f12b2-5b63-416e-a459-9b5d0e37b0e8 @@ -1223,7 +1231,8 @@ end # ╔═╡ cca21050-aa12-4bb7-bcb1-918d94aa0bec begin - corner(chain_mh) + # for cleaner visualisation, plot with 1000 samples + corner(sample(chain_mh,1000), size=(400,400)) end # ╔═╡ be3c585b-425b-4995-b2bc-ae7bb33d6bad @@ -1324,7 +1333,7 @@ gif(anim, fps= 10) -end +end; # ╔═╡ cf968e52-7518-40b0-af57-1f552c41dc07 begin @@ -1576,7 +1585,7 @@ gif(anim, fps= 10) -end +end; # ╔═╡ 3bf64dd1-c44e-4499-9c15-3c4725554ef1 begin @@ -3340,6 +3349,7 @@ version = "0.9.1+5" # ╟─ce716e92-0c3c-11ed-364f-2f8266fa10f2 # ╟─8daf0123-b22e-4cda-8eec-7cad3484c8e0 # ╟─70f5222b-aadf-4dc0-bc03-b1d10e7db8b6 +# ╟─46af5470-afc8-47a8-a6c4-07de22105e91 # ╟─f9584f19-9020-481d-93b2-8d52e8c4bdfc # ╟─4e93aa8d-00d8-4677-8e06-0032a0634a5a # ╟─e0dcfd8c-2415-4c4f-b254-5f9f52cf8ebf @@ -3398,7 +3408,7 @@ version = "0.9.1+5" # ╟─52b29fcc-c534-4bba-866a-e7622c5a5e11 # ╟─55ed9e58-7feb-4dbc-b807-05796a02fc62 # ╟─2c06c3f1-11e6-4191-b505-080342a9b787 -# ╠═cca21050-aa12-4bb7-bcb1-918d94aa0bec +# ╟─cca21050-aa12-4bb7-bcb1-918d94aa0bec # ╟─17a4d60b-7181-4268-866c-ddbde37dc349 # ╟─45eb8c7b-5f17-43ac-b412-0f3ced44a018 # ╠═be3c585b-425b-4995-b2bc-ae7bb33d6bad @@ -3471,8 +3481,8 @@ version = "0.9.1+5" # ╟─6a9863cb-3067-4250-ad89-6a1c8dc1fddc # ╟─ca2662a9-2754-45c1-9ce8-5b8599eef240 # ╟─9375f800-7c4b-4cae-b263-f17198b04011 -# ╠═280069b8-f9fe-4cd6-866d-a20b9eab036e -# ╠═0138dedf-f874-4bbd-bf87-7f6bbe8ca816 +# ╟─280069b8-f9fe-4cd6-866d-a20b9eab036e +# ╟─0138dedf-f874-4bbd-bf87-7f6bbe8ca816 # ╠═af617b31-396f-465e-b27e-2fa14b3b2423 # ╟─18ebc039-1656-4f74-8e9f-f03a8d39d7c4 # ╠═88696ab1-2866-46f1-978e-bd032566cef7 diff --git a/section4_turing.jl b/section4_turing.jl new file mode 100644 index 0000000..01c1241 --- /dev/null +++ b/section4_turing.jl @@ -0,0 +1,2430 @@ +### A Pluto.jl notebook ### +# v0.19.11 + +using Markdown +using InteractiveUtils + +# ╔═╡ 68018998-17d7-11ed-2d5e-2b2d5f8b0301 +begin + using PlutoUI + using StatsPlots + using Turing + using Random + using LaTeXStrings + using HypertextLiteral + using Logging; +end; + +# ╔═╡ ec23cd37-94df-489f-b892-24bffd755b50 +Logging.disable_logging(Logging.Warn); + +# ╔═╡ a89d9509-7564-4b6e-bba6-0de1f3f7d64e +TableOfContents() + +# ╔═╡ 82b6f501-bada-4bf3-a7a7-c325bc48e754 +md""" + +# Bayesian inference with `Turing.jl` +""" + +# ╔═╡ 4b2fc478-b825-4758-b384-d7b7186b8e21 +md""" + +In the previous chapters, we have introduced some basic concepts of Bayesian inference and MCMC samplers. In a nutshell, Bayesian inference requires a full generative model which includes both prior assumptions for the unknown and the likelihood function for the observed. After the modelling step, efficient algorithms, such as MCMC, are used to compute the posterior distribution. + +So far, we have implemented all of the Bayesian models and their inference algorithms manually. Writing programs from scratch require prior programming experience and effort. Therefore, starting everything from scratch is not practical for general applied practitioners. + +Fortunately, with the help of probabilistic programming languages (PPL), such as `Turing.jl` or `Stan`, one can do Bayesian inferences easily without worrying too much about the technical details. A PPL is a programming language to specify and infer general-purpose probabilistic models. They provide a high-level and intuitive-to-use way of specifying Bayesian models. Moreover, a PPL unifies the modelling and computation blocks. Bayesian computations, such as MCMC, can be (almost) carried out automatically once a model is specified. + +In this chapter, we are going to learn how to use `Turing.jl`, a popular PPL implemented in Julia, to run Bayesian inferences. `Turing.jl` is very easy to use. The user writes Turing models in the same way as they would write on their paper, which makes it intuitive to use. Together with other helper packages, such as `MCMCChains.jl` (for MCMC chain summary) and `Plots.jl` (for visualisation), the packages provide an ecosystem to do full Bayesian inference. + +""" + +# ╔═╡ 67d93f23-899b-4ddf-83f1-5d320c23f22f +md""" + +## Install Julia and `Turing.jl` + + +Install Julia (1.8 over greater) +* If you have not yet done so, download and install Julia by following the instructions at [https://julialang.org/downloads/](https://julialang.org/downloads/). +* Choose either the latest stable version (v1.8) or long-term support version v1.6 + +Add relevant packages by using Julia's package manager +* Step 1: Open the Julia Command-Line + * either by double-clicking the Julia executable or + * running Julia from the command line +And you should see a command line interface like this + +``` +$ julia + _ + _ _ _(_)_ | Documentation: https://docs.julialang.org + (_) | (_) (_) | + _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help. + | | | | | | |/ _` | | + | | |_| | | | (_| | | Version 1.8.0 (2022-08-17) + _/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release +|__/ | + +julia> +``` + + +* Step 2: Install `Turing.jl` (and other packages if needed) by using Julia's package manager +```juliarepl +julia> Using Pkg +julia> Pkg.add("Turing") +``` + +* Step 3: you can now add `Turing` and start using it with the command line interface (not recommended; check Pluto's instructions below for details) + +```juliarepl +julia> add Turing +``` + +""" + +# ╔═╡ b2980969-462c-44fe-bb66-fb5d968fc5f6 +md""" + +### Run `Turing` models with Pluto +It is recommended that you run `Turing` models in your browser rather than Julia's REPL command line interface. + +* Step 1: Install `Pluto.jl`; +```juliarepl +julia> Using Pkg +julia> Pkg.add("Pluto") +``` + + +* Step 2: Use Pluto +```juliarepl +julia> using Pluto +julia> Pluto.run() +``` + +* Step 3: To get started, you can either run this notebook (recommended) or start your own new notebook + * if you start a new notebook, you need to add `Turing` and `StatsPlots` packages first in a cell of your notebook (**not** in REPL but in the Pluto notebook) + * then check the notes below for further details. +``` +begin + using Pluto, StatsPlots +end +``` +""" + +# ╔═╡ aaeb3a9d-d655-427d-a397-62cab819e346 +md""" +## `Turing.jl` basics + +""" + +# ╔═╡ d4a8b997-5dff-49b1-aa09-017051405790 +md""" + +### Model specification + +In a nutshell, a model in Turing is implemented as a Julia function wrapped with a `@model` macro. Intuitively, the macro rewrites the wrapped Julia function to a probabilistic model such that downstream model operations can be carried out. + +A general Turing model is listed below: + +```julia +@model function my_model(data) + ... + # random variable `θ` with prior distribution `prior_dist` + θ ~ prior_dist + ... + # optional deterministic transformations + ϕ = fun(θ) + ... + + # observation `data` with likelihood distribution `likelihood_dist` + data ~ likelihood_dist + ... +end +``` + +Two important constructs of `Turing.jl` are + +* macro "`@model`": a macro that rewrites a Julia function to a probabilistic program that can be inferred later on; all model assumptions are encapsulated within the macro + +* operator "`~`": the tilde operator is used to specify a variable that follows some probability distribution: e.g. + > ```θ ~ Beta(1,1); data ~ Bernoulli(θ)``` + * where we assume `data` is a random draw from a Bernoulli with bias `θ`; and the bias `θ` follows a flat Beta prior + * check [`Distributions.jl`](https://juliastats.org/Distributions.jl/stable/starting/) for available probability distributions and their interfaces. + + +A Turing model can be specified with arbitrary Julia code. For example, +* `for, while` loop: can be used to specify some repeated distribution assumptions, + * convenient for `i.i.d` assumption for the observed the data + +* `=` assignment: can be used to assign a deterministic value to a variable; e.g. + > ```μ = 0; data ~ Normal(μ, 1)``` + * a Gaussian distribution with a fixed mean of 1 + * note `=` is different from `~` operator; `~` is used to specify a distribution assumption for a random variable; `=` is a deterministic non-random assignment + +""" + +# ╔═╡ 0e5f3c06-8e3e-4b66-a42e-78a1db358987 +md""" +### Inference + +Recall that MCMC provides us with a general and scalable method to draw samples from the posterior distribution which usually cannot be computed exactly: + +$$\theta^{(r)} \sim p(\theta|\mathcal D)$$ + +Instead of writing one's own MCMC algorithms, `Turing.jl` provides an easy-to-use interface: `sample()`: + + +```julia +chain = sample(model, mcmc_algorithm, mc; + discard_initial = 100, + thinning=10, + chain_type=Chains + ) + +``` + +The first three compulsory arguments are +* `model`: a Turing model should be the first argument, e.g. `cf_model` +* `mcmc_algorithm`: can be one of the available MCMC samplers, such as a Hamiltonian sampler with a certain step length and size: `HMC(0.05, 10)`; or HMC's more user-friendly extension No-U-turn sampler: `NUTS()` (which automatically choose the step size and length) +* `mc`: how many MCMC samples to draw, e.g. `3000` + +The optional arguments (by Julia's convention optional arguments are specified after `;`) are +* `discard_initial`: discard the specified number of samples as burn-in +* `thinning`: thin the chain to reduce temporal correlations between MCMC iterations +* `chain_type`: return the sample as an object of `Chains` of `MCMCChains.jl`; + +""" + +# ╔═╡ 45a74e6a-ae59-49bd-8b41-ee1c73153f15 +md""" + +**Run multiple chains in parallel.** To make use of modern computers' parallel processing power, we usually simulate multiple chains in parallel. One can also simulate multiple MCMC chains in parallel by calling + +```julia +sample(model, mcmc_algorithm, parallel_type, n, n_chains) +``` + +where + +* `parallel_type` can be e.g. `MCMCThreads()` +* `n_chains` is the number of parallel chains to simulate at the same time +""" + +# ╔═╡ 8fbef2d5-9591-46fc-a35e-f44a0d492748 +md""" + +### [Auto-differentiation](https://turing.ml/dev/docs/using-turing/autodiff) backend +""" + +# ╔═╡ c8863691-ffdc-4629-b0b6-acd61d6d905f +md""" + +Some MCMC algorithms such as Hamiltonian Monte Carlo (HMC) or No-U-Turn sampler (NUTS) require the gradient of the log probability density functions. + +As shown in chapter 3, packages such as `ForwardDiff.jl` can automatically differentiate a Julia program. With the auto-differentiation (AD) packages serving as backends, `Turing` can compute the gradient automatically. Different backends and algorithms supported in `Turing.jl` include: +- [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl): forward-mode AD, the default backend +- [Tracker.jl](https://github.com/JuliaDiff/Tracker.jl): reverse-mode AD +- [ReverseDiff.jl](https://github.com/JuliaDiff/ReverseDiff.jl): reverse-mode AD, has to be loaded explicitly (optional cache for some models) +- [Zygote.jl](https://github.com/JuliaDiff/Zygote.jl): reverse-mode AD, has to be loaded explicitly +""" + +# ╔═╡ fefbf8e9-8920-4555-87bc-daf2e2a231f1 +md""" +By default, `Turing` uses `ForwardDiff`. One can change the AD backend by `setadbackend(:backend)`, e.g. `setadbackend(:forwarddiff)`, `setadbackend(:tracker)`, `setadbackend(:reversediff)`, or `setadbackend(:zygote)`. + +As a rule of thumb, use forward-mode AD for models with few parameters (say less than 50) and reverse-mode AD for models with many parameters. If you use reverse-mode AD, in particular with Tracker or Zygote, you should avoid + loops and use vectorized operations. +""" + +# ╔═╡ f56ea0d7-c4e8-469e-9863-adc2d9c917be +md""" + +## Coin-flipping revisited + +Recall the coin-flipping problem in chapter one. + +> A coin 🪙 is tossed 10 times. And the tossing results are recorded: +> $$\mathcal D=\{1, 1, 1, 0, 1, 0, 1, 1, 1, 0\}$$; +> i.e. seven out of the ten tosses are heads (ones). Is the coin **fair**? + +""" + +# ╔═╡ a86ed206-aed8-40b4-89aa-1abf0d16fbb2 +md""" + + +**Bayesian conjugate model** +The Bayesian model starts with a generation process for the unknown (or prior) and then the model for the observed data (the likelihood). + +1. prior for the bias ``\theta``: + +```math +\theta \sim \texttt{Beta}(a_0, b_0); +``` + +2. then a total 10 coin tosses are drawn from the coin with the bias ``\theta``. for ``n = 1,\ldots, 10`` + +```math +d_n \sim \texttt{Bernoulli}(\theta). +``` + +""" + +# ╔═╡ b49725d0-8239-4129-b0d6-982f998be91f +md""" +### Inference with `Turing.jl` + +""" + +# ╔═╡ ecf86444-1565-406c-8aa2-275ee3a44fae +md""" + +**Model specification:** The coin-flipping model can be specified by `Turing.jl` as + +""" + + +# ╔═╡ a2b84c25-bf58-411d-893b-48c8384cae04 +@model function coin_flipping(data; a₀=1.0, b₀=1.0) + # Our prior belief about the probability of heads in a coin toss. + θ ~ Beta(a₀, b₀) + + # each observation in `data` is an independent draw from the coin, which is Bernoulli distributed + for i in eachindex(data) + data[i] ~ Bernoulli(θ) + end +end; + +# ╔═╡ f2dd09fa-9204-4f1e-80da-2f1bb185b3a8 +md""" +In the above model, +* `a₀, b₀` (of the prior's parameters) are treated as input parameters to allow some flexibility +* `for` loop is used to repeatedly specify the independent tosses; `data` here is assumed to be an array of tossing realisations (of `true` or `false`) + + +To realise a concrete model for our problem, we only need to create ``\mathcal D`` as the required array and feed it into the Turing model. + +""" + +# ╔═╡ 77a9ca64-87ad-465c-bec7-fe406145de40 +begin + # create the data as observed + coin_flipping_data = [true, true, true, false, true, false, true, true, true, false] + # create the model by feeding the data as observed + cf_model = coin_flipping(coin_flipping_data; a₀=1.0, b₀=1.0) +end; + +# ╔═╡ 139a1d54-b018-4de4-9a9f-ec9cf429b3a1 +md""" + +**Inference:** To infer the model, we run a MCMC algorithm to sample from the posterior + +* all random variables specified with `~` (except the observed `data`) will be sampled in the MCMC algorithm + +For example, the following command can be used to draw 2000 samples with a HMC sampler. +""" + +# ╔═╡ 7d13ddd9-fb5f-4843-b1d5-176d505acd57 +begin + Random.seed!(100) + cf_chain = sample(cf_model, HMC(0.05, 20), MCMCThreads(), 2000, 3; discard_initial = 1000) +end; + +# ╔═╡ a2278d07-f857-4910-afa8-bf484ef0dc10 +md""" + +In particular, the HMC sampler has + * a step length of the Leapfrog: ``\epsilon = 0.05`` + * and Leapfrog algorithm's step count: ``{T}=20`` +""" + +# ╔═╡ 400b77d6-dc69-4ea9-ab45-5daeaa6e4bcc +md"""**Use other MCMC samplers:** A more convenient sampling choice is No-U-Turn (NUTS) sampler [^1]: + +```julia +sample(cf_model, NUTS(0.65), 2000; discard_initial = 500); +``` +NUTS is a user-friendly extension of HMC +* where Hamiltonian dynamics' parameters are automatically tuned + * such that a pre-specified `accept_rate` is achieved (an acceptance rate around 0.65 is recommended) +* user does not need to manually set the HMC's parameters + + +Similarly, one may also choose Metropolis-Hastings: +```julia +sample(cf_model, MH(), 2000; discard_initial = 500); +``` +However, HMC and NUTS are the go-to choices due to their better sampling efficiency. Check chapter 2 for a comparison between the samplers. +""" + +# ╔═╡ 9f119bba-fbd2-4c3a-93c2-22567c781e5f +md""" + +**Chain diagnostics:** We should always check the quality of the chain before proceeding to report the findings. + + +In particular, we need to visually inspect the trace plot to spot any potential divergence. The following command shows the chain trace against the MCMC iterations. The chain seems to mix well (check chapter 2 for more details about visual inspection). + +""" + +# ╔═╡ 4bb24996-24d0-4910-9996-83f0b34a005f +plot(cf_chain) + +# ╔═╡ 6f7ecf38-3017-408e-9a8a-6d218bddc2d1 +md""" + +We can also check chain diagnostic statistics such as +* `rhat` ``\approx 0.99``; as a rule of thumb `rhat` should be smaller than 1.01 +* `ess` ``\approx 1920``; (essential sample size) signals efficiency of the sampler + +Both statistics show the sampler has mixed well. +""" + +# ╔═╡ 4e9ac22f-a895-4d87-b1a9-2cd8a6da83fb +describe(cf_chain) + +# ╔═╡ 5cd3314b-dff2-478f-9a1a-73545b26f797 +md""" + +### Compare with the exact posterior + +For this toy example, we know the posterior distribution exactly: + +$$p(\theta|\mathcal D) = \texttt{Beta}(8,4).$$ + +Therefore, we can compare the performance between the exact posterior and the approximating distribution returned by `Turing.jl`. The following plot shows the comparison. It can be observed that Turing has done a very good job at approximating the posterior. + +Recall that one can use `density()` to plot the density of an MCMC chain. +""" + +# ╔═╡ 5678e483-1292-440d-83de-462cd249c511 +let + plot(Beta(8,4), fill=true, alpha=0.5, lw=2, label=L"\texttt{Beta}(8,4)") + density!(cf_chain, xlim=[0,1], legend=:topleft, w=2) +end + +# ╔═╡ 7c6e1185-4fe4-4d2b-9b0a-f6268a75b682 +md""" +## Seven scientists re-visited + + +""" + +# ╔═╡ acbc4dcc-3352-4de0-a145-d4aa51975036 +md""" + +Recall the seven-scientist problem which was introduced in chapter 2. +!!! question "Seven scientist problem" + [*The question is adapted from [^1]*] Seven scientists (A, B, C, D, E, F, G) with widely-differing experimental skills measure some signal ``\mu``. You expect some of them to do accurate work (i.e. to have small observation variance ``\sigma^2``, and some of them to turn in wildly inaccurate answers (i.e. to have enormous measurement error). What is the unknown signal ``\mu``? + + The seven measurements are: + + | Scientists | A | B | C | D | E | F | G | + | -----------| ---|---|---|--- | ---|---|---| + | ``d_n`` | -27.020| 3.570| 8.191| 9.898| 9.603| 9.945| 10.056| +""" + +# ╔═╡ f06c5735-6a4a-4a91-8517-ec57a674225a +begin + scientist_data = [-27.020, 3.57, 8.191, 9.898, 9.603, 9.945, 10.056] + μ̄ = mean(scientist_data) +end; + +# ╔═╡ 782e9234-c02b-4abb-a72f-110d2fcabc33 +let + ylocations = range(0, 2, length=7) .+ 0.5 + plt = plot(ylim = [0., 3.0], xminorticks =5, xlabel=L"d", yticks=false, showaxis=:x, size=(620,250)) + scientists = 'A':'G' + δ = 0.1 + for i in 1:7 + plot!([scientist_data[i]], [ylocations[i]], label="", markershape =:circle, markersize=5, markerstrokewidth=1, st=:sticks, c=1) + annotate!([scientist_data[i]].+7*(-1)^i * δ, [ylocations[i]].+ δ, scientists[i], 8) + end + vline!([μ̄], lw=2, ls=:dash, label="sample mean", legend=:topleft) + plt +end + +# ╔═╡ a662232b-524b-4918-93e9-204ab908a14d +md""" + +### Inference with `Turing.jl` +To reflect the fact that each scientist has different experimental skills, we modify the usual i.i.d. assumption for the data. In chapter 2, we assume each observation is an independent realisation of the signal plus some subject-specific observation noise. That is each scientist makes observations with his/her noise level ``\sigma^2_n`` for ``n = 1,2,\ldots, 7``. + +Here we make a small adjustment to the above assumption. Instead of assuming 7 different levels of skill, we assume scientists A and B have a similar level of skill whereas scientists C, D, E, F, and G are another group with better measurement skills. We have reduced the number of observation noise parameters from 7 to 2. + +The proposed Bayesian model becomes: +```math +\begin{align} +\text{prior}: \mu &\sim \mathcal N(m_0=0, v_0=10000)\\ +\lambda_1 &\sim \texttt{Gamma}(a_0=0.5, b_0=0.5)\\ +\lambda_2 &\sim \texttt{Gamma}(a_0=0.5, b_0=0.5)\\ +\text{likelihood}: d_1, d_2 &\sim \mathcal N(\mu, 1/\lambda_1) \\ +d_n &\sim \mathcal N(\mu, 1/\lambda_2), \;\; \text{for }n = 3, \ldots, 7. +\end{align} +``` + +Note that the first observations now share one observation precision while the rest 5 share another. The model can be translated to `Turing.jl` easily. +""" + +# ╔═╡ 4043d410-e338-45cc-a528-5afc5a23aea1 +begin + + @model function seven_scientist(data; m₀=0, v₀=10_000, a₀ = .5, b₀ =.5) + # prior for μ + μ ~ Normal(m₀, sqrt(v₀)) + # prior for the two precisions + λ₁ ~ Gamma(a₀, 1/b₀) + λ₂ ~ Gamma(a₀, 1/b₀) + σ₁ = sqrt(1/λ₁) + σ₂ = sqrt(1/λ₂) + # likelihood for scientists A and B + data[1] ~ Normal(μ, σ₁) + data[2] ~ Normal(μ, σ₁) + # likelihood for the other scientists + for i in 3:length(data) + data[i] ~ Normal(μ, σ₂) + end + end +end + +# ╔═╡ 0572a686-2a09-4c9e-9f33-51a390d5e66f +md""" + +After specifying the model, the inference is very straightforward. The model is initialised with the observed data; the we infer the model with a `NUTS()` sampler. +""" + +# ╔═╡ 0096e848-46b0-4c85-8526-0302b03c4682 +seven_scientist_model = seven_scientist(scientist_data) + +# ╔═╡ 04a162c0-3c7c-4056-8f2d-48d83df3d6e7 +seven_sci_chain = let + Random.seed!(100) + sample(seven_scientist_model, + NUTS(), + MCMCThreads(), + 2000, #2000 iterations per chain + 3; #three chains in parallel + discard_initial = 1000, + thinning=4) +end; + +# ╔═╡ cea1df62-2e5a-4cac-a30b-3506ecb9b879 +md""" +We can summarise the posterior by using `describe(.)` and `plot(.)`. By checking `rhat` and `ess` and also visual inspection, the chain seems to have mixed well. + +The MCMC's summary statistics also tell us a 95% credible range for ``\mu`` is between 8.59 and 10.45. + +""" + +# ╔═╡ 2af9eda0-a5f6-4b3c-b973-ea3c2ca03290 +describe(seven_sci_chain) + +# ╔═╡ a0671aeb-32dc-42f1-919f-a32f1c365a9a +plot(seven_sci_chain) + +# ╔═╡ c266890f-da07-44be-b98f-cc129463ca6c +density(seven_sci_chain[:μ], fill=(0, 0.1), label="", xlabel=L"\mu", ylabel="density", title="Posterior "*L"p(\mu|\mathcal{D})") + +# ╔═╡ 5bd72181-aa58-43b6-837e-47414c7152a1 +md""" + +## Predictive check with `Turing.jl` + + + +""" + +# ╔═╡ 7f16ec4f-ea2f-4990-9a6b-e473b997d786 +md""" + +Predictive checks are effective tools to evaluate whether the assumptions we make in the modelling stage are a good fit with the real data-generation process. The idea behind the checks is to generate simulated data using samples based on the prior or posterior distribution and compare them to the observed data. And the two checks are called **prior predictive check** and **posterior predictive check**. + +The data simulation process is listed below: +!!! information "" + Repeat the following many times: + + 1. First draw one sample from the posterior (or the prior for prior predictive check): + + $$\tilde \theta \sim p(\theta|\mathcal D)$$ + 2. Second, conditioning on ``\tilde \theta``, simulates the pseudo observations: + + $$\tilde{\mathcal D}\sim p(\mathcal D|\tilde{\theta})$$ + +In chapter 2, we have done the simulation manually. For more complicated models, the process soon becomes tedious and overly-complicated. Fortunately, `Turing.jl` provides an easy-to-use tool called `predict()` to semi-automate the process. + +Recall that when `Turing.jl` carries out the sampling procedure, all random variables (specified on the left-hand side of `~`) will be sampled except those being passed as concrete observations, such as `data` in the coin flipping example. To trigger the program to sample the observation, one can pass an array of `missing` type instead of the observed data. `missing` is a special data type in Julia to indicate the value of a variable is missing. For `Turing`, all `missing` type of variables which are on the left side of `~` expression will be sampled. + + +To be more specific, to simulate data ``\mathcal D_{pred}`` based on a predictive distribution, one should carry out the following steps: +1. create a data array with ``N`` `missing` elements, e.g. `D_missing = Vector{Union{Missing, Bool}}(undef, N)` +2. initialise a `Turing` model with the missing data as an augment, e.g. `missing_model = turing_model(D_missing)` +3. use `predict(missing_model, chain)` to simulate predictive data, where `chain` should be MCMC samples from the posterior or prior depending on the check + + +""" + +# ╔═╡ fb668940-ebf8-44d0-bb57-93fedfcb9892 +md""" + +""" + +# ╔═╡ 15a73e90-c4b5-4cdf-bd9d-1ec4e02e0f2e +md""" +### Example: predictive checks of coin-flipping model + +""" + +# ╔═╡ dd24a62d-dc0b-4ea1-a9dd-a65527d08776 +md""" +**Posterior predictive check.** The following block of code shows how to simulate future data based on the posterior distribution of the coin-flipping example. +""" + +# ╔═╡ 35ddd253-e28c-4f30-a2a1-ef81a61a740a +begin + # initialise an array of missing types + # Union{Missing, Bool} is union type of Missing and Boolean + # D_missing_coin_flipping is an array of 10 missing elements + D_missing_coin_flipping = Vector{Union{Missing, Bool}}(undef, 10) + cf_pred_model = coin_flipping(D_missing_coin_flipping) + # D_pred as an MCMCChain object. + post_pred_chain = predict(cf_pred_model, cf_chain) +end + +# ╔═╡ 5b01a0b7-affd-465d-b9f1-422d76ce6dca +md"""Remember `cf_chain` is a posterior MCMC chain sampled earlier. The prediction method will return another `MCMCChain` object of ``\mathcal D_{pred}``. For this case, it should contain 6000 simulated ``\mathcal D_{pred}`` (and each sample contains 10 tosses), since `cf_chain` were simulated with 3 parallel chains and each chain with 3000 iterations. + + +To summarise the simulated data, we sum each ``\mathcal D^{(r)}_{pred}`` to find the simulated ``\tilde{N}_h^{(r)}`` and use histogram to do visual check. + + +""" + +# ╔═╡ 846d2693-b644-4cd7-af2a-5ce6b843cb7d +let + histogram(sum(Array(post_pred_chain), dims=2)[:], normed=true, xticks = 0:10, label="Posterior predictive on Nₕ", legend=:outerbottom, xlabel="number of heads "*L"N_h", title="Posterior predictive check with a₀=b₀=1") + vline!([7], lw=4, lc=2, label="Observed Nₕ") +end + +# ╔═╡ 11989831-8179-4978-adfa-480f9a962f5f +md""" + +**Prior predictive check.** To carry out prior predictive check, one only needs to replace the posterior chain with a prior chain. To sample from the prior distribution, one can use command like `sample(model, Prior(), 5000)`. The rest is the same as posterior predictive check. + +""" + +# ╔═╡ 8c1e3f71-bae6-41be-a496-24dceaebc672 +begin + Random.seed!(100) + # sample from the prior distribution + coinflip_prior_chain = sample(cf_model, Prior(), 5000) + # simulate data based on the prior chain + prior_pred_chain = predict(cf_pred_model, coinflip_prior_chain) + # lastly, summarise and visualise the data + histogram(sum(Array(prior_pred_chain), dims=2)[:], bins = 20, xticks=0:10, normed=true, label="Prior predictive on Nₕ", legend=:outerbottom, xlabel="number of heads "*L"N_h", title="Prior predictive check with a₀=b₀=1") + vline!([7], lw=4, lc=2, label="Observed Nₕ") +end + +# ╔═╡ b21c5a1f-9ba4-40f3-b58a-d9f635d36dbf +md""" +### Exercise: seven scientists + +Carry out posterior predictive check on the seven-scientist problem by using `Turing.jl`. Replicate the KDE check in chapter 2 (as shown below). +""" + +# ╔═╡ 15b3cfae-dc5a-4f5a-ad3a-e3f152c88e7a +md""" + +!!! hint "Solution" + Simulate posterior predictive data + ```julia + D_missing_scientist = Vector{Union{Missing, Bool}}(undef, 7) + seven_sci_pred_model = seven_scientist(D_missing_scientist) + D_pred_seven_sci = predict(seven_sci_pred_model, seven_sci_chain) + ``` + Plot KDEs of the observed and simulated. + ```julia + D_pred = Array(D_pred_seven_sci) + R = 30 + plt = density(scientist_data, label="Observed", lw=2, xlim=[-32,30], ylim=[0, 0.25], xlabel=L"d", ylabel="density", title="Posterior predictive check on the correct model") + for i in 1: R + density!(D_pred[i, :], label="", lw=0.4) + end + plt + ``` + +""" + +# ╔═╡ 9ac490e1-2b15-40f1-a07a-543ce9dd95be +md""" + +## Appendix +""" + +# ╔═╡ 91471258-6620-448c-981c-b7202790f014 +md""" +**Foldable details** +""" + +# ╔═╡ 44a7215f-ae44-4379-a2e6-a6ebfe45bc8e + +begin + struct Foldable{C} + title::String + content::C + end + + function Base.show(io, mime::MIME"text/html", fld::Foldable) + write(io,"
$(fld.title)

") + show(io, mime, fld.content) + write(io,"

") + end +end + + +# ╔═╡ 55f5190d-d3dc-43e4-8e4f-1f42115fb6b2 +Foldable("Exact Bayesian computation with the conjugate prior model.", md" +Since a conjugate prior is used, the posterior computation is very straightforward. Apply Baye's rule, we find the posterior is + + +```math +p(\theta|\mathcal D) = \texttt{Beta}(\theta; a_N, b_N) = \frac{1}{\text{B}(a_N, b_N)} \theta^{a_N-1}(1-\theta)^{b_N-1}, +``` + +where ``a_N= a_0 + N_h`` and ``b_N = b_0 + N - N_h``; and ``N_h = \sum_i d_i`` is the total number of heads observed in the ``N`` tosses. + +Apply Baye's rule, we have + +```math +\begin{align} +p(\theta|\mathcal D) &\propto p(\theta) p(\mathcal D|\theta) \\ +&= \frac{1}{\text{B}(a_0, b_0)} \theta^{a_0-1}(1-\theta)^{b_0-1} \theta^{\sum_n d_n} (1-\theta)^{N-\sum_n d_n}\\ +&= \theta^{a_0+ \sum_{n} d_n -1}(1-\theta)^{b_0+N-\sum_n d_n -1}\\ +&= \theta^{a_N -1}(1-\theta)^{b_N -1}, +\end{align} +``` +where ``a_N= a_0 + N_h`` and ``b_N = b_0 + N - N_h``. +Next we needs to normalise the non-normalised posterior to find the exact posterior distribution. The normalising constant is: + +$$\int_{0}^1 \theta^{a_N -1}(1-\theta)^{b_N -1} d\theta$$ + +We recognise the unnormalised distribution is a Beta distribution with the updated parameters ``a_N= a_0 + N_h`` and ``b_N = b_0 + N - N_h``; the normalising constant must be ``B(a_N, b_N)``. Therefore, + +$$p(\theta|\mathcal D) =\text{Beta}(a_N, b_N).$$ + +To demonstrate the idea, we choose a noninformative flat prior ``a_0=b_0 =1``; the posterior is of a Beta form with updated counts of heads and tails: + +$$p(\theta|\mathcal D) = \texttt{Beta}(8, 4).$$ The corresponding prior and update posterior is shown below. The posterior (light orange curve) updates the flat prior (blue curve) by incorporating the likelihood. Since 7 out of the 10 tosses are head, the posterior correctly reflects this observed information. +") + +# ╔═╡ e896351f-ae21-48ae-a0a2-e53e9b54cd9a +Foldable("Julia code explanation.", md"`sum(Array(post_pred_chain), dims=2)[:]` +* `Array(post_pred_chain)` casts an `MCMCChain` object to `Array` object so it can be processed later +* `sum(., dims=2)` sums the first argument (a matrix here) by rows and return a row array +* `[:]` reduces a row array to a column vector (optional) +") + +# ╔═╡ 5202ef8d-dcd5-4882-a18e-b1d2d4769387 +begin + D_missing_scientist = Vector{Union{Missing, Bool}}(undef, 7) + seven_sci_pred_model = seven_scientist(D_missing_scientist) + D_pred_seven_sci = predict(seven_sci_pred_model, seven_sci_chain) +end; + +# ╔═╡ 645b1343-6717-4920-a319-d9da7e14b29f +begin + D_pred_seven = Array(D_pred_seven_sci) + plt_seven = density(scientist_data, label="Observed", lw=2, xlim=[-32,30], ylim=[0, 0.25], xlabel=L"d", ylabel="density", title="Posterior predictive check on the seven-scientist") + for i in 1: 30 + density!(D_pred_seven[i, :], label="", lw=0.4) + end +end; + +# ╔═╡ dda506eb-db21-436b-ad9f-3b95450347c7 +let + plt_seven +end + +# ╔═╡ 00000000-0000-0000-0000-000000000001 +PLUTO_PROJECT_TOML_CONTENTS = """ +[deps] +HypertextLiteral = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2" +LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" +PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd" +Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0" + +[compat] +HypertextLiteral = "~0.9.4" +LaTeXStrings = "~1.3.0" +PlutoUI = "~0.7.39" +StatsPlots = "~0.15.1" +Turing = "~0.21.9" +""" + +# ╔═╡ 00000000-0000-0000-0000-000000000002 +PLUTO_MANIFEST_TOML_CONTENTS = """ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.8.0" +manifest_format = "2.0" +project_hash = "d569651cdea78fefab153279e96f11f256ceae94" + +[[deps.AbstractFFTs]] +deps = ["ChainRulesCore", "LinearAlgebra"] +git-tree-sha1 = "69f7020bd72f069c219b5e8c236c1fa90d2cb409" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.2.1" + +[[deps.AbstractMCMC]] +deps = ["BangBang", "ConsoleProgressMonitor", "Distributed", "Logging", "LoggingExtras", "ProgressLogging", "Random", "StatsBase", "TerminalLoggers", "Transducers"] +git-tree-sha1 = "5c26c7759412ffcaf0dd6e3172e55d783dd7610b" +uuid = "80f14c24-f653-4e6a-9b94-39d6b0f70001" +version = "4.1.3" + +[[deps.AbstractPPL]] +deps = ["AbstractMCMC", "DensityInterface", "Setfield", "SparseArrays"] +git-tree-sha1 = "6320752437e9fbf49639a410017d862ad64415a5" +uuid = "7a57a42e-76ec-4ea3-a279-07e840d6d9cf" +version = "0.5.2" + +[[deps.AbstractPlutoDingetjes]] +deps = ["Pkg"] +git-tree-sha1 = "8eaf9f1b4921132a4cff3f36a1d9ba923b14a481" +uuid = "6e696c72-6542-2067-7265-42206c756150" +version = "1.1.4" + +[[deps.AbstractTrees]] +git-tree-sha1 = "03e0550477d86222521d254b741d470ba17ea0b5" +uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" +version = "0.3.4" + +[[deps.Adapt]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "195c5505521008abea5aee4f96930717958eac6f" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "3.4.0" + +[[deps.AdvancedHMC]] +deps = ["AbstractMCMC", "ArgCheck", "DocStringExtensions", "InplaceOps", "LinearAlgebra", "ProgressMeter", "Random", "Requires", "Setfield", "Statistics", "StatsBase", "StatsFuns", "UnPack"] +git-tree-sha1 = "345effa84030f273ee86fcdd706d8484ce9a1a3c" +uuid = "0bf59076-c3b1-5ca4-86bd-e02cd72cde3d" +version = "0.3.5" + +[[deps.AdvancedMH]] +deps = ["AbstractMCMC", "Distributions", "Random", "Requires"] +git-tree-sha1 = "d7a7dabeaef34e5106cdf6c2ac956e9e3f97f666" +uuid = "5b7e9947-ddc0-4b3f-9b55-0d8042f74170" +version = "0.6.8" + +[[deps.AdvancedPS]] +deps = ["AbstractMCMC", "Distributions", "Libtask", "Random", "StatsFuns"] +git-tree-sha1 = "9ff1247be1e2aa2e740e84e8c18652bd9d55df22" +uuid = "576499cb-2369-40b2-a588-c64705576edc" +version = "0.3.8" + +[[deps.AdvancedVI]] +deps = ["Bijectors", "Distributions", "DistributionsAD", "DocStringExtensions", "ForwardDiff", "LinearAlgebra", "ProgressMeter", "Random", "Requires", "StatsBase", "StatsFuns", "Tracker"] +git-tree-sha1 = "e743af305716a527cdb3a67b31a33a7c3832c41f" +uuid = "b5ca4192-6429-45e5-a2d9-87aec30a685c" +version = "0.1.5" + +[[deps.ArgCheck]] +git-tree-sha1 = "a3a402a35a2f7e0b87828ccabbd5ebfbebe356b4" +uuid = "dce04be8-c92d-5529-be00-80e4d2c0e197" +version = "2.3.0" + +[[deps.ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" +version = "1.1.1" + +[[deps.Arpack]] +deps = ["Arpack_jll", "Libdl", "LinearAlgebra", "Logging"] +git-tree-sha1 = "91ca22c4b8437da89b030f08d71db55a379ce958" +uuid = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97" +version = "0.5.3" + +[[deps.Arpack_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "OpenBLAS_jll", "Pkg"] +git-tree-sha1 = "5ba6c757e8feccf03a1554dfaf3e26b3cfc7fd5e" +uuid = "68821587-b530-5797-8361-c406ea357684" +version = "3.5.1+1" + +[[deps.ArrayInterfaceCore]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "40debc9f72d0511e12d817c7ca06a721b6423ba3" +uuid = "30b0a656-2188-435a-8636-2ec0e6a096e2" +version = "0.1.17" + +[[deps.ArrayInterfaceStaticArraysCore]] +deps = ["Adapt", "ArrayInterfaceCore", "LinearAlgebra", "StaticArraysCore"] +git-tree-sha1 = "a1e2cf6ced6505cbad2490532388683f1e88c3ed" +uuid = "dd5226c6-a4d4-4bc7-8575-46859f9c95b9" +version = "0.1.0" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[deps.AxisAlgorithms]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"] +git-tree-sha1 = "66771c8d21c8ff5e3a93379480a2307ac36863f7" +uuid = "13072b0f-2c55-5437-9ae7-d433b7a33950" +version = "1.0.1" + +[[deps.AxisArrays]] +deps = ["Dates", "IntervalSets", "IterTools", "RangeArrays"] +git-tree-sha1 = "1dd4d9f5beebac0c03446918741b1a03dc5e5788" +uuid = "39de3d68-74b9-583c-8d2d-e117c070f3a9" +version = "0.4.6" + +[[deps.BangBang]] +deps = ["Compat", "ConstructionBase", "Future", "InitialValues", "LinearAlgebra", "Requires", "Setfield", "Tables", "ZygoteRules"] +git-tree-sha1 = "b15a6bc52594f5e4a3b825858d1089618871bf9d" +uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" +version = "0.3.36" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[deps.Baselet]] +git-tree-sha1 = "aebf55e6d7795e02ca500a689d326ac979aaf89e" +uuid = "9718e550-a3fa-408a-8086-8db961cd8217" +version = "0.1.1" + +[[deps.Bijectors]] +deps = ["ArgCheck", "ChainRulesCore", "ChangesOfVariables", "Compat", "Distributions", "Functors", "InverseFunctions", "IrrationalConstants", "LinearAlgebra", "LogExpFunctions", "MappedArrays", "Random", "Reexport", "Requires", "Roots", "SparseArrays", "Statistics"] +git-tree-sha1 = "875f3845e1256ee1d9e0c8ca3993e709b32c0ed1" +uuid = "76274a88-744f-5084-9051-94815aaf08c4" +version = "0.10.3" + +[[deps.Bzip2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2" +uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" +version = "1.0.8+0" + +[[deps.Cairo_jll]] +deps = ["Artifacts", "Bzip2_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "4b859a208b2397a7a623a03449e4636bdb17bcf2" +uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" +version = "1.16.1+1" + +[[deps.Calculus]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" +uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" +version = "0.5.1" + +[[deps.ChainRules]] +deps = ["ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "Statistics"] +git-tree-sha1 = "f9d6dd293ed05233d37a5644f880f5def9fdfae3" +uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" +version = "1.42.0" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "80ca332f6dcb2508adba68f22f551adb2d00a624" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.15.3" + +[[deps.ChangesOfVariables]] +deps = ["ChainRulesCore", "LinearAlgebra", "Test"] +git-tree-sha1 = "38f7a08f19d8810338d4f5085211c7dfa5d5bdd8" +uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" +version = "0.1.4" + +[[deps.Clustering]] +deps = ["Distances", "LinearAlgebra", "NearestNeighbors", "Printf", "SparseArrays", "Statistics", "StatsBase"] +git-tree-sha1 = "75479b7df4167267d75294d14b58244695beb2ac" +uuid = "aaaa29a8-35af-508c-8bc3-b662a17a0fe5" +version = "0.14.2" + +[[deps.CodecZlib]] +deps = ["TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "ded953804d019afa9a3f98981d99b33e3db7b6da" +uuid = "944b1d66-785c-5afd-91f1-9de20f533193" +version = "0.7.0" + +[[deps.ColorSchemes]] +deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "Random"] +git-tree-sha1 = "1fd869cc3875b57347f7027521f561cf46d1fcd8" +uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" +version = "3.19.0" + +[[deps.ColorTypes]] +deps = ["FixedPointNumbers", "Random"] +git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4" +uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" +version = "0.11.4" + +[[deps.ColorVectorSpace]] +deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "SpecialFunctions", "Statistics", "TensorCore"] +git-tree-sha1 = "d08c20eef1f2cbc6e60fd3612ac4340b89fea322" +uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" +version = "0.9.9" + +[[deps.Colors]] +deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] +git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40" +uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" +version = "0.12.8" + +[[deps.Combinatorics]] +git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" +uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" +version = "1.0.2" + +[[deps.CommonSolve]] +git-tree-sha1 = "332a332c97c7071600984b3c31d9067e1a4e6e25" +uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" +version = "0.2.1" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools", "Test"] +git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.0" + +[[deps.Compat]] +deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] +git-tree-sha1 = "9be8be1d8a6f44b96482c8af52238ea7987da3e3" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "3.45.0" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "0.5.2+0" + +[[deps.CompositionsBase]] +git-tree-sha1 = "455419f7e328a1a2493cabc6428d79e951349769" +uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" +version = "0.1.1" + +[[deps.ConsoleProgressMonitor]] +deps = ["Logging", "ProgressMeter"] +git-tree-sha1 = "3ab7b2136722890b9af903859afcf457fa3059e8" +uuid = "88cd18e8-d9cc-4ea6-8889-5259c0d15c8b" +version = "0.1.2" + +[[deps.ConstructionBase]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "59d00b3139a9de4eb961057eabb65ac6522be954" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.4.0" + +[[deps.Contour]] +git-tree-sha1 = "d05d9e7b7aedff4e5b51a029dced05cfb6125781" +uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" +version = "0.6.2" + +[[deps.Crayons]] +git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15" +uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" +version = "4.1.1" + +[[deps.DataAPI]] +git-tree-sha1 = "fb5f5316dd3fd4c5e7c30a24d50643b73e37cd40" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.10.0" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "d1fff3a548102f48987a52a2e0d114fa97d730f0" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.13" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.DataValues]] +deps = ["DataValueInterfaces", "Dates"] +git-tree-sha1 = "d88a19299eba280a6d062e135a43f00323ae70bf" +uuid = "e7dc6d0d-1eca-5fa6-8ad6-5aecde8b7ea5" +version = "0.4.13" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[deps.DefineSingletons]] +git-tree-sha1 = "0fba8b706d0178b4dc7fd44a96a92382c9065c2c" +uuid = "244e2a9f-e319-4986-a169-4d1fe445cd52" +version = "0.1.2" + +[[deps.DelimitedFiles]] +deps = ["Mmap"] +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" + +[[deps.DensityInterface]] +deps = ["InverseFunctions", "Test"] +git-tree-sha1 = "80c3e8639e3353e5d2912fb3a1916b8455e2494b" +uuid = "b429d917-457f-4dbc-8f4c-0cc954292b1d" +version = "0.4.0" + +[[deps.DiffResults]] +deps = ["StaticArrays"] +git-tree-sha1 = "c18e98cba888c6c25d1c3b048e4b3380ca956805" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.0.3" + +[[deps.DiffRules]] +deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] +git-tree-sha1 = "28d605d9a0ac17118fe2c5e9ce0fbb76c3ceb120" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.11.0" + +[[deps.Distances]] +deps = ["LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "3258d0659f812acde79e8a74b11f17ac06d0ca04" +uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" +version = "0.10.7" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[deps.Distributions]] +deps = ["ChainRulesCore", "DensityInterface", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"] +git-tree-sha1 = "aafa0665e3db0d3d0890cdc8191ea03dc279b042" +uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" +version = "0.25.66" + +[[deps.DistributionsAD]] +deps = ["Adapt", "ChainRules", "ChainRulesCore", "Compat", "DiffRules", "Distributions", "FillArrays", "LinearAlgebra", "NaNMath", "PDMats", "Random", "Requires", "SpecialFunctions", "StaticArrays", "StatsBase", "StatsFuns", "ZygoteRules"] +git-tree-sha1 = "ec811a2688b3504ce5b315fe7bc86464480d5964" +uuid = "ced4e74d-a319-5a8a-b0ac-84af2272839c" +version = "0.6.41" + +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.8.6" + +[[deps.Downloads]] +deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +version = "1.6.0" + +[[deps.DualNumbers]] +deps = ["Calculus", "NaNMath", "SpecialFunctions"] +git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566" +uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74" +version = "0.6.8" + +[[deps.DynamicPPL]] +deps = ["AbstractMCMC", "AbstractPPL", "BangBang", "Bijectors", "ChainRulesCore", "Distributions", "LinearAlgebra", "MacroTools", "Random", "Setfield", "Test", "ZygoteRules"] +git-tree-sha1 = "c6f574d855670c2906af3f4053e6db10224e5dda" +uuid = "366bfd00-2699-11ea-058f-f148b4cae6d8" +version = "0.19.3" + +[[deps.EarCut_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3f3a2501fa7236e9b911e0f7a588c657e822bb6d" +uuid = "5ae413db-bbd1-5e63-b57d-d24a61df00f5" +version = "2.2.3+0" + +[[deps.EllipticalSliceSampling]] +deps = ["AbstractMCMC", "ArrayInterfaceCore", "Distributions", "Random", "Statistics"] +git-tree-sha1 = "4cda4527e990c0cc201286e0a0bfbbce00abcfc2" +uuid = "cad2338a-1db2-11e9-3401-43bc07c9ede2" +version = "1.0.0" + +[[deps.Expat_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "bad72f730e9e91c08d9427d5e8db95478a3c323d" +uuid = "2e619515-83b5-522b-bb60-26c02a35a201" +version = "2.4.8+0" + +[[deps.Extents]] +git-tree-sha1 = "5e1e4c53fa39afe63a7d356e30452249365fba99" +uuid = "411431e0-e8b7-467b-b5e0-f676ba4f2910" +version = "0.1.1" + +[[deps.FFMPEG]] +deps = ["FFMPEG_jll"] +git-tree-sha1 = "b57e3acbe22f8484b4b5ff66a7499717fe1a9cc8" +uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" +version = "0.4.1" + +[[deps.FFMPEG_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] +git-tree-sha1 = "ccd479984c7838684b3ac204b716c89955c76623" +uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" +version = "4.4.2+0" + +[[deps.FFTW]] +deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] +git-tree-sha1 = "90630efff0894f8142308e334473eba54c433549" +uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" +version = "1.5.0" + +[[deps.FFTW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "c6033cc3892d0ef5bb9cd29b7f2f0331ea5184ea" +uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" +version = "3.3.10+0" + +[[deps.FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" + +[[deps.FillArrays]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"] +git-tree-sha1 = "246621d23d1f43e3b9c368bf3b72b2331a27c286" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "0.13.2" + +[[deps.FixedPointNumbers]] +deps = ["Statistics"] +git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc" +uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" +version = "0.8.4" + +[[deps.Fontconfig_jll]] +deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "21efd19106a55620a188615da6d3d06cd7f6ee03" +uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" +version = "2.13.93+0" + +[[deps.Formatting]] +deps = ["Printf"] +git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" +uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" +version = "0.4.2" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"] +git-tree-sha1 = "425e126d13023600ebdecd4cf037f96e396187dd" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "0.10.31" + +[[deps.FreeType2_jll]] +deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "87eb71354d8ec1a96d4a7636bd57a7347dde3ef9" +uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" +version = "2.10.4+0" + +[[deps.FriBidi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "aa31987c2ba8704e23c6c8ba8a4f769d5d7e4f91" +uuid = "559328eb-81f9-559d-9380-de523a88c83c" +version = "1.0.10+0" + +[[deps.FunctionWrappers]] +git-tree-sha1 = "241552bc2209f0fa068b6415b1942cc0aa486bcc" +uuid = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" +version = "1.1.2" + +[[deps.Functors]] +git-tree-sha1 = "223fffa49ca0ff9ce4f875be001ffe173b2b7de4" +uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196" +version = "0.2.8" + +[[deps.Future]] +deps = ["Random"] +uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" + +[[deps.GLFW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll"] +git-tree-sha1 = "d972031d28c8c8d9d7b41a536ad7bb0c2579caca" +uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" +version = "3.3.8+0" + +[[deps.GPUArraysCore]] +deps = ["Adapt"] +git-tree-sha1 = "d88b17a38322e153c519f5a9ed8d91e9baa03d8f" +uuid = "46192b85-c4d5-4398-a991-12ede77f4527" +version = "0.1.1" + +[[deps.GR]] +deps = ["Base64", "DelimitedFiles", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Pkg", "Printf", "Random", "RelocatableFolders", "Serialization", "Sockets", "Test", "UUIDs"] +git-tree-sha1 = "cf0a9940f250dc3cb6cc6c6821b4bf8a4286cf9c" +uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" +version = "0.66.2" + +[[deps.GR_jll]] +deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Pkg", "Qt5Base_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "2d908286d120c584abbe7621756c341707096ba4" +uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" +version = "0.66.2+0" + +[[deps.GeoInterface]] +deps = ["Extents"] +git-tree-sha1 = "fb28b5dc239d0174d7297310ef7b84a11804dfab" +uuid = "cf35fbd7-0cd7-5166-be24-54bfbe79505f" +version = "1.0.1" + +[[deps.GeometryBasics]] +deps = ["EarCut_jll", "GeoInterface", "IterTools", "LinearAlgebra", "StaticArrays", "StructArrays", "Tables"] +git-tree-sha1 = "a7a97895780dab1085a97769316aa348830dc991" +uuid = "5c1252a2-5f33-56bf-86c9-59e7332b4326" +version = "0.4.3" + +[[deps.Gettext_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "9b02998aba7bf074d14de89f9d37ca24a1a0b046" +uuid = "78b55507-aeef-58d4-861c-77aaff3498b1" +version = "0.21.0+0" + +[[deps.Glib_jll]] +deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "a32d672ac2c967f3deb8a81d828afc739c838a06" +uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" +version = "2.68.3+2" + +[[deps.Graphite2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "344bf40dcab1073aca04aa0df4fb092f920e4011" +uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" +version = "1.3.14+0" + +[[deps.Grisu]] +git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" +uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" +version = "1.0.2" + +[[deps.HTTP]] +deps = ["Base64", "CodecZlib", "Dates", "IniFile", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "f0956f8d42a92816d2bf062f8a6a6a0ad7f9b937" +uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" +version = "1.2.1" + +[[deps.HarfBuzz_jll]] +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] +git-tree-sha1 = "129acf094d168394e80ee1dc4bc06ec835e510a3" +uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" +version = "2.8.1+1" + +[[deps.HypergeometricFunctions]] +deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions", "Test"] +git-tree-sha1 = "709d864e3ed6e3545230601f94e11ebc65994641" +uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" +version = "0.3.11" + +[[deps.Hyperscript]] +deps = ["Test"] +git-tree-sha1 = "8d511d5b81240fc8e6802386302675bdf47737b9" +uuid = "47d2ed2b-36de-50cf-bf87-49c2cf4b8b91" +version = "0.0.4" + +[[deps.HypertextLiteral]] +deps = ["Tricks"] +git-tree-sha1 = "c47c5fa4c5308f27ccaac35504858d8914e102f9" +uuid = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2" +version = "0.9.4" + +[[deps.IOCapture]] +deps = ["Logging", "Random"] +git-tree-sha1 = "f7be53659ab06ddc986428d3a9dcc95f6fa6705a" +uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" +version = "0.2.2" + +[[deps.IniFile]] +git-tree-sha1 = "f550e6e32074c939295eb5ea6de31849ac2c9625" +uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f" +version = "0.5.1" + +[[deps.InitialValues]] +git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3" +uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c" +version = "0.3.1" + +[[deps.InplaceOps]] +deps = ["LinearAlgebra", "Test"] +git-tree-sha1 = "50b41d59e7164ab6fda65e71049fee9d890731ff" +uuid = "505f98c9-085e-5b2c-8e89-488be7bf1f34" +version = "0.3.0" + +[[deps.IntelOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "d979e54b71da82f3a65b62553da4fc3d18c9004c" +uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" +version = "2018.0.3+2" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[deps.Interpolations]] +deps = ["Adapt", "AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "Requires", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"] +git-tree-sha1 = "23e651bbb8d00e9971015d0dd306b780edbdb6b9" +uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" +version = "0.14.3" + +[[deps.IntervalSets]] +deps = ["Dates", "Random", "Statistics"] +git-tree-sha1 = "57af5939800bce15980bddd2426912c4f83012d8" +uuid = "8197267c-284f-5f27-9208-e0e47529a953" +version = "0.7.1" + +[[deps.InverseFunctions]] +deps = ["Test"] +git-tree-sha1 = "b3364212fb5d870f724876ffcd34dd8ec6d98918" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.7" + +[[deps.InvertedIndices]] +git-tree-sha1 = "bee5f1ef5bf65df56bdd2e40447590b272a5471f" +uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" +version = "1.1.0" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "7fd44fd4ff43fc60815f8e764c0f352b83c49151" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.1.1" + +[[deps.IterTools]] +git-tree-sha1 = "fa6287a4469f5e048d763df38279ee729fbd44e5" +uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" +version = "1.4.0" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLLWrappers]] +deps = ["Preferences"] +git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.4.1" + +[[deps.JSON]] +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "3c837543ddb02250ef42f4738347454f95079d4e" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.21.3" + +[[deps.JpegTurbo_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b53380851c6e6664204efb2e62cd24fa5c47e4ba" +uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" +version = "2.1.2+0" + +[[deps.KernelDensity]] +deps = ["Distributions", "DocStringExtensions", "FFTW", "Interpolations", "StatsBase"] +git-tree-sha1 = "9816b296736292a80b9a3200eb7fbb57aaa3917a" +uuid = "5ab0869b-81aa-558d-bb23-cbf5423bbe9b" +version = "0.6.5" + +[[deps.LAME_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "f6250b16881adf048549549fba48b1161acdac8c" +uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" +version = "3.100.1+0" + +[[deps.LERC_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" +uuid = "88015f11-f218-50d7-93a8-a6af411a945d" +version = "3.0.0+1" + +[[deps.LRUCache]] +git-tree-sha1 = "d64a0aff6691612ab9fb0117b0995270871c5dfc" +uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" +version = "1.3.0" + +[[deps.LZO_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e5b909bcf985c5e2605737d2ce278ed791b89be6" +uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" +version = "2.10.1+0" + +[[deps.LaTeXStrings]] +git-tree-sha1 = "f2355693d6778a178ade15952b7ac47a4ff97996" +uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +version = "1.3.0" + +[[deps.Latexify]] +deps = ["Formatting", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "Printf", "Requires"] +git-tree-sha1 = "1a43be956d433b5d0321197150c2f94e16c0aaa0" +uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" +version = "0.15.16" + +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" + +[[deps.LeftChildRightSiblingTrees]] +deps = ["AbstractTrees"] +git-tree-sha1 = "b864cb409e8e445688bc478ef87c0afe4f6d1f8d" +uuid = "1d6d02ad-be62-4b6b-8a6d-2f90e265016e" +version = "0.1.3" + +[[deps.LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" +version = "0.6.3" + +[[deps.LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" +version = "7.84.0+0" + +[[deps.LibGit2]] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[deps.LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" +version = "1.10.2+0" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[deps.Libffi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "0b4a5d71f3e5200a7dff793393e09dfc2d874290" +uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" +version = "3.2.2+1" + +[[deps.Libgcrypt_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"] +git-tree-sha1 = "64613c82a59c120435c067c2b809fc61cf5166ae" +uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" +version = "1.8.7+0" + +[[deps.Libglvnd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"] +git-tree-sha1 = "7739f837d6447403596a75d19ed01fd08d6f56bf" +uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" +version = "1.3.0+3" + +[[deps.Libgpg_error_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "c333716e46366857753e273ce6a69ee0945a6db9" +uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" +version = "1.42.0+0" + +[[deps.Libiconv_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "42b62845d70a619f063a7da093d995ec8e15e778" +uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" +version = "1.16.1+1" + +[[deps.Libmount_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "9c30530bf0effd46e15e0fdcf2b8636e78cbbd73" +uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" +version = "2.35.0+0" + +[[deps.Libtask]] +deps = ["FunctionWrappers", "LRUCache", "LinearAlgebra", "Statistics"] +git-tree-sha1 = "dfa6c5f2d5a8918dd97c7f1a9ea0de68c2365426" +uuid = "6f1fad26-d15e-5dc8-ae53-837a1d7b8c9f" +version = "0.7.5" + +[[deps.Libtiff_jll]] +deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "Pkg", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "3eb79b0ca5764d4799c06699573fd8f533259713" +uuid = "89763e89-9b03-5906-acba-b20f662cd828" +version = "4.4.0+0" + +[[deps.Libuuid_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "7f3efec06033682db852f8b3bc3c1d2b0a0ab066" +uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" +version = "2.36.0+0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[deps.LogExpFunctions]] +deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "361c2b088575b07946508f135ac556751240091c" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.17" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "5d4d2d9904227b8bd66386c1138cf4d5ffa826bf" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "0.4.9" + +[[deps.MCMCChains]] +deps = ["AbstractMCMC", "AxisArrays", "Compat", "Dates", "Distributions", "Formatting", "IteratorInterfaceExtensions", "KernelDensity", "LinearAlgebra", "MCMCDiagnosticTools", "MLJModelInterface", "NaturalSort", "OrderedCollections", "PrettyTables", "Random", "RecipesBase", "Serialization", "Statistics", "StatsBase", "StatsFuns", "TableTraits", "Tables"] +git-tree-sha1 = "8cb9b8fb081afd7728f5de25b9025bff97cb5c7a" +uuid = "c7f686f2-ff18-58e9-bc7b-31028e88f75d" +version = "5.3.1" + +[[deps.MCMCDiagnosticTools]] +deps = ["AbstractFFTs", "DataAPI", "Distributions", "LinearAlgebra", "MLJModelInterface", "Random", "SpecialFunctions", "Statistics", "StatsBase", "Tables"] +git-tree-sha1 = "058d08594e91ba1d98dcc3669f9421a76824aa95" +uuid = "be115224-59cd-429b-ad48-344e309966f0" +version = "0.1.3" + +[[deps.MKL_jll]] +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] +git-tree-sha1 = "e595b205efd49508358f7dc670a940c790204629" +uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" +version = "2022.0.0+0" + +[[deps.MLJModelInterface]] +deps = ["Random", "ScientificTypesBase", "StatisticalTraits"] +git-tree-sha1 = "16fa7c2e14aa5b3854bc77ab5f1dbe2cdc488903" +uuid = "e80e1ace-859a-464e-9ed9-23947d8ae3ea" +version = "1.6.0" + +[[deps.MacroTools]] +deps = ["Markdown", "Random"] +git-tree-sha1 = "3d3e902b31198a27340d0bf00d6ac452866021cf" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.9" + +[[deps.MappedArrays]] +git-tree-sha1 = "e8b359ef06ec72e8c030463fe02efe5527ee5142" +uuid = "dbb5928d-eab1-5f90-85c2-b9b0edb7c900" +version = "0.4.1" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[deps.MbedTLS]] +deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "Random", "Sockets"] +git-tree-sha1 = "d9ab10da9de748859a7780338e1d6566993d1f25" +uuid = "739be429-bea8-5141-9913-cc70e7f3736d" +version = "1.1.3" + +[[deps.MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +version = "2.28.0+0" + +[[deps.Measures]] +git-tree-sha1 = "e498ddeee6f9fdb4551ce855a46f54dbd900245f" +uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" +version = "0.3.1" + +[[deps.MicroCollections]] +deps = ["BangBang", "InitialValues", "Setfield"] +git-tree-sha1 = "6bb7786e4f24d44b4e29df03c69add1b63d88f01" +uuid = "128add7d-3638-4c79-886c-908ea0c25c34" +version = "0.1.2" + +[[deps.Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "bf210ce90b6c9eed32d25dbcae1ebc565df2687f" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "1.0.2" + +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[deps.MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" +version = "2022.2.1" + +[[deps.MultivariateStats]] +deps = ["Arpack", "LinearAlgebra", "SparseArrays", "Statistics", "StatsBase"] +git-tree-sha1 = "6d019f5a0465522bbfdd68ecfad7f86b535d6935" +uuid = "6f286f6a-111f-5878-ab1e-185364afe411" +version = "0.9.0" + +[[deps.NNlib]] +deps = ["Adapt", "ChainRulesCore", "LinearAlgebra", "Pkg", "Requires", "Statistics"] +git-tree-sha1 = "415108fd88d6f55cedf7ee940c7d4b01fad85421" +uuid = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" +version = "0.8.9" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "a7c3d1da1189a1c2fe843a3bfa04d18d20eb3211" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.0.1" + +[[deps.NamedArrays]] +deps = ["Combinatorics", "DataStructures", "DelimitedFiles", "InvertedIndices", "LinearAlgebra", "Random", "Requires", "SparseArrays", "Statistics"] +git-tree-sha1 = "2fd5787125d1a93fbe30961bd841707b8a80d75b" +uuid = "86f7a689-2022-50b4-a561-43c23ac3c673" +version = "0.9.6" + +[[deps.NaturalSort]] +git-tree-sha1 = "eda490d06b9f7c00752ee81cfa451efe55521e21" +uuid = "c020b1a1-e9b0-503a-9c33-f039bfc54a85" +version = "1.0.0" + +[[deps.NearestNeighbors]] +deps = ["Distances", "StaticArrays"] +git-tree-sha1 = "0e353ed734b1747fc20cd4cba0edd9ac027eff6a" +uuid = "b8a86587-4115-5ab1-83bc-aa920d37bbce" +version = "0.4.11" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" +version = "1.2.0" + +[[deps.Observables]] +git-tree-sha1 = "dfd8d34871bc3ad08cd16026c1828e271d554db9" +uuid = "510215fc-4207-5dde-b226-833fc4488ee2" +version = "0.5.1" + +[[deps.OffsetArrays]] +deps = ["Adapt"] +git-tree-sha1 = "1ea784113a6aa054c5ebd95945fa5e52c2f378e7" +uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +version = "1.12.7" + +[[deps.Ogg_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "887579a3eb005446d514ab7aeac5d1d027658b8f" +uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" +version = "1.3.5+1" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.20+0" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+0" + +[[deps.OpenSSL_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e60321e3f2616584ff98f0a4f18d98ae6f89bbb3" +uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" +version = "1.1.17+0" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.5+0" + +[[deps.Opus_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "51a08fb14ec28da2ec7a927c4337e4332c2a4720" +uuid = "91d4177d-7536-5919-b921-800302f37372" +version = "1.3.2+0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.4.1" + +[[deps.PCRE_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b2a7af664e098055a7529ad1a900ded962bca488" +uuid = "2f80f16e-611a-54ab-bc61-aa92de5b98fc" +version = "8.44.0+0" + +[[deps.PDMats]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "cf494dca75a69712a72b80bc48f59dcf3dea63ec" +uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" +version = "0.11.16" + +[[deps.Parsers]] +deps = ["Dates"] +git-tree-sha1 = "0044b23da09b5608b4ecacb4e5e6c6332f833a7e" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "2.3.2" + +[[deps.Pixman_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b4f5d02549a10e20780a24fce72bea96b6329e29" +uuid = "30392449-352a-5448-841d-b1acce4e97dc" +version = "0.40.1+0" + +[[deps.Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +version = "1.8.0" + +[[deps.PlotThemes]] +deps = ["PlotUtils", "Statistics"] +git-tree-sha1 = "8162b2f8547bc23876edd0c5181b27702ae58dce" +uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a" +version = "3.0.0" + +[[deps.PlotUtils]] +deps = ["ColorSchemes", "Colors", "Dates", "Printf", "Random", "Reexport", "Statistics"] +git-tree-sha1 = "9888e59493658e476d3073f1ce24348bdc086660" +uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" +version = "1.3.0" + +[[deps.Plots]] +deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "GeometryBasics", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs", "UnicodeFun", "Unzip"] +git-tree-sha1 = "a19652399f43938413340b2068e11e55caa46b65" +uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" +version = "1.31.7" + +[[deps.PlutoUI]] +deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "Markdown", "Random", "Reexport", "UUIDs"] +git-tree-sha1 = "8d1f54886b9037091edf146b517989fc4a09efec" +uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" +version = "0.7.39" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.3.0" + +[[deps.PrettyTables]] +deps = ["Crayons", "Formatting", "Markdown", "Reexport", "Tables"] +git-tree-sha1 = "dfb54c4e414caa595a1f2ed759b160f5a3ddcba5" +uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" +version = "1.3.1" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[deps.ProgressLogging]] +deps = ["Logging", "SHA", "UUIDs"] +git-tree-sha1 = "80d919dee55b9c50e8d9e2da5eeafff3fe58b539" +uuid = "33c8b6b6-d38a-422a-b730-caa89a2f386c" +version = "0.1.4" + +[[deps.ProgressMeter]] +deps = ["Distributed", "Printf"] +git-tree-sha1 = "d7a7aef8f8f2d537104f170139553b14dfe39fe9" +uuid = "92933f4c-e287-5a05-a399-4b506db050ca" +version = "1.7.2" + +[[deps.Qt5Base_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "xkbcommon_jll"] +git-tree-sha1 = "c6c0f690d0cc7caddb74cef7aa847b824a16b256" +uuid = "ea2cea3b-5b76-57ae-a6ef-0a8af62496e1" +version = "5.15.3+1" + +[[deps.QuadGK]] +deps = ["DataStructures", "LinearAlgebra"] +git-tree-sha1 = "78aadffb3efd2155af139781b8a8df1ef279ea39" +uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" +version = "2.4.2" + +[[deps.REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[deps.Random]] +deps = ["SHA", "Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[deps.RangeArrays]] +git-tree-sha1 = "b9039e93773ddcfc828f12aadf7115b4b4d225f5" +uuid = "b3c3ace0-ae52-54e7-9d0b-2c1406fd6b9d" +version = "0.3.2" + +[[deps.Ratios]] +deps = ["Requires"] +git-tree-sha1 = "dc84268fe0e3335a62e315a3a7cf2afa7178a734" +uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439" +version = "0.4.3" + +[[deps.RealDot]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" +uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" +version = "0.1.0" + +[[deps.RecipesBase]] +git-tree-sha1 = "6bf3f380ff52ce0832ddd3a2a7b9538ed1bcca7d" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.2.1" + +[[deps.RecipesPipeline]] +deps = ["Dates", "NaNMath", "PlotUtils", "RecipesBase"] +git-tree-sha1 = "e7eac76a958f8664f2718508435d058168c7953d" +uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" +version = "0.6.3" + +[[deps.RecursiveArrayTools]] +deps = ["Adapt", "ArrayInterfaceCore", "ArrayInterfaceStaticArraysCore", "ChainRulesCore", "DocStringExtensions", "FillArrays", "GPUArraysCore", "LinearAlgebra", "RecipesBase", "StaticArraysCore", "Statistics", "ZygoteRules"] +git-tree-sha1 = "4ce7584604489e537b2ab84ed92b4107d03377f0" +uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" +version = "2.31.2" + +[[deps.Reexport]] +git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.2.2" + +[[deps.RelocatableFolders]] +deps = ["SHA", "Scratch"] +git-tree-sha1 = "22c5201127d7b243b9ee1de3b43c408879dff60f" +uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" +version = "0.3.0" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.0" + +[[deps.Rmath]] +deps = ["Random", "Rmath_jll"] +git-tree-sha1 = "bf3188feca147ce108c76ad82c2792c57abe7b1f" +uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" +version = "0.7.0" + +[[deps.Rmath_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "68db32dff12bb6127bac73c209881191bf0efbb7" +uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" +version = "0.3.0+0" + +[[deps.Roots]] +deps = ["CommonSolve", "Printf", "Setfield"] +git-tree-sha1 = "50f945fb7d7fdece03bbc76ff1ab96170f64a892" +uuid = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" +version = "2.0.2" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.SciMLBase]] +deps = ["ArrayInterfaceCore", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "RecipesBase", "RecursiveArrayTools", "StaticArraysCore", "Statistics", "Tables"] +git-tree-sha1 = "3077587613bd4ba73e2acd4df2d1300ef19d8513" +uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" +version = "1.47.0" + +[[deps.ScientificTypesBase]] +git-tree-sha1 = "a8e18eb383b5ecf1b5e6fc237eb39255044fd92b" +uuid = "30f210dd-8aff-4c5f-94ba-8e64358c1161" +version = "3.0.0" + +[[deps.Scratch]] +deps = ["Dates"] +git-tree-sha1 = "f94f779c94e58bf9ea243e77a37e16d9de9126bd" +uuid = "6c6a2e73-6563-6170-7368-637461726353" +version = "1.1.1" + +[[deps.SentinelArrays]] +deps = ["Dates", "Random"] +git-tree-sha1 = "db8481cf5d6278a121184809e9eb1628943c7704" +uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" +version = "1.3.13" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[deps.Setfield]] +deps = ["ConstructionBase", "Future", "MacroTools", "Requires"] +git-tree-sha1 = "38d88503f695eb0301479bc9b0d4320b378bafe5" +uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" +version = "0.8.2" + +[[deps.SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[deps.Showoff]] +deps = ["Dates", "Grisu"] +git-tree-sha1 = "91eddf657aca81df9ae6ceb20b959ae5653ad1de" +uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f" +version = "1.0.3" + +[[deps.SimpleBufferStream]] +git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1" +uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" +version = "1.1.0" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[deps.SortingAlgorithms]] +deps = ["DataStructures"] +git-tree-sha1 = "b3363d7460f7d098ca0912c69b082f75625d7508" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "1.0.1" + +[[deps.SparseArrays]] +deps = ["LinearAlgebra", "Random"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + +[[deps.SpecialFunctions]] +deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "5d65101b2ed17a8862c4c05639c3ddc7f3d791e1" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "1.8.7" + +[[deps.SplittablesBase]] +deps = ["Setfield", "Test"] +git-tree-sha1 = "39c9f91521de844bad65049efd4f9223e7ed43f9" +uuid = "171d559e-b47b-412a-8079-5efa626c420e" +version = "0.1.14" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "Random", "StaticArraysCore", "Statistics"] +git-tree-sha1 = "23368a3313d12a2326ad0035f0db0c0966f438ef" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.5.2" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "66fe9eb253f910fe8cf161953880cfdaef01cdf0" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.0.1" + +[[deps.StatisticalTraits]] +deps = ["ScientificTypesBase"] +git-tree-sha1 = "30b9236691858e13f167ce829490a68e1a597782" +uuid = "64bff920-2084-43da-a3e6-9bb72801c0c9" +version = "3.2.0" + +[[deps.Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.StatsAPI]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "f9af7f195fb13589dd2e2d57fdb401717d2eb1f6" +uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +version = "1.5.0" + +[[deps.StatsBase]] +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "d1bf48bfcc554a3761a133fe3a9bb01488e06916" +uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +version = "0.33.21" + +[[deps.StatsFuns]] +deps = ["ChainRulesCore", "HypergeometricFunctions", "InverseFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] +git-tree-sha1 = "5783b877201a82fc0014cbf381e7e6eb130473a4" +uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" +version = "1.0.1" + +[[deps.StatsPlots]] +deps = ["AbstractFFTs", "Clustering", "DataStructures", "DataValues", "Distributions", "Interpolations", "KernelDensity", "LinearAlgebra", "MultivariateStats", "Observables", "Plots", "RecipesBase", "RecipesPipeline", "Reexport", "StatsBase", "TableOperations", "Tables", "Widgets"] +git-tree-sha1 = "2b35ba790f1f823872dcf378a6d3c3b520092eac" +uuid = "f3b207a7-027a-5e70-b257-86293d7955fd" +version = "0.15.1" + +[[deps.StructArrays]] +deps = ["Adapt", "DataAPI", "StaticArrays", "Tables"] +git-tree-sha1 = "ec47fb6069c57f1cee2f67541bf8f23415146de7" +uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +version = "0.6.11" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.0" + +[[deps.TableOperations]] +deps = ["SentinelArrays", "Tables", "Test"] +git-tree-sha1 = "e383c87cf2a1dc41fa30c093b2a19877c83e1bc1" +uuid = "ab02a1b2-a7df-11e8-156e-fb1833f50b87" +version = "1.2.0" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits", "Test"] +git-tree-sha1 = "5ce79ce186cc678bbb5c5681ca3379d1ddae11a1" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.7.0" + +[[deps.Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" +version = "1.10.0" + +[[deps.TensorCore]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" +uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" +version = "0.1.1" + +[[deps.TerminalLoggers]] +deps = ["LeftChildRightSiblingTrees", "Logging", "Markdown", "Printf", "ProgressLogging", "UUIDs"] +git-tree-sha1 = "62846a48a6cd70e63aa29944b8c4ef704360d72f" +uuid = "5d786b92-1e48-4d6f-9151-6b4477ca9bed" +version = "0.1.5" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.Tracker]] +deps = ["Adapt", "DiffRules", "ForwardDiff", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NNlib", "NaNMath", "Printf", "Random", "Requires", "SpecialFunctions", "Statistics"] +git-tree-sha1 = "0874c1b5de1b5529b776cfeca3ec0acfada97b1b" +uuid = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" +version = "0.2.20" + +[[deps.TranscodingStreams]] +deps = ["Random", "Test"] +git-tree-sha1 = "4ad90ab2bbfdddcae329cba59dab4a8cdfac3832" +uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +version = "0.9.7" + +[[deps.Transducers]] +deps = ["Adapt", "ArgCheck", "BangBang", "Baselet", "CompositionsBase", "DefineSingletons", "Distributed", "InitialValues", "Logging", "Markdown", "MicroCollections", "Requires", "Setfield", "SplittablesBase", "Tables"] +git-tree-sha1 = "c76399a3bbe6f5a88faa33c8f8a65aa631d95013" +uuid = "28d57a85-8fef-5791-bfe6-a80928e7c999" +version = "0.4.73" + +[[deps.Tricks]] +git-tree-sha1 = "6bac775f2d42a611cdfcd1fb217ee719630c4175" +uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" +version = "0.1.6" + +[[deps.Turing]] +deps = ["AbstractMCMC", "AdvancedHMC", "AdvancedMH", "AdvancedPS", "AdvancedVI", "BangBang", "Bijectors", "DataStructures", "DiffResults", "Distributions", "DistributionsAD", "DocStringExtensions", "DynamicPPL", "EllipticalSliceSampling", "ForwardDiff", "Libtask", "LinearAlgebra", "MCMCChains", "NamedArrays", "Printf", "Random", "Reexport", "Requires", "SciMLBase", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Tracker", "ZygoteRules"] +git-tree-sha1 = "d5e128d1a8db72ebdd2b76644d19128cf90dda29" +uuid = "fce5fe82-541a-59a6-adf8-730c64b5f9a0" +version = "0.21.9" + +[[deps.URIs]] +git-tree-sha1 = "e59ecc5a41b000fa94423a578d29290c7266fc10" +uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" +version = "1.4.0" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[deps.UnPack]] +git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" +uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" +version = "1.0.2" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[deps.UnicodeFun]] +deps = ["REPL"] +git-tree-sha1 = "53915e50200959667e78a92a418594b428dffddf" +uuid = "1cfade01-22cf-5700-b092-accc4b62d6e1" +version = "0.4.1" + +[[deps.Unzip]] +git-tree-sha1 = "34db80951901073501137bdbc3d5a8e7bbd06670" +uuid = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" +version = "0.1.2" + +[[deps.Wayland_jll]] +deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "3e61f0b86f90dacb0bc0e73a0c5a83f6a8636e23" +uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" +version = "1.19.0+0" + +[[deps.Wayland_protocols_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4528479aa01ee1b3b4cd0e6faef0e04cf16466da" +uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91" +version = "1.25.0+0" + +[[deps.Widgets]] +deps = ["Colors", "Dates", "Observables", "OrderedCollections"] +git-tree-sha1 = "fcdae142c1cfc7d89de2d11e08721d0f2f86c98a" +uuid = "cc8bc4a8-27d6-5769-a93b-9d913e69aa62" +version = "0.6.6" + +[[deps.WoodburyMatrices]] +deps = ["LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "de67fa59e33ad156a590055375a30b23c40299d3" +uuid = "efce3f68-66dc-5838-9240-27a6d6f5f9b6" +version = "0.5.5" + +[[deps.XML2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "58443b63fb7e465a8a7210828c91c08b92132dff" +uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" +version = "2.9.14+0" + +[[deps.XSLT_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"] +git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" +uuid = "aed1982a-8fda-507f-9586-7b0439959a61" +version = "1.1.34+0" + +[[deps.Xorg_libX11_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] +git-tree-sha1 = "5be649d550f3f4b95308bf0183b82e2582876527" +uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" +version = "1.6.9+4" + +[[deps.Xorg_libXau_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4e490d5c960c314f33885790ed410ff3a94ce67e" +uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" +version = "1.0.9+4" + +[[deps.Xorg_libXcursor_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "12e0eb3bc634fa2080c1c37fccf56f7c22989afd" +uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" +version = "1.2.0+4" + +[[deps.Xorg_libXdmcp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4fe47bd2247248125c428978740e18a681372dd4" +uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" +version = "1.1.3+4" + +[[deps.Xorg_libXext_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "b7c0aa8c376b31e4852b360222848637f481f8c3" +uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" +version = "1.3.4+4" + +[[deps.Xorg_libXfixes_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "0e0dc7431e7a0587559f9294aeec269471c991a4" +uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" +version = "5.0.3+4" + +[[deps.Xorg_libXi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] +git-tree-sha1 = "89b52bc2160aadc84d707093930ef0bffa641246" +uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" +version = "1.7.10+4" + +[[deps.Xorg_libXinerama_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll"] +git-tree-sha1 = "26be8b1c342929259317d8b9f7b53bf2bb73b123" +uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" +version = "1.1.4+4" + +[[deps.Xorg_libXrandr_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "34cea83cb726fb58f325887bf0612c6b3fb17631" +uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" +version = "1.5.2+4" + +[[deps.Xorg_libXrender_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "19560f30fd49f4d4efbe7002a1037f8c43d43b96" +uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" +version = "0.9.10+4" + +[[deps.Xorg_libpthread_stubs_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "6783737e45d3c59a4a4c4091f5f88cdcf0908cbb" +uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" +version = "0.1.0+3" + +[[deps.Xorg_libxcb_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] +git-tree-sha1 = "daf17f441228e7a3833846cd048892861cff16d6" +uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" +version = "1.13.0+3" + +[[deps.Xorg_libxkbfile_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "926af861744212db0eb001d9e40b5d16292080b2" +uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" +version = "1.1.0+4" + +[[deps.Xorg_xcb_util_image_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "0fab0a40349ba1cba2c1da699243396ff8e94b97" +uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll"] +git-tree-sha1 = "e7fd7b2881fa2eaa72717420894d3938177862d1" +uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_keysyms_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "d1151e2c45a544f32441a567d1690e701ec89b00" +uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_renderutil_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "dfd7a8f38d4613b6a575253b3174dd991ca6183e" +uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e" +version = "0.3.9+1" + +[[deps.Xorg_xcb_util_wm_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "e78d10aab01a4a154142c5006ed44fd9e8e31b67" +uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361" +version = "0.4.1+1" + +[[deps.Xorg_xkbcomp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxkbfile_jll"] +git-tree-sha1 = "4bcbf660f6c2e714f87e960a171b119d06ee163b" +uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" +version = "1.4.2+4" + +[[deps.Xorg_xkeyboard_config_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xkbcomp_jll"] +git-tree-sha1 = "5c8424f8a67c3f2209646d4425f3d415fee5931d" +uuid = "33bec58e-1273-512f-9401-5d533626f822" +version = "2.27.0+4" + +[[deps.Xorg_xtrans_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "79c31e7844f6ecf779705fbc12146eb190b7d845" +uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" +version = "1.4.0+3" + +[[deps.Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.12+3" + +[[deps.Zstd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e45044cd873ded54b6a5bac0eb5c971392cf1927" +uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" +version = "1.5.2+0" + +[[deps.ZygoteRules]] +deps = ["MacroTools"] +git-tree-sha1 = "8c1a8e4dfacb1fd631745552c8db35d0deb09ea0" +uuid = "700de1a5-db45-46bc-99cf-38207098b444" +version = "0.2.2" + +[[deps.libaom_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3a2ea60308f0996d26f1e5354e10c24e9ef905d4" +uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" +version = "3.4.0+0" + +[[deps.libass_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "5982a94fcba20f02f42ace44b9894ee2b140fe47" +uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" +version = "0.15.1+0" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.1.1+0" + +[[deps.libfdk_aac_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "daacc84a041563f965be61859a36e17c4e4fcd55" +uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" +version = "2.0.2+0" + +[[deps.libpng_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "94d180a6d2b5e55e447e2d27a29ed04fe79eb30c" +uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" +version = "1.6.38+0" + +[[deps.libvorbis_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll", "Pkg"] +git-tree-sha1 = "b910cb81ef3fe6e78bf6acee440bda86fd6ae00c" +uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" +version = "1.3.7+1" + +[[deps.nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" +version = "1.48.0+0" + +[[deps.p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "17.4.0+0" + +[[deps.x264_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4fea590b89e6ec504593146bf8b988b2c00922b2" +uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a" +version = "2021.5.5+0" + +[[deps.x265_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "ee567a171cce03570d77ad3a43e90218e38937a9" +uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" +version = "3.5.0+0" + +[[deps.xkbcommon_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll", "Wayland_protocols_jll", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] +git-tree-sha1 = "9ebfc140cc56e8c2156a15ceac2f0302e327ac0a" +uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" +version = "1.4.1+0" +""" + +# ╔═╡ Cell order: +# ╟─68018998-17d7-11ed-2d5e-2b2d5f8b0301 +# ╟─ec23cd37-94df-489f-b892-24bffd755b50 +# ╟─a89d9509-7564-4b6e-bba6-0de1f3f7d64e +# ╟─82b6f501-bada-4bf3-a7a7-c325bc48e754 +# ╟─4b2fc478-b825-4758-b384-d7b7186b8e21 +# ╟─67d93f23-899b-4ddf-83f1-5d320c23f22f +# ╟─b2980969-462c-44fe-bb66-fb5d968fc5f6 +# ╟─aaeb3a9d-d655-427d-a397-62cab819e346 +# ╟─d4a8b997-5dff-49b1-aa09-017051405790 +# ╟─0e5f3c06-8e3e-4b66-a42e-78a1db358987 +# ╟─45a74e6a-ae59-49bd-8b41-ee1c73153f15 +# ╟─8fbef2d5-9591-46fc-a35e-f44a0d492748 +# ╟─c8863691-ffdc-4629-b0b6-acd61d6d905f +# ╟─fefbf8e9-8920-4555-87bc-daf2e2a231f1 +# ╟─f56ea0d7-c4e8-469e-9863-adc2d9c917be +# ╟─a86ed206-aed8-40b4-89aa-1abf0d16fbb2 +# ╟─55f5190d-d3dc-43e4-8e4f-1f42115fb6b2 +# ╟─b49725d0-8239-4129-b0d6-982f998be91f +# ╟─ecf86444-1565-406c-8aa2-275ee3a44fae +# ╠═a2b84c25-bf58-411d-893b-48c8384cae04 +# ╟─f2dd09fa-9204-4f1e-80da-2f1bb185b3a8 +# ╠═77a9ca64-87ad-465c-bec7-fe406145de40 +# ╟─139a1d54-b018-4de4-9a9f-ec9cf429b3a1 +# ╠═7d13ddd9-fb5f-4843-b1d5-176d505acd57 +# ╟─a2278d07-f857-4910-afa8-bf484ef0dc10 +# ╟─400b77d6-dc69-4ea9-ab45-5daeaa6e4bcc +# ╟─9f119bba-fbd2-4c3a-93c2-22567c781e5f +# ╟─4bb24996-24d0-4910-9996-83f0b34a005f +# ╟─6f7ecf38-3017-408e-9a8a-6d218bddc2d1 +# ╠═4e9ac22f-a895-4d87-b1a9-2cd8a6da83fb +# ╟─5cd3314b-dff2-478f-9a1a-73545b26f797 +# ╟─5678e483-1292-440d-83de-462cd249c511 +# ╟─7c6e1185-4fe4-4d2b-9b0a-f6268a75b682 +# ╟─acbc4dcc-3352-4de0-a145-d4aa51975036 +# ╟─f06c5735-6a4a-4a91-8517-ec57a674225a +# ╟─782e9234-c02b-4abb-a72f-110d2fcabc33 +# ╟─a662232b-524b-4918-93e9-204ab908a14d +# ╠═4043d410-e338-45cc-a528-5afc5a23aea1 +# ╟─0572a686-2a09-4c9e-9f33-51a390d5e66f +# ╠═0096e848-46b0-4c85-8526-0302b03c4682 +# ╠═04a162c0-3c7c-4056-8f2d-48d83df3d6e7 +# ╟─cea1df62-2e5a-4cac-a30b-3506ecb9b879 +# ╠═2af9eda0-a5f6-4b3c-b973-ea3c2ca03290 +# ╠═a0671aeb-32dc-42f1-919f-a32f1c365a9a +# ╟─c266890f-da07-44be-b98f-cc129463ca6c +# ╟─5bd72181-aa58-43b6-837e-47414c7152a1 +# ╟─7f16ec4f-ea2f-4990-9a6b-e473b997d786 +# ╟─fb668940-ebf8-44d0-bb57-93fedfcb9892 +# ╟─15a73e90-c4b5-4cdf-bd9d-1ec4e02e0f2e +# ╟─dd24a62d-dc0b-4ea1-a9dd-a65527d08776 +# ╠═35ddd253-e28c-4f30-a2a1-ef81a61a740a +# ╟─5b01a0b7-affd-465d-b9f1-422d76ce6dca +# ╠═846d2693-b644-4cd7-af2a-5ce6b843cb7d +# ╟─e896351f-ae21-48ae-a0a2-e53e9b54cd9a +# ╟─11989831-8179-4978-adfa-480f9a962f5f +# ╠═8c1e3f71-bae6-41be-a496-24dceaebc672 +# ╟─b21c5a1f-9ba4-40f3-b58a-d9f635d36dbf +# ╟─dda506eb-db21-436b-ad9f-3b95450347c7 +# ╟─15b3cfae-dc5a-4f5a-ad3a-e3f152c88e7a +# ╟─9ac490e1-2b15-40f1-a07a-543ce9dd95be +# ╟─91471258-6620-448c-981c-b7202790f014 +# ╠═44a7215f-ae44-4379-a2e6-a6ebfe45bc8e +# ╠═5202ef8d-dcd5-4882-a18e-b1d2d4769387 +# ╠═645b1343-6717-4920-a319-d9da7e14b29f +# ╟─00000000-0000-0000-0000-000000000001 +# ╟─00000000-0000-0000-0000-000000000002 diff --git a/section5_regressions.jl b/section5_regressions.jl new file mode 100644 index 0000000..0538ee3 --- /dev/null +++ b/section5_regressions.jl @@ -0,0 +1,2730 @@ +### A Pluto.jl notebook ### +# v0.19.11 + +using Markdown +using InteractiveUtils + +# ╔═╡ da388a86-19cb-11ed-0c64-95c301c27153 +begin + using PlutoUI + using StatsPlots + using CSV, DataFrames + using LinearAlgebra + using Turing + using Random + using LaTeXStrings, Latexify + using Logging; Logging.disable_logging(Logging.Warn); +end; + +# ╔═╡ c1026d6b-4e2e-4045-923e-eb5886b45604 +TableOfContents() + +# ╔═╡ 4ed16d76-2815-4f8c-8ab0-3819a03a1acc +md""" + +# Bayesian linear regressions + +In this chapter, we are going to do regressions in a Bayesian way. A regression task is to predict a *dependent variable* ``Y`` based on *independent variables* ``X``. In other words, regression analysis tries to access how ``X`` affects ``Y``. In this chapter, we consider the case when ``Y`` is real-valued, or ``Y\in R``. And we will move on to discuss other cases e.g. when ``Y\in \{\texttt{true}, \texttt{false}\}`` is binary or integer-valued in the next chapter. + + +In this chapter, we will first briefly review the Frequentist's regression model and then move on to introduce the Bayesian's treatment. From modelling perspective, the Bayesian model is almost the same as the Frequentist's model except the additional prior distribution. We will see the importance of introducing a prior distribution and how choosing different prior forms lead to various different useful applied regression models. +""" + +# ╔═╡ c8547607-92be-4700-9468-863798c2ddce +md""" +## Frequentist's linear regression + + +Firstly, we recap the Frequentist's regression model. A typycal regression model assumes each observation ``y_n`` is generated based on the some deterministic transformation of the independent variable ``\mathbf{x}_n \in R^D`` plus and some observation noise ``\varepsilon_n``: + +```math +y_n = \mu(\mathbf{x}_n) + \varepsilon_n +``` +for ``n=1,\ldots, N``, where the observation noises are usually assumed to be white Gaussian noises: + +$$\varepsilon_n \sim \mathcal N(0, \sigma^2).$$ + + +The deterministic function ``\mu`` is usually assumed to be linear: + +$$\mu(\mathbf x_n) = \beta_0 + \mathbf{x}_n^\top \boldsymbol{\beta}_1 ,$$ + +where ``\beta_0`` is called intercept and ``\boldsymbol{\beta}_1 \in R^D`` determine linear relationship between ``\mathbf{x}`` and ``y``. Since ``\mu`` is a linear function, the regression is called **linear regression**. +""" + +# ╔═╡ 8f95b8c8-70a0-471a-be06-3b020db667b3 +md""" +**Probabilistic reformulation.** +The Frequentist's model above can also be equivalently written as: + +```math +p(y_n|\mathbf{x}_n, \boldsymbol{\beta}, \sigma^2) = \mathcal{N}(y_n; \beta_0+\mathbf{x}_n^\top \boldsymbol{\beta}_1, \sigma^2), +``` +where ``\boldsymbol{\beta}^\top = [\beta_0, \boldsymbol{\beta}_1]`` is used to denote the both the intercept and regression parameters. In other words, a **likelihood model** for the observed data ``\mathbf{y} = \{y_n\}`` for ``n=1,\ldots, N``. And each ``y_n`` is Gaussian distributed with mean $\beta_0+\mathbf{x}_n^\top \boldsymbol{\beta}$ and variance $\sigma^2$. The model also assumes the independent variables ``\mathbf{x}_n`` are fixed (i.e. non-random). + +By using matrix notation, the above model can be compactly written as: + +```math +p(\mathbf{y}|\mathbf{X}, \boldsymbol{\beta}, \sigma^2) = \mathcal{N}_N(\mathbf{y}; \beta_0 \mathbf{1}_N + \mathbf{X} \boldsymbol{\beta}_1, \sigma^2\mathbf{I}_N), +``` +where ``\mathbf{y} = [y_1, y_2,\ldots,y_N]^\top, \mathbf{X} = [\mathbf{x}_1, \mathbf{x}_1, \ldots, \mathbf{x}_1]^\top``, ``\mathbf{1}_N=[1, \ldots, 1]^\top`` is a ``N\times 1`` column vector of ones and ``\mathbf{I}_{N}`` is a ``N\times N`` identity matrix. + +The likelihood assumption is illustrated below for a simple linear regression model with a one-dimensional predictor, i.e. ``D=1``. Conditioning on where ``x_n`` is, ``y_n`` is Gaussian distributed with a mean determined by the regression line and an observation variance ``\sigma^2``. + +""" + +# ╔═╡ 3a46c193-5a25-423f-bcb5-038f3756d7ba +md""" + +**OLS Estimation*.** Frequentists estimate the model by using maximum likelihood estimation (MLE). The idea is to find point estimators ``\hat{\beta_0}, \hat{\boldsymbol{\beta}}_1, \hat{\sigma^2}`` such that the likelihood function is maximised. +```math +\hat{\beta_0}, \hat{\boldsymbol{\beta}}_1, \hat{\sigma^2} \leftarrow \arg\max p(\mathbf y|\mathbf X, \beta_0, \boldsymbol{\beta}_1, \sigma^2) +``` +It can be shown that the MLE are equivalent to the more widely known ordinary least square (OLS) estimators, in which we are minimising the sum of squared error + +```math +\hat{\beta_0}, \hat{\boldsymbol{\beta}}_1 \leftarrow \arg\min \sum_{n=1}^N (y_n - \mathbf{x}_n^\top \boldsymbol{\beta}_1 -\beta_0)^2. +``` +""" + +# ╔═╡ effcd3d2-ba90-4ca8-a69c-f1ef1ad697ab +md"We use `GLM.jl` to fit the OLS estimation based on the simulated data. The estimated model and true model is shown below." + +# ╔═╡ af404db3-7397-4fd7-a5f4-0c812bd90c4a +begin + Random.seed!(100) + β₀, β₁, σ² = 3, 3, 0.5 + N = 50 + X = rand(N) + μ = β₀ .+ β₁ * X + yy = μ + sqrt(σ²) * randn(N) +end; + +# ╔═╡ c6938b7f-e6e5-4bea-a273-52ab3916d07c +md""" + +**Example.** Consider a simple linear regression model with one predictor, i.e. +```math +y_n = \beta_0 + \beta_1 x_n + \varepsilon_n. +``` + +To better illustrate the idea, we have simulated a dataset with ``N``=$(N) observations and the regression is defined with the following parameters: ``\beta_0=3, \beta_1=3, \sigma^2=0.5``. The simulated dataset is plotted below. +""" + +# ╔═╡ 3e98e9ff-b674-43f9-a3e0-1ca5d8614327 +begin + using GLM + ols_simulated = lm([ones(N) X], yy) +end + +# ╔═╡ f8040fa0-fdff-42da-8b9f-785627f51ee1 +let + p_lr = plot(title="Frequentist's linear regression's probabilistic model", framestyle = :origin,legend=:bottomright) + β0, σ²0, N = [3, 3], 0.5, 250 + Random.seed!(100) + X = rand(N) + μ = β0[1] .+ β0[2] * X + yy = μ + sqrt(σ²0) * randn(N) + plot!(X, yy, st=:scatter, label="") + plot!([0,1], x->β0[1]+β0[2]*x, c= 1, linewidth=5, label=L"\mu(x) = \beta_0+\beta_1x") + xis = [0, 0.25, 0.5, 0.75, 0.99, 0.4] + for i in 1:length(xis) + x = xis[i] + μi = dot(β0, [1, x]) + xs_ = μi-3:0.01:μi+3 + ys_ = pdf.(Normal(μi, sqrt(σ²0)), xs_) + ys_ = 0.1 *ys_ ./ maximum(ys_) + if i == length(xis) + plot!([x], [μi], st=:sticks, markerstrokewidth =1, markershape = :diamond, c=:black, label="", markersize=4) + plot!(ys_ .+x, xs_, c=:red, label=L"\mathcal{N}(\mu(x), \sigma^2)", linewidth=3) + else + plot!(ys_ .+x, xs_, c=:gray, label="", linewidth=1) + end + + end + old_xticks = xticks(p_lr[1]) + new_xticks = ([xis[end]], ["\$x\$"]) + keep_indices = findall(x -> all(x .≠ new_xticks[1]), old_xticks[1]) + merged_xticks = (old_xticks[1][keep_indices] ∪ new_xticks[1], old_xticks[2][keep_indices] ∪ new_xticks[2]) + xticks!(merged_xticks) + p_lr +end + +# ╔═╡ af2e55f3-08b8-48d4-ae95-e65168a23eeb +let + pred(x) = coef(ols_simulated)' * [1, x] + scatter(X, yy, xlabel=L"x", ylabel=L"y", label="") + plot!(0:0.1:1, pred, lw=2, label="OLS fit", legend=:topleft) + plot!(0:0.1:1, (x) -> β₀ + β₁*x, lw=2, label="True model", legend=:topleft) +end + +# ╔═╡ 43191a7a-f1a2-41df-910d-cf85907e8f7a +md""" + +## Bayesian linear regression model +""" + +# ╔═╡ 98ef1cca-de03-44c2-bcf4-6e79da139e11 +md""" + +The Bayesian model reuses the likelihood model: + +$$p(\mathbf y|\mathbf{X}, \beta_0, \boldsymbol{\beta}_1, \sigma^2);$$ + +but imposes additional priors on the unknown parameters. + +A commonly used set of prior choices are: + +* ``p(\beta_0)``: a typical choice for the intercept parameter is Gaussian: $$\beta_0 \sim \mathcal N(m_0^{\beta_0}, v_0^{\beta_0});$$ + * where ``m_0=0`` is usually set to zero to encourage a sparse model (more on this next time) + * ``v_0`` is set to a large number, say ``v_0=10^2`` + + + +* ``p(\boldsymbol \beta_1)``: since ``\boldsymbol{\beta}_1\in R^D`` is a real-valued vector, a suitable prior choice is multivariate Gaussian $$\boldsymbol{\beta}_1 \sim \mathcal N_{D}(\mathbf m_0^{\boldsymbol{\beta}_1}, \mathbf V_0^{\boldsymbol{\beta}_1})$$ + * ``\mathbf{m}_0^{\boldsymbol{\beta}_1}`` again is usually set to a zero vector: ``\mathbf{m}_0^{\boldsymbol{\beta}_1}= \mathbf{0}_D`` + * ``\mathbf{V}_0^{\boldsymbol{\beta}_1}``, without subjective prior knowledge, ``\mathbf{V}_0^{\boldsymbol{\beta}_1}`` is usually set to a diagonal matrix with large variance diagonal entries, e.g. `` \mathbf{V}_0^{\boldsymbol{\beta}_1}= k \mathbf{I}_{D}`` and ``k`` is set to a large number; +* ``p(\sigma^2)``: since ``\sigma^2 >0`` is a positive real number, a good choice is truncated real-valued distribution, where which the negative part is truncated. A particular popular choice is Half-Cauchy: *i.e.* $$\sigma^2 \sim \texttt{HalfCauchy}(s_0^{\sigma^2})$$ (some distributions are plotted below); + * Cauchy distributions have heavy tails, making them suitable choices to express uncertain beliefs on the modelling parameter. In other words, the prior's density is more likely to cover the true parameter; + * and ``s_0^{\sigma^2}`` is the scale parameter of a Cauchy distribution, which controls the tail of a Cauchy. The larger the scale parameter ``s_0^{\sigma^2}`` is, the weaker the prior is. A few + +""" + +# ╔═╡ 9387dcb4-3f4e-4ec7-8393-30a483e00c63 +let + plot(-5:0.1:25, (x) -> pdf(truncated(Cauchy(0, 2), lower=0), x), lw=1.5, label=L"\texttt{HalfCauchy}(2.0)") + plot!(-5:0.1:25, (x) -> pdf(truncated(Cauchy(0, 4), lower=0), x), lw=1.5, label=L"\texttt{HalfCauchy}(4.0)") + plot!(-5:0.1:25, (x) -> pdf(truncated(Cauchy(0, 6), lower=0), x), lw=1.5, label=L"\texttt{HalfCauchy}(6.0)") + plot!(-5:0.1:25, (x) -> pdf(truncated(Cauchy(0, 10), lower=0), x), lw=1.5, label=L"\texttt{HalfCauchy}(10.0)") +end + +# ╔═╡ 59dd8a13-89c6-4ae9-8546-877bb7992570 +md""" +### Regression analysis with `Turing` +Together with the likelihood function, we have a fully specified Bayesian model. We consider the simple linear regression in which there is only one predictor, i.e. ``D=1`` first. The corresponding Bayesian model can be written as + + + +!!! infor "Bayesian linear regression" + ```math + \begin{align} + \text{Priors: }\;\;\;\;\;\;\beta_0 &\sim \mathcal{N}(0, v_0^{\beta_0})\\ + \beta_1 &\sim \mathcal{N}(0, v_0^{\beta_1})\\ + \sigma^2 &\sim \texttt{HalfCauchy}(s_0) \\ + \text{Likelihood: }\;\;\text{for } n &= 1,2,\ldots, N:\\ + \mu_n &=\beta_0 + \beta_1 x_n \\ + y_n &\sim \mathcal{N}(\mu_n, \sigma^2). + \end{align} + ``` + +""" + +# ╔═╡ 632575ce-a1ce-4a36-95dc-010229367446 +md""" + +The above model can almost be translated to `Turing` literally. Note that ``\texttt{HalfCauchy}`` distribution is a Cauchy distribution truncated from zero onwards, which can be implemented in `Julia` by: + +```julia +truncated(Cauchy(0, s₀), lower=0) # HalfCauchy distribution with mean 0 and scale s₀ +``` + +We have also used very weak priors for all the parameters. For example, the ``\texttt{HalfCauchy}(s_0=5)`` prior (check the ``\texttt{HalfCauchy}`` plot above) for ``\sigma^2`` easily covers the true value, which is ``0.5``. +""" + +# ╔═╡ e9bb7a3c-9143-48c5-b33f-e7d6b48cb224 +@model function simple_1d_blr(Xs, ys; v₀ = 10^2, V₀ = 20^2, s₀ = 5) + # Priors + # Gaussian is parameterised with sd rather than variance + β₀ ~ Normal(0, sqrt(v₀)) + β ~ Normal(0, sqrt(V₀)) + # Half-Cauchy prior for the observation variance + σ² ~ truncated(Cauchy(0, s₀), lower=0) + # calculate f(x) = β₀ + βx for all observations + # use .+ to broadcast the intercept to all + μs = β₀ .+ β * Xs + + # Likelihood + for i in eachindex(ys) + # Gaussian in `Distributions.jl` is parameterised by std σ rather than variance + ys[i] ~ Normal(μs[i], sqrt(σ²)) + end +end + +# ╔═╡ 1ef001cc-fe70-42e5-8b97-690bb725a734 +md""" + +Next, we use the above Turing model to infer the simulated dataset. A Turing model is first instantiated with the simulated data and then MCMC sampling algorithms are used to draw posterior samples. +""" + +# ╔═╡ 4ae89384-017d-4937-bcc9-3d8c63edaeb5 +begin + Random.seed!(100) + sim_data_model = simple_1d_blr(X, yy) + chain_sim_data = sample(sim_data_model, NUTS(), MCMCThreads(), 2000, 3; discard_initial=500) +end; + +# ╔═╡ 1761f829-6c7d-4186-a66c-b347be7c9a15 +md""" +Next, we inspect the chain first to do some diagnostics to see whether the chain has converged. +""" + +# ╔═╡ d57a7a26-a8a5-429d-b1b9-5e0499549544 +summarystats(chain_sim_data) + +# ╔═╡ ba598c45-a76e-41aa-bfd6-a64bb6cea875 +md"""Based on the fact that `rhat < 1.01` and the `ess` count, the chain has converged well. We can also plot the chain to visually check the chain traces.""" + +# ╔═╡ 391a1dc8-673a-47e9-aea3-ad79f366460d +md""" +**Result analysis** +""" + +# ╔═╡ d3d8fe25-e674-42de-ac49-b83aac402e2d +md"Recall the true parameters are ``\beta_0=3, \beta_1=3, \sigma^2=0.5``. And the inferred posteriors are summarised below. +" + +# ╔═╡ 748c1ff2-2346-44f4-a799-75fb2002c6fc +describe(chain_sim_data)[1] + +# ╔═╡ ae720bcd-1607-4155-9a69-bfb6944d5dde +b0, b1 = describe(chain_sim_data)[1][:, :mean][1:2]; + +# ╔═╡ 08f7be6d-fda9-4013-88f5-92f1b5d26336 +md""" +The posterior's means for the three unknowns are around $(round(b0; digits=2)) and $(round(b1; digits=2)), which are almost the same as the OLS estimators, which are expected since very weak-informative priors have been used. + +!!! information "Bayesian inference under weak priors" + As a rule thumb, when non-informative or weak-informative priors are used, the Bayesian inference's posterior mean should be similar to the Frequentist estimators. +""" + +# ╔═╡ 40daa902-cb85-4cda-9b9f-7a32ee9cbf1c +describe(chain_sim_data)[2] + +# ╔═╡ ab77aef9-920c-423a-9ce0-2b5adead1b7f +density(chain_sim_data) + +# ╔═╡ b1d7e28a-b802-4fa1-87ab-7df3369a468a +md""" +The above density plots show the posterior distributions. It can be observed the true parameters are all within good credible ranges. + +The following diagram shows the model ``\mu = \beta_0 + \beta_1 x`` estimated by the Bayesian method: +* The thick red line shows the posterior mean of the Bayesian model +* The lighter lines are some posterior samples, which also indicates the uncertainty about the posterior distribution (the true model is within the prediction) + * the posterior mean is simply the average of all the posterior samples. +""" + +# ╔═╡ 4293298e-52a5-40ca-970d-3f17c2c89adb +let + parms_turing = describe(chain_sim_data)[1][:, :mean] + β_samples = Array(chain_sim_data[[:β₀, :β]]) + pred(x) = parms_turing[1:2]' * [1, x] + plt = scatter(X, yy, xlabel=L"x", ylabel=L"y", label="") + plot!(0:0.1:1, pred, lw=2, label=L"\mathbb{E}[\mu|\mathcal{D}]", legend=:topleft) + plot!(0:0.1:1, (x) -> β₀ + β₁*x, lw=2, label="True model", legend=:topleft) + plot!(0:0.1:1, (x) -> β_samples[1, 1] + β_samples[1, 2] *x, lw=0.5, lc=:gray, label=L"\mu^{(r)} \sim p(\mu|\mathcal{D})", legend=:topleft) + for i in 2:100 + plot!(0:0.1:1, (x) -> β_samples[i, 1] + β_samples[i, 2] *x, lw=0.15, lc=:gray, label="", legend=:topleft) + end + plt +end + +# ╔═╡ 860c4cf4-59b2-4036-8a30-7fbf44b18648 +md""" + +#### Predictive checks + +To make sure our Bayesian model assumptions make sense, we should always carry out predictive checks. This is relatively straightforward to do the checks with `Turing`. Recall the procedure is to first simulate multiple pseudo samples ``\{\mathbf{y}_{pred}^{(r)}\}`` based on the posterior predictive distribution + +```math +\mathbf{y}_{pred} \sim p(\mathbf{y}|\mathcal{D}, \mathbf{X}), +``` + +and then the empirical distribution of the simulated data is compared against the observed. If the model assumptions are reasonable, we should expect the observed lies well within the possible region of the simulated. +""" + +# ╔═╡ 74a9a678-60b9-4e3f-97a2-56c8fdc7094f +md""" + +To simulate the pseudo data, we first create a dummy `Turing` with the targets filled with `missing` types. And then use `predict()` method to simulate the missing data. +""" + +# ╔═╡ 435036f6-76fc-458b-b0eb-119de02eabb7 +pred_y_matrix = let + # define the predictive model by passing `missing` targets y such that the values will be samples + pred_model = simple_1d_blr(X, Vector{Union{Missing, Float64}}(undef, length(yy))) + # simulate the predictive pseudo observations + predict(pred_model, chain_sim_data) |> Array +end; + +# ╔═╡ 6eff54f2-d2e0-4c18-8eda-3be3124b16a0 +md""" +**Kernel density estimation** check. One of the possible visual checks is to use Kernel density estimation (KDE), which is demonstrated below for our model. It can be seen the simulated data agree with the observed. +""" + +# ╔═╡ f11a15c9-bb0b-43c1-83e6-dce55f2a772f +let + pred_check_kde=density(yy, lw=2, label="Observed KDE", xlabel=L"y", ylabel="density") + + for i in 1:20 + label_ = i ==1 ? "Simulated KDE" : "" + density!(pred_y_matrix[i,:], lw=0.2, lc=:grey, label=label_) + end + pred_check_kde +end + +# ╔═╡ 03b571e6-9d35-4123-b7bb-5f3b31558c9e +md""" +**Summary statistics** check. Another common visual check is to plot the summary statistics of the simulated data, such as mean and standard deviation (std). Again, the simulated data is similar to the observed. + + +""" + +# ╔═╡ 7cffa790-bf2d-473f-95cc-ed67802d7b4f +let + # plot one third of the samples for a cleaner visualisation + first_N = Int(floor(size(pred_y_matrix)[1]/3)) + df_pred_stats = DataFrame(mean= mean(pred_y_matrix, dims=2)[1:first_N], logstd = log.(std(pred_y_matrix, dims=2)[1:first_N])) + + @df df_pred_stats scatter(:mean, :logstd, label="Simulated", ms=3, malpha=0.3, xlabel=L"\texttt{mean}(\mathbf{y})", ylabel=L"\ln(\texttt{std}(\mathbf{y}))") + scatter!([mean(yy)], [log(std(yy))], label="Observed") +end + +# ╔═╡ 21aaa2db-6df0-4573-8951-bdfd9b6be6f9 +md""" +### A real-world multiple linear regression example + +Consider the *Advertising* dataset which is described in the book [Introduction to Statistical Learning](https://hastie.su.domains/ISLR2/ISLRv2_website.pdf). The dataset records how advertising on TV, radio, and newspaper affects sales of a product. +""" + +# ╔═╡ b1401e7d-9207-4e31-b5ce-df82c8e9b069 +begin + Advertising = DataFrame(CSV.File(download("https://www.statlearning.com/s/Advertising.csv"))) + first(Advertising, 5) +end + +# ╔═╡ 241faf68-49b2-404b-b5d5-99061d1dd2a7 +md""" +First, we shall plot the data to get a feeling about the dataset. By checking the correlations, it seems both *TV, radio* are effective methods and the correlation between *newspaper* and *sales* seems not strong enough. + +$(begin + @df Advertising cornerplot([:sales :TV :radio :newspaper], compact = true) +end) + +""" + +# ╔═╡ 796ad911-9c95-454f-95f4-df5370b2496a +md""" +To understand the effects of the three different advertising methods, we can apply **multiple linear regression**. The multiple linear regression is formulated as: + +```math +\texttt{sales} = \beta_0 + \beta_1 \times \texttt{TV} + \beta_2 \times \texttt{radio} + \beta_3 \times \texttt{newspaper} + \varepsilon +``` + +""" + +# ╔═╡ ce97fbba-f5d0-42de-8b67-827c3478d8b0 +md"A Frequentist's model is fitted by using `GLM` as a reference first." + +# ╔═╡ f3b6f3ab-4304-4ef4-933c-728841c17998 +ols_advertising = lm(@formula(sales ~ TV+radio+newspaper), Advertising) + +# ╔═╡ ab51e2c3-dbd4-43e1-95b5-a875954ac532 +md"According to the OLS fit, we can observe that the newspaper's effect is not statistically significant since its lower and upper 95% confidence interval encloses zero. + +We now move on to fit a Bayesian model. A `Turing` multiple linear regression model is specified below. Note that the model is almost the same as the simple regression model. The only difference is we allow the number of predictors to vary. +" + +# ╔═╡ e1db0ee1-1d91-49c4-be6c-1ea276750bfc +# Bayesian linear regression. +@model function general_linear_regression(X, ys; v₀ = 10^2, V₀ = 10^2, s₀ = 5) + # Set variance prior. + σ² ~ truncated(Cauchy(0, s₀), 0, Inf) + # Set intercept prior. + intercept ~ Normal(0, sqrt(v₀)) + # Set the priors on our coefficients. + nfeatures = size(X, 2) + coefficients ~ MvNormal(nfeatures, sqrt(V₀)) + # Calculate all the mu terms. + μs = intercept .+ X * coefficients + for i in eachindex(ys) + ys[i] ~ Normal(μs[i], sqrt(σ²)) + end +end + +# ╔═╡ 80727f81-2440-4da5-8a8b-38ebfdc4ddc9 +md"We then fit the Bayesian model with the advertisement dataset:" + +# ╔═╡ 929330bf-beb5-4e42-8668-2a10adf13972 +chain_adv = let + xs = Advertising[:,2:4] |> Array # |> cast the dataframe to an array + advertising_bayes_model = general_linear_regression(xs, Advertising.sales) + Random.seed!(100) + chain_adv = sample(advertising_bayes_model, NUTS(), MCMCThreads(), 2000, 4) + replacenames(chain_adv, Dict(["coefficients[1]" => "TV", "coefficients[2]" => "radio", "coefficients[3]" => "newspaper"])) +end; + +# ╔═╡ 9668ab51-f86d-4af5-bf1e-3bef7081a53f +summarystats(chain_adv) + +# ╔═╡ ead10892-a94c-40a4-b8ed-efa96d4a32b8 +describe(chain_adv)[2] + +# ╔═╡ 6a330f81-f581-4ccd-8868-8a5b22afe9b8 +md"As can be seen from the summary, the Bayesian results are very similar to the Frequentists again: the posterior means are close to the OLS estimators. By checking the posterior's 95% credible intervals, we can conclude again newspaper (with a 95% credible interval between -0.013 and 0.011) is not an effective method, which is in agreement with the frequentist's result. The trace and density plot of the posterior samples are listed below for reference." + +# ╔═╡ b1f6c262-1a2d-4973-bd1a-ba363bcc5c41 +plot(chain_adv) + +# ╔═╡ 659a3760-0a18-4a95-8168-fc6ca237c4d5 +md""" + +## Extensions + +For both examples we have seen so far, the Bayesian method and the frequentist's method return very similar results. So the reader might wonder why to bother learning the Bayesian inference. The benefit of a Bayesian approach lies in its flexibility: by modifying the model as the modeller sees fit, everyone can do statistical inference like a statistician. With the help of `Turing`, the modeller only needs to do the modelling and leave the computation to the powerful MCMC inference engine. + + +### Heterogeneous observation σ + +To demonstrate the flexibility of the Bayesian approach, we are going to make improvements to the Advertising data's regression model. Here, we consider the effect of *TV* on *sales* only. +""" + +# ╔═╡ 65d702d6-abec-43a1-89a8-95c30b3e748a +md"It can be observed that the observation noise's scale ``\sigma^2`` is not constant across the horizontal axis. With a larger investment on TV, the sales are increasing but also the variance of the sales (check the two Gaussians' scales at two ends of the axis). Therefore, the old model which assumes a constant observation variance scale is not a good fit for the data. +" + +# ╔═╡ ddb0d87e-cf0a-4b09-9bb6-4ee267fcdb9d +md""" + +The ordinary OLS estimated model with the old model assumption is plotted above. It can be observed that the prediction interval is too wide at the lower end of the input scale but too small on the upper side. + +""" + +# ╔═╡ 1954544c-48b4-4997-871f-50c9bfa402b7 +md""" + +**A better "story".** +One possible approach to improve the model is to assume the observation scale ``\sigma`` itself is a function of the independent variable: + +```math +\sigma(x) = r_0 + r_1 x, +``` +If the slope ``r_1>0``, then the observation scale ``\sigma(x)`` will steadily increase over the input ``x``. + +However, note that ``\sigma`` is a constrained parameter, which needs to be strictly positive. To make the transformation valid across the input ``x``, we model ``\sigma``'s transformation ``\rho`` instead. + +To be more specific, we define the following deterministic transformations between ``\rho`` and ``\sigma``: +```math +\begin{align} +&\rho(x) = \gamma_0 + \gamma_1 x,\\ +&\sigma = \ln(1+\exp(\rho)). +\end{align} +``` + +The unconstrained observation scale ``\rho \in R`` is linearly dependent on the input ``x``; and a ``\texttt{softplus}`` transformation ``\ln(1+\exp(\cdot))`` is then applied to ``\rho`` such that the output is always positive. + +The second transformation ``\ln(1+ \exp(\cdot))`` is widely known as soft-plus method. The function is plotted below. + +$(begin +plot(-10:.1:10, (x)-> log(1+exp(x)), label=L"\ln(1+\exp(x))", legend=:topleft, lw=2, size=(400,300)) +end) + +``\texttt{Softplus}`` function takes any real-value as input and outputs a positive number, which satisfies our requirement. Note that one can also simply use ``\exp(\cdot)`` instead, which is also a ``R \rightarrow R^+`` transformation. +""" + +# ╔═╡ 85ae4791-6262-4f07-9796-749982e00fec +md""" + +The full Bayesian model is specified below: + + +```math +\begin{align} +\text{Priors: }\beta_0 &\sim \mathcal{N}(m_0^{\beta_0}, v_0^{\beta_0})\\ +\gamma_0 &\sim \mathcal{N}(m_0^{\gamma_0}, v_0^{\gamma_0}) \\ +\beta_1 &\sim \mathcal{N}(m_0^{\beta_1}, v_0^{\beta_1})\\ +\gamma_1 &\sim \mathcal{N}(m_0^{\gamma_1}, v_0^{\gamma_1}) \\ +\text{Likelihood: for } n &= 1,2,\ldots, N:\\ +\mu_n &=\beta_0 + \beta_1 x_n \\ +\rho_n &= \gamma_0 + \gamma_1 x_n\\ +\sigma_n &= \log(1+\exp(\rho_n))\\ +y_n &\sim \mathcal{N}(\mu_n, \sigma_n^2), +\end{align} +``` + +which can be translated to `Turing` as follows. For simplicity, we have assumed all priors are with mean zero and variance ``10^2``. +""" + +# ╔═╡ 08c52bf6-0920-43e7-92a9-275ed298c9ac +@model function hetero_var_model(X, y; v₀=100) + β₀ ~ Normal(0, sqrt(v₀)) + β₁ ~ Normal(0, sqrt(v₀)) + γ ~ MvNormal(zeros(2), sqrt(v₀)) + μs = β₀ .+ β₁ .* X + ρs = γ[1] .+ γ[2] .* X + σs = log.(1 .+ exp.(ρs)) + for i in eachindex(y) + y[i] ~ Normal(μs[i], σs[i]) + end + return (;μs, ρs, σs) +end + +# ╔═╡ 11021fb7-b072-46ac-8c23-f92825182c8c +begin + Random.seed!(100) + model2 = hetero_var_model(Advertising.TV, Advertising.sales) + chain2 = sample(model2, NUTS(), MCMCThreads(), 2000, 3) +end; + +# ╔═╡ cece17c2-bacb-4b4a-897c-4116688812c6 +describe(chain2) + +# ╔═╡ c1e96563-849a-415a-b28a-b45b3a9548bb +ols_tv = lm(@formula(sales ~ TV), Advertising) + +# ╔═╡ 2e7f780e-8850-446e-97f8-51ec26f5e36a +let + plt=@df Advertising scatter(:TV, :sales, xlabel="TV", ylabel="Sales", label="") + xis = [25, 150, 280] + σ²0 = [5, 12, 30] + pred(x) = coef(ols_tv)' * [1, x] + for i in 1:length(xis) + x = xis[i] + μi = pred(x) + xs_ = μi-2*sqrt(σ²0[i]):0.01:μi+2*sqrt(σ²0[i]) + ys_ = pdf.(Normal(μi, sqrt(σ²0[i])), xs_) + ys_ = 20 * ys_ ./ maximum(ys_) + plot!(ys_ .+x, xs_, c=2, label="", linewidth=2) + end + plt +end + +# ╔═╡ 611ad745-f92d-47ac-8d58-6f9baaf3077c +let + error = Advertising.sales - [ones(length(Advertising.TV)) Advertising.TV] * coef(ols_tv) + σ²_ml = sum(error.^2) / (length(Advertising.sales)-2) + pred(x) = coef(ols_tv)' * [1, x] + @df Advertising scatter(:TV, :sales, xlabel="TV", ylabel="Sales", label="") + plot!(0:1:300, pred, lw=2, lc=2, label="OLS", legend=:topleft) + test_data = DataFrame(TV= 0:300) + pred_ = predict(ols_tv, test_data, interval = :prediction, level = 0.9) + # plot!(0:1:300, (x) -> pred(x) + 2 * , lw=2, label="OLS", legend=:topleft) + # plot!(0:1:300, pred, lw=2, label="OLS", legend=:topleft) + plot!(0:300, pred_.prediction, linewidth = 0.1, + ribbon = (pred_.prediction .- pred_.lower, pred_.upper .- pred_.prediction), label=L"90\% "* " OLS prediction interval") +end + +# ╔═╡ 62582b10-924c-4ab8-9c2a-efa45c3ce57c +error=Advertising.sales - [ones(length(Advertising.TV)) Advertising.TV] * coef(ols_tv) + +# ╔═╡ 29175b82-f208-4fcf-9704-4a1996cc6e3c +plot(chain2) + +# ╔═╡ 05b90ddb-8479-4fbf-a469-d5b0bf4a91c8 +md""" +#### Use `generated_quantities()` + +**Analyse internel hidden values.** ``\sigma, \mu`` are of importance in evaluating the model. They represent the observation noise scale and regression-line's expectation respectively. Recall that they depend on the independent variable *TV* and the unknown model parameters ``\gamma_0, \gamma_1, \beta_0, \beta_1`` via deterministic functions +```math +\sigma(\texttt{TV}) = \ln(1+ \exp(\gamma_0 +\gamma_1 \texttt{TV})). +``` + +and + +```math +\mu(\texttt{TV}) = \beta_0 +\beta_1 \texttt{TV}. +``` + +To gain deeper insights into the inference results, we can analyse the posterior distributions of ``\mu`` and ``\sigma`` directly: i.e. +```math +p(\sigma|\texttt{TV}, \mathcal{D}),\;\; p(\mu|\texttt{TV}, \mathcal{D}). +``` + +Based on the Monte Carlo principle, their posterior distributions can be empirically approximated based on their posterior samples, which can be subsequently computed based on the MCMC samples ``\{\gamma_0^{(r)}, \gamma_1^{(r)}\}_{r=1}^R``, and ``\{\beta_0^{(r)},\beta_0^{(r)}\}_{r=1}^R`` respectively. + + +Take ``\sigma`` for example, its posterior can be approximated based on ``\{\gamma_0^{(r)}, \gamma_1^{(r)}\}_{r=1}^R`` by an empirical distribution: + +```math +p(\sigma |\texttt{TV}, \mathcal{D}) \approx \frac{1}{R} \sum_{r=1}^R \delta_{\sigma^{(r)}}, +``` +where + + +$$\sigma^{(r)}_{\texttt{TV}} =\ln(1+ \exp( \gamma_0^{(r)} +\gamma_1^{(r)} \texttt{TV})).$$ and ``\delta_{x}`` is a Dirac measured at ``x``. The posterior mean can then be approximated by the Monte Carlo average: + +```math +\mathbb{E}[\sigma|\mathcal{D}, \texttt{TV}] \approx \frac{1}{R} \sum_{r=1}^R \sigma^{(r)}_{\texttt{TV}}. +``` + +To make the idea concrete, we manually implement and plot the posterior approximation below. + + +""" + +# ╔═╡ 2d7f773e-9fa1-475d-9f74-c13908209aeb +begin + σ(x; γ) = log(1.0 + exp(γ[1] + γ[2] * x)) + # obtain the posterior mean of the γ + γ_mean = describe(chain2)[1][:,:mean][3:4] + # obtain γ samples from the chain object + γ_samples = Array(group(chain2, :γ)) + tv_input = 0:300 + # calculate each σⁱ + σ_samples = map(γⁱ -> σ.(tv_input; γ = γⁱ), eachrow(γ_samples)) + # E[σ|𝒟]: the Monte Carlo average + σ_mean = mean(σ_samples) +end; + +# ╔═╡ 8a0692db-6b85-42f6-8893-4219d58b1032 +let + # Plotting + plt = plot(tv_input, σ_mean, lw=3, xlabel="TV", ylabel=L"\sigma", label=L"\mathbb{E}[\sigma|\mathcal{D}]", legend=:topleft) + plot!(tv_input, σ_samples[1], lw=0.2, lc=:gray, xlabel="TV", ylabel=L"\sigma", label=L"\sigma^{(r)}\sim p(\sigma|\mathcal{D})", legend=:topleft) + for i in 2:25 + plot!(tv_input, σ_samples[i], lw=0.2, lc=:gray, label="") + end + plt +end + +# ╔═╡ 3c3f6378-ed20-4f40-a780-f9329ace34bc +md""" + +It is not practical to implement the approximation for every single internal variable manually. Fortunately, `Turing` provides us with an easy-to-use method: +``` +generated_quantities(model, chain) +``` to obtain internal variables' samples. The method takes a `Turing` model and a chain object as input arguments and it returns all internal variables' samples, which are returned at the end of the `Turing` model. For example, to obtain the posterior samples of the hidden variables ``\mu`` and ``\sigma``, simply issue commands: +""" + +# ╔═╡ a43189a3-a94f-4e69-85b1-3a586b2cc0eb +begin + gen_adv = generated_quantities(model2, chain2) + σs = map((x) -> x.σs, gen_adv) + μs = map((x) -> x.μs, gen_adv) +end; + +# ╔═╡ 4bf4c216-fefb-40fc-9d36-eaa82ff5454b +md""" + +And we can plot the posterior samples to visually interpret the results. It is worth noting that the observation's scale ``\sigma`` increases as investment on *TV* increases, which is exactly what we want to model. And also note the uncertainty about the observation scale is not uniform over the scale of the input *TV*. The uncertainty about ``\sigma`` also increases as *TV* gets larger (check the gray lines' spread).""" + +# ╔═╡ 5a507f39-a6be-43aa-a909-4c87005ad1d2 +begin + order = sortperm(Advertising.TV) + plt = plot(Advertising.TV[order], mean(σs)[order], lw=4, label=L"\mathbb{E}[\sigma|\mathcal{D}]", legend=:topleft, xlabel="TV", ylabel=L"\sigma",ribbon = (2*std(σs)[order], 2*std(σs)[order])) + plot!(Advertising.TV[order], σs[:][1][order], lw=0.2, lc=:gray, label=L"\sigma^{(r)}\sim p(\sigma|\mathcal{D})") + for i in 50:75 + plot!(Advertising.TV[order], σs[:][i][order], lw=0.2, lc=:gray, label="") + end + plt +end + +# ╔═╡ db76ed48-f0c0-4664-b2cf-d47be7faaa3f +let + plt = plot(Advertising.TV[order], mean(μs)[order], lw=4, lc=2, xlabel="TV", label=L"\mathbb{E}[\mu|\mathcal{D}]", legend=:topleft, ribbon = (2*std(μs)[order], 2*std(μs)[order])) + plot!(Advertising.TV[order], μs[:][1][order], lw=0.15, lc=:gray, label=L"\mu^{(r)}\sim p(\mu|\mathcal{D})", legend=:topleft) + for i in 2:25 + plot!(Advertising.TV[order], μs[:][i][order], lw=0.2, lc=:gray, label="") + end + @df Advertising scatter!(:TV, :sales, xlabel="TV", ylabel="Sales", label="", alpha=0.3, ms=3) + plt +end + +# ╔═╡ fc324c67-85be-4c50-b315-9d00ad1dc2be +md""" +**Predictions.** +Lastly, we show how to make predictions with `Turing`. To make predictions on new testing input ``x``, we will use `Turing`'s `predict()` method. Similar to prior and posterior predictive checks, we first feed in an array of missing values to the Turing model and use `predict` to draw posterior inference on the unknown targets ``y``. + + +Take the extended Advertising for example, the code below predicts at testing input at ``\texttt{TV} = 0, 1, \ldots, 300``. + +""" + +# ╔═╡ 61b1e15f-f3ff-4649-b90b-e85e2d172aaf +begin + ad_test = collect(0:300) + missing_mod = hetero_var_model(ad_test, Vector{Union{Missing, Float64}}(undef, length(ad_test))) + ŷ=predict(missing_mod, chain2) +end; + +# ╔═╡ 7e992f3e-0337-4b5f-8f4d-c20bdb3b6b66 +md""" +After making predictions on the inputs, we can summarise the prediction by calculating the mean and standard deviation. The code below calculates the posterior predictive's mean and standard deviations and then the summary statistics are plotted together with the original dataset. Note how the prediction's variance increases when the input increases. +""" + +# ╔═╡ ddc0f5b3-385a-4ceb-82e1-f218299b26d9 +begin + tmp=Array(ŷ) + ŷ_mean = mean(tmp, dims=1)[:] + ŷ_std = std(tmp, dims=1)[:] +end; + +# ╔═╡ 9eef45d5-0cd2-460e-940f-bdc7114106c3 +begin + @df Advertising scatter(:TV, :sales, xlabel="TV", ylabel="Sales", label="", title="Bayesian posterior predictive on the testing data") + plot!(ad_test, ŷ_mean, lw=3, ribbon = (2 * ŷ_std, 2 * ŷ_std), label=L"E[y|\mathcal{D}]", legend=:topleft) + plot!(ad_test, ŷ_mean + 2 * ŷ_std, lw=2, lc=3, ls=:dash, label=L"E[y|\mathcal{D}] + 2\cdot \texttt{std}") + plot!(ad_test, ŷ_mean - 2 * ŷ_std, lw=2, lc=3, ls=:dash, label=L"E[y|\mathcal{D}] - 2\cdot \texttt{std}") +end + +# ╔═╡ 1d5835ad-4e04-48f0-90e6-aa1776d9406f +md""" +### Handling outlier + +A handful of outliers might skew the final OLS estimation. For example, some outliers were added to the simulated dataset we consider earlier. The new dataset is plotted together with the estimated OLS estimated model. The model now deviates a lot from the ground true model. +""" + +# ╔═╡ ee37602c-229c-4709-8b29-627d32a25823 +begin + Random.seed!(123) + X_outlier = [0.1, 0.15] + y_outlier = [13, 13.5] + X_new = [X; X_outlier] + yy_new = [yy; y_outlier] + +end; + +# ╔═╡ 0fc9fd84-9fb1-42a1-bd68-8a9fcdce999d +let + + ols_outlier =lm([ones(length(X_new)) X_new], yy_new) + pred(x) = coef(ols_outlier)' * [1, x] + scatter(X_new, yy_new, xlabel=L"x", ylabel=L"y", label="",title="OLS estimation with outliers") + # scatter!(X_outlier, y_outlier, xlabel=L"x", ylabel=L"y", label="") + plot!(0:0.1:1, pred, lw=2, label="OLS fit", legend=:topleft) + plot!(0:0.1:1, (x) -> β₀ + β₁*x, lw=2, label="True model", legend=:topright) +end + +# ╔═╡ 9348f3e5-4224-46f5-bc07-dee20b47a8d3 +md""" +To deal with outliers, classic frequentist's methods might either suggest identifying and removing the outliers or deriving a new estimator to accommodate the outlier. Bayesian's approach is more consistent: modify the modelling assumption. + + +One way to achieve **robust Bayesian regression** is to assume the dependent observation is generated with Cauchy noise rather than Gaussian. As demonstrated below, a Cauchy distribution has heavier tails than its Gaussian equivalence, which makes Cauchy more resilient to outliers. +""" + +# ╔═╡ 36fb8291-fea9-4f9f-ac52-a0eb61c2c8a8 +begin + plot(-5:0.1:5, Normal(), fill=(0, 0.2), ylabel="density", label=L"\mathcal{N}(0,1)") + plot!(-5:0.1:5, Cauchy(), fill=(0, 0.2), label=L"\texttt{Cauchy}(0,1)") +end + +# ╔═╡ f67d1d47-1e25-4c05-befd-c958dce45168 +md"""The robust Bayesian regression model can be specified by replacing the Gaussian likelihood with its Cauchy equivalent. + + + +!!! infor "Bayesian robust linear regression" + ```math + \begin{align} + \text{Priors: }\beta_0 &\sim \mathcal{N}(m_0^{\beta_0}, v_0^{\beta_0})\\ + \beta_1 &\sim \mathcal{N}(m_0^{\beta_1}, v_0^{\beta_1})\\ + \sigma^2 &\sim \texttt{HalfCauchy}(s_0) \\ + \text{Likelihood: for } n &= 1,2,\ldots, N:\\ + \mu_n &=\beta_0 + \beta_1 x_n \\ + y_n &\sim \texttt{Cauchy}(\mu_n, \sigma). + \end{align} + ``` + +The `Turing` translation of the model is listed below. Note the model is almost the same as the ordinary model except the likelihood part.""" + +# ╔═╡ e4a67732-ff93-476e-8f5b-8433c1bf015e +@model function simple_robust_blr(Xs, ys; v₀ = 10^2, V₀ = 20^2, s₀ = 5) + # Priors + # Gaussian is parameterised with sd rather than variance + β₀ ~ Normal(0, sqrt(v₀)) + β ~ Normal(0, sqrt(V₀)) + σ² ~ truncated(Cauchy(0, s₀), lower=0) + # calculate f(x) = β₀ + βx for all observations + # use .+ to broadcast the intercept to all + μs = β₀ .+ β * Xs + + # Likelihood + for i in eachindex(ys) + ys[i] ~ Cauchy(μs[i], sqrt(σ²)) + end +end + +# ╔═╡ 92206a26-d361-4be5-b215-3ae388dd7f2f +begin + robust_mod = simple_robust_blr(X_new, yy_new) + chain_robust = sample(robust_mod, NUTS(), MCMCThreads(), 2000,4) +end; + +# ╔═╡ c65e9c09-52c5-4647-9414-ad53841e8ff3 +md""" +To compare the results, we plot both ordinary Bayesian model with Gaussian likelihood and the proposed robust Bayesian inference results. It can be seen the ordinary model's posterior (left) has much larger prediction variance due to the influence of the outliers and the prediction mean (the red line) deviates from the true model significantly. On the other hand, the robust model (right) still provides very consistent result. +""" + +# ╔═╡ 40f528f0-acca-43ff-a500-16aeb97898c8 +md""" +The MCMC chain of the robust analysis is also listed below. Recall the true regression parameters are ``\beta_0=\beta_1=3``. The posterior distribution correctly recovers the ground truth. +""" + +# ╔═╡ 9fdaefb8-28b4-4b70-8412-1275dc1ed224 +describe(chain_robust)[1] + +# ╔═╡ 559660b8-1e69-41fe-9139-d031eb26e31c +describe(chain_robust)[2] + +# ╔═╡ 85a22998-d3e7-4c48-b191-4ebbe9e813f3 +md""" +## What's next + +In this lecture, we have so far set all regression coefficients prior mean to be zeros. It seems a casual choice without enough justifications. However, it turns out that by setting the hyperparameter this way, we can control the complexity of a regression model: that is irrelevant predictors can be automatically excluded from the final prediction model. And such a property is called sparsity, +which is another important key feature of the Bayesian way of doing regression analysis. + +In the next section, we are going to see how sparse models can be achieved by tweaking the prior distributions. + +""" + +# ╔═╡ 139b5acb-c938-4fc9-84a5-fdcbd697b9da +md""" +## Appendix + +""" + +# ╔═╡ d8dae6b8-00fb-4519-ae45-36d36a9c90bb +begin + struct Foldable{C} + title::String + content::C + end + + function Base.show(io, mime::MIME"text/html", fld::Foldable) + write(io,"
$(fld.title)

") + show(io, mime, fld.content) + write(io,"

") + end +end + +# ╔═╡ 1cae04d1-82ca-47c8-b1fa-7fa5a754d4b1 +Foldable("Derivation details about the MLE.", md" +Due to the independence assumption, + +```math +p(\mathbf{y}|\mathbf{X}, \boldsymbol{\beta}, \sigma^2) = \prod_{n=1}^N p({y}_n|\mathbf{x}_n, \boldsymbol{\beta}, \sigma^2)= \prod_{n=1}^N \mathcal{N}(y_n; \mathbf{x}_n^\top \boldsymbol{\beta}, \sigma^2) +``` +Since the logarithm function is a monotonically increasing function, the maximum is invariant under the transformation. We therefore can maximise the log-likelihood function instead. And the log-likelihood function is + +$$\begin{align}\mathcal{L}(\beta_0, \boldsymbol{\beta}, \sigma^2) &= \ln \prod_{n} \mathcal{N}(y_n; \mathbf{x}_n^\top \boldsymbol{\beta}, \sigma^2)\\ +&= \sum_{n=1}^N \ln \left\{ (2\pi)^{-\frac{1}{2}}({\sigma^2})^{-\frac{1}{2}} \exp\left ( -\frac{1}{2 \sigma^2} (y_n - \beta_0 - \mathbf{x}_n^\top \boldsymbol{\beta})^2\right )\right \} \\ +&= {-\frac{N}{2}}\cdot 2\pi -\frac{N}{2}{\sigma^2} -\frac{1}{2 \sigma^2} \sum_{n=1}^N (y_n - \beta_0 - \mathbf{x}_n^\top \boldsymbol{\beta})^2\end{align}$$ + +Maximising the above log-likelihood is the same as minimising its negation, which leads to the least squared error estimation: + +```math +\begin{align} +\hat{\beta_0}, \hat{\boldsymbol{\beta}} &\leftarrow \arg\min -\mathcal{L}(\beta_0, \boldsymbol{\beta}, \sigma^2) \\ +&= \arg\min \sum_{n=1}^N (y_n - \beta_0 - \mathbf{x}_n^\top \boldsymbol{\beta})^2, +\end{align} +``` +where we have assumed ``\sigma^2`` is known. + +") + +# ╔═╡ 969df742-bc8a-4e89-9e5e-62cb9e7c2215 +begin + chain_outlier_data = sample(simple_1d_blr(X_new, yy_new), NUTS(), 2000) + parms_turing = describe(chain_outlier_data)[1][:, :mean] + β_samples = Array(chain_outlier_data[[:β₀, :β]]) + pred(x) = parms_turing[1:2]' * [1, x] + plt_outlier_gaussian = scatter(X_new, yy_new, xlabel=L"x", ylabel=L"y", label="", title="Ordinary Bayesian model") + plot!(0:0.1:1, pred, lw=2, label=L"\mathbb{E}[\mu|\mathcal{D}]", legend=:topleft) + plot!(0:0.1:1, (x) -> β₀ + β₁*x, lw=2, label="True model", legend=:topleft) + plot!(0:0.1:1, (x) -> β_samples[1, 1] + β_samples[1, 2] *x, lw=0.5, lc=:gray, label=L"\mu^{(r)} \sim p(\mu|\mathcal{D})", legend=:topleft) + for i in 2:50 + plot!(0:0.1:1, (x) -> β_samples[i, 1] + β_samples[i, 2] *x, lw=0.15, lc=:gray, label="", legend=:topright) + end + plt_outlier_gaussian +end; + +# ╔═╡ e585393f-e1bd-4199-984f-5a09745171cf +let + β_mean = describe(chain_robust)[1][:, :mean] + β_samples = Array(chain_robust[[:β₀, :β]]) + plt = scatter(X_new, yy_new, xlabel=L"x", ylabel=L"y", label="", title="Robust Bayesian model") + pred(x; β) = x*β[2] + β[1] + plot!(0:0.1:1, (x)->pred(x; β = β_mean), lw=2, label=L"\mathbb{E}[\mu|\mathcal{D}]", legend=:topleft) + plot!(0:0.1:1, (x) -> β₀ + β₁*x, lw=2, label="True model", legend=:topleft) + plot!(0:0.1:1, (x) -> pred(x; β = β_samples[1,:]), lw=0.5, lc=:gray, label=L"\mu^{(r)} \sim p(\mu|\mathcal{D})", legend=:topleft) + for i in 2:50 + plot!(0:0.1:1, (x) -> pred(x; β = β_samples[i,:]), lw=0.15, lc=:gray, label="", legend=:topright) + end + plot(plt_outlier_gaussian, plt) + +end + +# ╔═╡ 00000000-0000-0000-0000-000000000001 +PLUTO_PROJECT_TOML_CONTENTS = """ +[deps] +CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" +DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +GLM = "38e38edf-8417-5370-95a0-9cbb8c7f171a" +LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" +LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" +PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd" +Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0" + +[compat] +CSV = "~0.10.4" +DataFrames = "~1.3.4" +GLM = "~1.8.0" +LaTeXStrings = "~1.3.0" +Latexify = "~0.15.16" +PlutoUI = "~0.7.39" +StatsPlots = "~0.15.1" +Turing = "~0.21.9" +""" + +# ╔═╡ 00000000-0000-0000-0000-000000000002 +PLUTO_MANIFEST_TOML_CONTENTS = """ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.8.0" +manifest_format = "2.0" +project_hash = "93507a6fa1fa4a9f7dcf3a7d69a449aba8986a21" + +[[deps.AbstractFFTs]] +deps = ["ChainRulesCore", "LinearAlgebra"] +git-tree-sha1 = "69f7020bd72f069c219b5e8c236c1fa90d2cb409" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.2.1" + +[[deps.AbstractMCMC]] +deps = ["BangBang", "ConsoleProgressMonitor", "Distributed", "Logging", "LoggingExtras", "ProgressLogging", "Random", "StatsBase", "TerminalLoggers", "Transducers"] +git-tree-sha1 = "5c26c7759412ffcaf0dd6e3172e55d783dd7610b" +uuid = "80f14c24-f653-4e6a-9b94-39d6b0f70001" +version = "4.1.3" + +[[deps.AbstractPPL]] +deps = ["AbstractMCMC", "DensityInterface", "Setfield", "SparseArrays"] +git-tree-sha1 = "6320752437e9fbf49639a410017d862ad64415a5" +uuid = "7a57a42e-76ec-4ea3-a279-07e840d6d9cf" +version = "0.5.2" + +[[deps.AbstractPlutoDingetjes]] +deps = ["Pkg"] +git-tree-sha1 = "8eaf9f1b4921132a4cff3f36a1d9ba923b14a481" +uuid = "6e696c72-6542-2067-7265-42206c756150" +version = "1.1.4" + +[[deps.AbstractTrees]] +git-tree-sha1 = "03e0550477d86222521d254b741d470ba17ea0b5" +uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" +version = "0.3.4" + +[[deps.Adapt]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "195c5505521008abea5aee4f96930717958eac6f" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "3.4.0" + +[[deps.AdvancedHMC]] +deps = ["AbstractMCMC", "ArgCheck", "DocStringExtensions", "InplaceOps", "LinearAlgebra", "ProgressMeter", "Random", "Requires", "Setfield", "Statistics", "StatsBase", "StatsFuns", "UnPack"] +git-tree-sha1 = "345effa84030f273ee86fcdd706d8484ce9a1a3c" +uuid = "0bf59076-c3b1-5ca4-86bd-e02cd72cde3d" +version = "0.3.5" + +[[deps.AdvancedMH]] +deps = ["AbstractMCMC", "Distributions", "Random", "Requires"] +git-tree-sha1 = "d7a7dabeaef34e5106cdf6c2ac956e9e3f97f666" +uuid = "5b7e9947-ddc0-4b3f-9b55-0d8042f74170" +version = "0.6.8" + +[[deps.AdvancedPS]] +deps = ["AbstractMCMC", "Distributions", "Libtask", "Random", "StatsFuns"] +git-tree-sha1 = "9ff1247be1e2aa2e740e84e8c18652bd9d55df22" +uuid = "576499cb-2369-40b2-a588-c64705576edc" +version = "0.3.8" + +[[deps.AdvancedVI]] +deps = ["Bijectors", "Distributions", "DistributionsAD", "DocStringExtensions", "ForwardDiff", "LinearAlgebra", "ProgressMeter", "Random", "Requires", "StatsBase", "StatsFuns", "Tracker"] +git-tree-sha1 = "e743af305716a527cdb3a67b31a33a7c3832c41f" +uuid = "b5ca4192-6429-45e5-a2d9-87aec30a685c" +version = "0.1.5" + +[[deps.ArgCheck]] +git-tree-sha1 = "a3a402a35a2f7e0b87828ccabbd5ebfbebe356b4" +uuid = "dce04be8-c92d-5529-be00-80e4d2c0e197" +version = "2.3.0" + +[[deps.ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" +version = "1.1.1" + +[[deps.Arpack]] +deps = ["Arpack_jll", "Libdl", "LinearAlgebra", "Logging"] +git-tree-sha1 = "91ca22c4b8437da89b030f08d71db55a379ce958" +uuid = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97" +version = "0.5.3" + +[[deps.Arpack_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "OpenBLAS_jll", "Pkg"] +git-tree-sha1 = "5ba6c757e8feccf03a1554dfaf3e26b3cfc7fd5e" +uuid = "68821587-b530-5797-8361-c406ea357684" +version = "3.5.1+1" + +[[deps.ArrayInterfaceCore]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "40debc9f72d0511e12d817c7ca06a721b6423ba3" +uuid = "30b0a656-2188-435a-8636-2ec0e6a096e2" +version = "0.1.17" + +[[deps.ArrayInterfaceStaticArraysCore]] +deps = ["Adapt", "ArrayInterfaceCore", "LinearAlgebra", "StaticArraysCore"] +git-tree-sha1 = "a1e2cf6ced6505cbad2490532388683f1e88c3ed" +uuid = "dd5226c6-a4d4-4bc7-8575-46859f9c95b9" +version = "0.1.0" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[deps.AxisAlgorithms]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"] +git-tree-sha1 = "66771c8d21c8ff5e3a93379480a2307ac36863f7" +uuid = "13072b0f-2c55-5437-9ae7-d433b7a33950" +version = "1.0.1" + +[[deps.AxisArrays]] +deps = ["Dates", "IntervalSets", "IterTools", "RangeArrays"] +git-tree-sha1 = "1dd4d9f5beebac0c03446918741b1a03dc5e5788" +uuid = "39de3d68-74b9-583c-8d2d-e117c070f3a9" +version = "0.4.6" + +[[deps.BangBang]] +deps = ["Compat", "ConstructionBase", "Future", "InitialValues", "LinearAlgebra", "Requires", "Setfield", "Tables", "ZygoteRules"] +git-tree-sha1 = "b15a6bc52594f5e4a3b825858d1089618871bf9d" +uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" +version = "0.3.36" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[deps.Baselet]] +git-tree-sha1 = "aebf55e6d7795e02ca500a689d326ac979aaf89e" +uuid = "9718e550-a3fa-408a-8086-8db961cd8217" +version = "0.1.1" + +[[deps.Bijectors]] +deps = ["ArgCheck", "ChainRulesCore", "ChangesOfVariables", "Compat", "Distributions", "Functors", "InverseFunctions", "IrrationalConstants", "LinearAlgebra", "LogExpFunctions", "MappedArrays", "Random", "Reexport", "Requires", "Roots", "SparseArrays", "Statistics"] +git-tree-sha1 = "875f3845e1256ee1d9e0c8ca3993e709b32c0ed1" +uuid = "76274a88-744f-5084-9051-94815aaf08c4" +version = "0.10.3" + +[[deps.Bzip2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2" +uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" +version = "1.0.8+0" + +[[deps.CSV]] +deps = ["CodecZlib", "Dates", "FilePathsBase", "InlineStrings", "Mmap", "Parsers", "PooledArrays", "SentinelArrays", "Tables", "Unicode", "WeakRefStrings"] +git-tree-sha1 = "873fb188a4b9d76549b81465b1f75c82aaf59238" +uuid = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" +version = "0.10.4" + +[[deps.Cairo_jll]] +deps = ["Artifacts", "Bzip2_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "4b859a208b2397a7a623a03449e4636bdb17bcf2" +uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" +version = "1.16.1+1" + +[[deps.Calculus]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" +uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" +version = "0.5.1" + +[[deps.ChainRules]] +deps = ["ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "Statistics"] +git-tree-sha1 = "f9d6dd293ed05233d37a5644f880f5def9fdfae3" +uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" +version = "1.42.0" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "80ca332f6dcb2508adba68f22f551adb2d00a624" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.15.3" + +[[deps.ChangesOfVariables]] +deps = ["ChainRulesCore", "LinearAlgebra", "Test"] +git-tree-sha1 = "38f7a08f19d8810338d4f5085211c7dfa5d5bdd8" +uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" +version = "0.1.4" + +[[deps.Clustering]] +deps = ["Distances", "LinearAlgebra", "NearestNeighbors", "Printf", "SparseArrays", "Statistics", "StatsBase"] +git-tree-sha1 = "75479b7df4167267d75294d14b58244695beb2ac" +uuid = "aaaa29a8-35af-508c-8bc3-b662a17a0fe5" +version = "0.14.2" + +[[deps.CodecZlib]] +deps = ["TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "ded953804d019afa9a3f98981d99b33e3db7b6da" +uuid = "944b1d66-785c-5afd-91f1-9de20f533193" +version = "0.7.0" + +[[deps.ColorSchemes]] +deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "Random"] +git-tree-sha1 = "1fd869cc3875b57347f7027521f561cf46d1fcd8" +uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" +version = "3.19.0" + +[[deps.ColorTypes]] +deps = ["FixedPointNumbers", "Random"] +git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4" +uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" +version = "0.11.4" + +[[deps.ColorVectorSpace]] +deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "SpecialFunctions", "Statistics", "TensorCore"] +git-tree-sha1 = "d08c20eef1f2cbc6e60fd3612ac4340b89fea322" +uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" +version = "0.9.9" + +[[deps.Colors]] +deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] +git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40" +uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" +version = "0.12.8" + +[[deps.Combinatorics]] +git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" +uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" +version = "1.0.2" + +[[deps.CommonSolve]] +git-tree-sha1 = "332a332c97c7071600984b3c31d9067e1a4e6e25" +uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" +version = "0.2.1" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools", "Test"] +git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.0" + +[[deps.Compat]] +deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] +git-tree-sha1 = "9be8be1d8a6f44b96482c8af52238ea7987da3e3" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "3.45.0" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "0.5.2+0" + +[[deps.CompositionsBase]] +git-tree-sha1 = "455419f7e328a1a2493cabc6428d79e951349769" +uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" +version = "0.1.1" + +[[deps.ConsoleProgressMonitor]] +deps = ["Logging", "ProgressMeter"] +git-tree-sha1 = "3ab7b2136722890b9af903859afcf457fa3059e8" +uuid = "88cd18e8-d9cc-4ea6-8889-5259c0d15c8b" +version = "0.1.2" + +[[deps.ConstructionBase]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "59d00b3139a9de4eb961057eabb65ac6522be954" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.4.0" + +[[deps.Contour]] +git-tree-sha1 = "d05d9e7b7aedff4e5b51a029dced05cfb6125781" +uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" +version = "0.6.2" + +[[deps.Crayons]] +git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15" +uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" +version = "4.1.1" + +[[deps.DataAPI]] +git-tree-sha1 = "fb5f5316dd3fd4c5e7c30a24d50643b73e37cd40" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.10.0" + +[[deps.DataFrames]] +deps = ["Compat", "DataAPI", "Future", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrettyTables", "Printf", "REPL", "Reexport", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] +git-tree-sha1 = "daa21eb85147f72e41f6352a57fccea377e310a9" +uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +version = "1.3.4" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "d1fff3a548102f48987a52a2e0d114fa97d730f0" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.13" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.DataValues]] +deps = ["DataValueInterfaces", "Dates"] +git-tree-sha1 = "d88a19299eba280a6d062e135a43f00323ae70bf" +uuid = "e7dc6d0d-1eca-5fa6-8ad6-5aecde8b7ea5" +version = "0.4.13" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[deps.DefineSingletons]] +git-tree-sha1 = "0fba8b706d0178b4dc7fd44a96a92382c9065c2c" +uuid = "244e2a9f-e319-4986-a169-4d1fe445cd52" +version = "0.1.2" + +[[deps.DelimitedFiles]] +deps = ["Mmap"] +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" + +[[deps.DensityInterface]] +deps = ["InverseFunctions", "Test"] +git-tree-sha1 = "80c3e8639e3353e5d2912fb3a1916b8455e2494b" +uuid = "b429d917-457f-4dbc-8f4c-0cc954292b1d" +version = "0.4.0" + +[[deps.DiffResults]] +deps = ["StaticArrays"] +git-tree-sha1 = "c18e98cba888c6c25d1c3b048e4b3380ca956805" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.0.3" + +[[deps.DiffRules]] +deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] +git-tree-sha1 = "28d605d9a0ac17118fe2c5e9ce0fbb76c3ceb120" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.11.0" + +[[deps.Distances]] +deps = ["LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "3258d0659f812acde79e8a74b11f17ac06d0ca04" +uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" +version = "0.10.7" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[deps.Distributions]] +deps = ["ChainRulesCore", "DensityInterface", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"] +git-tree-sha1 = "aafa0665e3db0d3d0890cdc8191ea03dc279b042" +uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" +version = "0.25.66" + +[[deps.DistributionsAD]] +deps = ["Adapt", "ChainRules", "ChainRulesCore", "Compat", "DiffRules", "Distributions", "FillArrays", "LinearAlgebra", "NaNMath", "PDMats", "Random", "Requires", "SpecialFunctions", "StaticArrays", "StatsBase", "StatsFuns", "ZygoteRules"] +git-tree-sha1 = "ec811a2688b3504ce5b315fe7bc86464480d5964" +uuid = "ced4e74d-a319-5a8a-b0ac-84af2272839c" +version = "0.6.41" + +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.8.6" + +[[deps.Downloads]] +deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +version = "1.6.0" + +[[deps.DualNumbers]] +deps = ["Calculus", "NaNMath", "SpecialFunctions"] +git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566" +uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74" +version = "0.6.8" + +[[deps.DynamicPPL]] +deps = ["AbstractMCMC", "AbstractPPL", "BangBang", "Bijectors", "ChainRulesCore", "Distributions", "LinearAlgebra", "MacroTools", "Random", "Setfield", "Test", "ZygoteRules"] +git-tree-sha1 = "c6f574d855670c2906af3f4053e6db10224e5dda" +uuid = "366bfd00-2699-11ea-058f-f148b4cae6d8" +version = "0.19.3" + +[[deps.EarCut_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3f3a2501fa7236e9b911e0f7a588c657e822bb6d" +uuid = "5ae413db-bbd1-5e63-b57d-d24a61df00f5" +version = "2.2.3+0" + +[[deps.EllipticalSliceSampling]] +deps = ["AbstractMCMC", "ArrayInterfaceCore", "Distributions", "Random", "Statistics"] +git-tree-sha1 = "4cda4527e990c0cc201286e0a0bfbbce00abcfc2" +uuid = "cad2338a-1db2-11e9-3401-43bc07c9ede2" +version = "1.0.0" + +[[deps.Expat_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "bad72f730e9e91c08d9427d5e8db95478a3c323d" +uuid = "2e619515-83b5-522b-bb60-26c02a35a201" +version = "2.4.8+0" + +[[deps.Extents]] +git-tree-sha1 = "5e1e4c53fa39afe63a7d356e30452249365fba99" +uuid = "411431e0-e8b7-467b-b5e0-f676ba4f2910" +version = "0.1.1" + +[[deps.FFMPEG]] +deps = ["FFMPEG_jll"] +git-tree-sha1 = "b57e3acbe22f8484b4b5ff66a7499717fe1a9cc8" +uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" +version = "0.4.1" + +[[deps.FFMPEG_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] +git-tree-sha1 = "ccd479984c7838684b3ac204b716c89955c76623" +uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" +version = "4.4.2+0" + +[[deps.FFTW]] +deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] +git-tree-sha1 = "90630efff0894f8142308e334473eba54c433549" +uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" +version = "1.5.0" + +[[deps.FFTW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "c6033cc3892d0ef5bb9cd29b7f2f0331ea5184ea" +uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" +version = "3.3.10+0" + +[[deps.FilePathsBase]] +deps = ["Compat", "Dates", "Mmap", "Printf", "Test", "UUIDs"] +git-tree-sha1 = "129b104185df66e408edd6625d480b7f9e9823a0" +uuid = "48062228-2e41-5def-b9a4-89aafe57970f" +version = "0.9.18" + +[[deps.FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" + +[[deps.FillArrays]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"] +git-tree-sha1 = "246621d23d1f43e3b9c368bf3b72b2331a27c286" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "0.13.2" + +[[deps.FixedPointNumbers]] +deps = ["Statistics"] +git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc" +uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" +version = "0.8.4" + +[[deps.Fontconfig_jll]] +deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "21efd19106a55620a188615da6d3d06cd7f6ee03" +uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" +version = "2.13.93+0" + +[[deps.Formatting]] +deps = ["Printf"] +git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" +uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" +version = "0.4.2" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"] +git-tree-sha1 = "425e126d13023600ebdecd4cf037f96e396187dd" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "0.10.31" + +[[deps.FreeType2_jll]] +deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "87eb71354d8ec1a96d4a7636bd57a7347dde3ef9" +uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" +version = "2.10.4+0" + +[[deps.FriBidi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "aa31987c2ba8704e23c6c8ba8a4f769d5d7e4f91" +uuid = "559328eb-81f9-559d-9380-de523a88c83c" +version = "1.0.10+0" + +[[deps.FunctionWrappers]] +git-tree-sha1 = "241552bc2209f0fa068b6415b1942cc0aa486bcc" +uuid = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" +version = "1.1.2" + +[[deps.Functors]] +git-tree-sha1 = "223fffa49ca0ff9ce4f875be001ffe173b2b7de4" +uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196" +version = "0.2.8" + +[[deps.Future]] +deps = ["Random"] +uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" + +[[deps.GLFW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll"] +git-tree-sha1 = "d972031d28c8c8d9d7b41a536ad7bb0c2579caca" +uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" +version = "3.3.8+0" + +[[deps.GLM]] +deps = ["Distributions", "LinearAlgebra", "Printf", "Reexport", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "StatsModels"] +git-tree-sha1 = "039118892476c2bf045a43b88fcb75ed566000ff" +uuid = "38e38edf-8417-5370-95a0-9cbb8c7f171a" +version = "1.8.0" + +[[deps.GPUArraysCore]] +deps = ["Adapt"] +git-tree-sha1 = "d88b17a38322e153c519f5a9ed8d91e9baa03d8f" +uuid = "46192b85-c4d5-4398-a991-12ede77f4527" +version = "0.1.1" + +[[deps.GR]] +deps = ["Base64", "DelimitedFiles", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Pkg", "Printf", "Random", "RelocatableFolders", "Serialization", "Sockets", "Test", "UUIDs"] +git-tree-sha1 = "037a1ca47e8a5989cc07d19729567bb71bfabd0c" +uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" +version = "0.66.0" + +[[deps.GR_jll]] +deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Pkg", "Qt5Base_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "c8ab731c9127cd931c93221f65d6a1008dad7256" +uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" +version = "0.66.0+0" + +[[deps.GeoInterface]] +deps = ["Extents"] +git-tree-sha1 = "fb28b5dc239d0174d7297310ef7b84a11804dfab" +uuid = "cf35fbd7-0cd7-5166-be24-54bfbe79505f" +version = "1.0.1" + +[[deps.GeometryBasics]] +deps = ["EarCut_jll", "GeoInterface", "IterTools", "LinearAlgebra", "StaticArrays", "StructArrays", "Tables"] +git-tree-sha1 = "a7a97895780dab1085a97769316aa348830dc991" +uuid = "5c1252a2-5f33-56bf-86c9-59e7332b4326" +version = "0.4.3" + +[[deps.Gettext_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "9b02998aba7bf074d14de89f9d37ca24a1a0b046" +uuid = "78b55507-aeef-58d4-861c-77aaff3498b1" +version = "0.21.0+0" + +[[deps.Glib_jll]] +deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "a32d672ac2c967f3deb8a81d828afc739c838a06" +uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" +version = "2.68.3+2" + +[[deps.Graphite2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "344bf40dcab1073aca04aa0df4fb092f920e4011" +uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" +version = "1.3.14+0" + +[[deps.Grisu]] +git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" +uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" +version = "1.0.2" + +[[deps.HTTP]] +deps = ["Base64", "CodecZlib", "Dates", "IniFile", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "ed47af35905b7cc8f1a522ca684b35a212269bd8" +uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" +version = "1.2.0" + +[[deps.HarfBuzz_jll]] +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] +git-tree-sha1 = "129acf094d168394e80ee1dc4bc06ec835e510a3" +uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" +version = "2.8.1+1" + +[[deps.HypergeometricFunctions]] +deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions", "Test"] +git-tree-sha1 = "709d864e3ed6e3545230601f94e11ebc65994641" +uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" +version = "0.3.11" + +[[deps.Hyperscript]] +deps = ["Test"] +git-tree-sha1 = "8d511d5b81240fc8e6802386302675bdf47737b9" +uuid = "47d2ed2b-36de-50cf-bf87-49c2cf4b8b91" +version = "0.0.4" + +[[deps.HypertextLiteral]] +deps = ["Tricks"] +git-tree-sha1 = "c47c5fa4c5308f27ccaac35504858d8914e102f9" +uuid = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2" +version = "0.9.4" + +[[deps.IOCapture]] +deps = ["Logging", "Random"] +git-tree-sha1 = "f7be53659ab06ddc986428d3a9dcc95f6fa6705a" +uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" +version = "0.2.2" + +[[deps.IniFile]] +git-tree-sha1 = "f550e6e32074c939295eb5ea6de31849ac2c9625" +uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f" +version = "0.5.1" + +[[deps.InitialValues]] +git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3" +uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c" +version = "0.3.1" + +[[deps.InlineStrings]] +deps = ["Parsers"] +git-tree-sha1 = "d19f9edd8c34760dca2de2b503f969d8700ed288" +uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" +version = "1.1.4" + +[[deps.InplaceOps]] +deps = ["LinearAlgebra", "Test"] +git-tree-sha1 = "50b41d59e7164ab6fda65e71049fee9d890731ff" +uuid = "505f98c9-085e-5b2c-8e89-488be7bf1f34" +version = "0.3.0" + +[[deps.IntelOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "d979e54b71da82f3a65b62553da4fc3d18c9004c" +uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" +version = "2018.0.3+2" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[deps.Interpolations]] +deps = ["Adapt", "AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "Requires", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"] +git-tree-sha1 = "23e651bbb8d00e9971015d0dd306b780edbdb6b9" +uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" +version = "0.14.3" + +[[deps.IntervalSets]] +deps = ["Dates", "Random", "Statistics"] +git-tree-sha1 = "57af5939800bce15980bddd2426912c4f83012d8" +uuid = "8197267c-284f-5f27-9208-e0e47529a953" +version = "0.7.1" + +[[deps.InverseFunctions]] +deps = ["Test"] +git-tree-sha1 = "b3364212fb5d870f724876ffcd34dd8ec6d98918" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.7" + +[[deps.InvertedIndices]] +git-tree-sha1 = "bee5f1ef5bf65df56bdd2e40447590b272a5471f" +uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" +version = "1.1.0" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "7fd44fd4ff43fc60815f8e764c0f352b83c49151" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.1.1" + +[[deps.IterTools]] +git-tree-sha1 = "fa6287a4469f5e048d763df38279ee729fbd44e5" +uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" +version = "1.4.0" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLLWrappers]] +deps = ["Preferences"] +git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.4.1" + +[[deps.JSON]] +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "3c837543ddb02250ef42f4738347454f95079d4e" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.21.3" + +[[deps.JpegTurbo_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b53380851c6e6664204efb2e62cd24fa5c47e4ba" +uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" +version = "2.1.2+0" + +[[deps.KernelDensity]] +deps = ["Distributions", "DocStringExtensions", "FFTW", "Interpolations", "StatsBase"] +git-tree-sha1 = "9816b296736292a80b9a3200eb7fbb57aaa3917a" +uuid = "5ab0869b-81aa-558d-bb23-cbf5423bbe9b" +version = "0.6.5" + +[[deps.LAME_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "f6250b16881adf048549549fba48b1161acdac8c" +uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" +version = "3.100.1+0" + +[[deps.LERC_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" +uuid = "88015f11-f218-50d7-93a8-a6af411a945d" +version = "3.0.0+1" + +[[deps.LRUCache]] +git-tree-sha1 = "d64a0aff6691612ab9fb0117b0995270871c5dfc" +uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" +version = "1.3.0" + +[[deps.LZO_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e5b909bcf985c5e2605737d2ce278ed791b89be6" +uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" +version = "2.10.1+0" + +[[deps.LaTeXStrings]] +git-tree-sha1 = "f2355693d6778a178ade15952b7ac47a4ff97996" +uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +version = "1.3.0" + +[[deps.Latexify]] +deps = ["Formatting", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "Printf", "Requires"] +git-tree-sha1 = "1a43be956d433b5d0321197150c2f94e16c0aaa0" +uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" +version = "0.15.16" + +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" + +[[deps.LeftChildRightSiblingTrees]] +deps = ["AbstractTrees"] +git-tree-sha1 = "b864cb409e8e445688bc478ef87c0afe4f6d1f8d" +uuid = "1d6d02ad-be62-4b6b-8a6d-2f90e265016e" +version = "0.1.3" + +[[deps.LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" +version = "0.6.3" + +[[deps.LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" +version = "7.84.0+0" + +[[deps.LibGit2]] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[deps.LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" +version = "1.10.2+0" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[deps.Libffi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "0b4a5d71f3e5200a7dff793393e09dfc2d874290" +uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" +version = "3.2.2+1" + +[[deps.Libgcrypt_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"] +git-tree-sha1 = "64613c82a59c120435c067c2b809fc61cf5166ae" +uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" +version = "1.8.7+0" + +[[deps.Libglvnd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"] +git-tree-sha1 = "7739f837d6447403596a75d19ed01fd08d6f56bf" +uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" +version = "1.3.0+3" + +[[deps.Libgpg_error_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "c333716e46366857753e273ce6a69ee0945a6db9" +uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" +version = "1.42.0+0" + +[[deps.Libiconv_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "42b62845d70a619f063a7da093d995ec8e15e778" +uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" +version = "1.16.1+1" + +[[deps.Libmount_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "9c30530bf0effd46e15e0fdcf2b8636e78cbbd73" +uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" +version = "2.35.0+0" + +[[deps.Libtask]] +deps = ["FunctionWrappers", "LRUCache", "LinearAlgebra", "Statistics"] +git-tree-sha1 = "dfa6c5f2d5a8918dd97c7f1a9ea0de68c2365426" +uuid = "6f1fad26-d15e-5dc8-ae53-837a1d7b8c9f" +version = "0.7.5" + +[[deps.Libtiff_jll]] +deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "Pkg", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "3eb79b0ca5764d4799c06699573fd8f533259713" +uuid = "89763e89-9b03-5906-acba-b20f662cd828" +version = "4.4.0+0" + +[[deps.Libuuid_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "7f3efec06033682db852f8b3bc3c1d2b0a0ab066" +uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" +version = "2.36.0+0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[deps.LogExpFunctions]] +deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "361c2b088575b07946508f135ac556751240091c" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.17" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "5d4d2d9904227b8bd66386c1138cf4d5ffa826bf" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "0.4.9" + +[[deps.MCMCChains]] +deps = ["AbstractMCMC", "AxisArrays", "Compat", "Dates", "Distributions", "Formatting", "IteratorInterfaceExtensions", "KernelDensity", "LinearAlgebra", "MCMCDiagnosticTools", "MLJModelInterface", "NaturalSort", "OrderedCollections", "PrettyTables", "Random", "RecipesBase", "Serialization", "Statistics", "StatsBase", "StatsFuns", "TableTraits", "Tables"] +git-tree-sha1 = "8cb9b8fb081afd7728f5de25b9025bff97cb5c7a" +uuid = "c7f686f2-ff18-58e9-bc7b-31028e88f75d" +version = "5.3.1" + +[[deps.MCMCDiagnosticTools]] +deps = ["AbstractFFTs", "DataAPI", "Distributions", "LinearAlgebra", "MLJModelInterface", "Random", "SpecialFunctions", "Statistics", "StatsBase", "Tables"] +git-tree-sha1 = "058d08594e91ba1d98dcc3669f9421a76824aa95" +uuid = "be115224-59cd-429b-ad48-344e309966f0" +version = "0.1.3" + +[[deps.MKL_jll]] +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] +git-tree-sha1 = "e595b205efd49508358f7dc670a940c790204629" +uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" +version = "2022.0.0+0" + +[[deps.MLJModelInterface]] +deps = ["Random", "ScientificTypesBase", "StatisticalTraits"] +git-tree-sha1 = "16fa7c2e14aa5b3854bc77ab5f1dbe2cdc488903" +uuid = "e80e1ace-859a-464e-9ed9-23947d8ae3ea" +version = "1.6.0" + +[[deps.MacroTools]] +deps = ["Markdown", "Random"] +git-tree-sha1 = "3d3e902b31198a27340d0bf00d6ac452866021cf" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.9" + +[[deps.MappedArrays]] +git-tree-sha1 = "e8b359ef06ec72e8c030463fe02efe5527ee5142" +uuid = "dbb5928d-eab1-5f90-85c2-b9b0edb7c900" +version = "0.4.1" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[deps.MbedTLS]] +deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "Random", "Sockets"] +git-tree-sha1 = "d9ab10da9de748859a7780338e1d6566993d1f25" +uuid = "739be429-bea8-5141-9913-cc70e7f3736d" +version = "1.1.3" + +[[deps.MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +version = "2.28.0+0" + +[[deps.Measures]] +git-tree-sha1 = "e498ddeee6f9fdb4551ce855a46f54dbd900245f" +uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" +version = "0.3.1" + +[[deps.MicroCollections]] +deps = ["BangBang", "InitialValues", "Setfield"] +git-tree-sha1 = "6bb7786e4f24d44b4e29df03c69add1b63d88f01" +uuid = "128add7d-3638-4c79-886c-908ea0c25c34" +version = "0.1.2" + +[[deps.Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "bf210ce90b6c9eed32d25dbcae1ebc565df2687f" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "1.0.2" + +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[deps.MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" +version = "2022.2.1" + +[[deps.MultivariateStats]] +deps = ["Arpack", "LinearAlgebra", "SparseArrays", "Statistics", "StatsBase"] +git-tree-sha1 = "6d019f5a0465522bbfdd68ecfad7f86b535d6935" +uuid = "6f286f6a-111f-5878-ab1e-185364afe411" +version = "0.9.0" + +[[deps.NNlib]] +deps = ["Adapt", "ChainRulesCore", "LinearAlgebra", "Pkg", "Requires", "Statistics"] +git-tree-sha1 = "415108fd88d6f55cedf7ee940c7d4b01fad85421" +uuid = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" +version = "0.8.9" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "a7c3d1da1189a1c2fe843a3bfa04d18d20eb3211" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.0.1" + +[[deps.NamedArrays]] +deps = ["Combinatorics", "DataStructures", "DelimitedFiles", "InvertedIndices", "LinearAlgebra", "Random", "Requires", "SparseArrays", "Statistics"] +git-tree-sha1 = "2fd5787125d1a93fbe30961bd841707b8a80d75b" +uuid = "86f7a689-2022-50b4-a561-43c23ac3c673" +version = "0.9.6" + +[[deps.NaturalSort]] +git-tree-sha1 = "eda490d06b9f7c00752ee81cfa451efe55521e21" +uuid = "c020b1a1-e9b0-503a-9c33-f039bfc54a85" +version = "1.0.0" + +[[deps.NearestNeighbors]] +deps = ["Distances", "StaticArrays"] +git-tree-sha1 = "0e353ed734b1747fc20cd4cba0edd9ac027eff6a" +uuid = "b8a86587-4115-5ab1-83bc-aa920d37bbce" +version = "0.4.11" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" +version = "1.2.0" + +[[deps.Observables]] +git-tree-sha1 = "dfd8d34871bc3ad08cd16026c1828e271d554db9" +uuid = "510215fc-4207-5dde-b226-833fc4488ee2" +version = "0.5.1" + +[[deps.OffsetArrays]] +deps = ["Adapt"] +git-tree-sha1 = "1ea784113a6aa054c5ebd95945fa5e52c2f378e7" +uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +version = "1.12.7" + +[[deps.Ogg_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "887579a3eb005446d514ab7aeac5d1d027658b8f" +uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" +version = "1.3.5+1" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.20+0" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+0" + +[[deps.OpenSSL_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e60321e3f2616584ff98f0a4f18d98ae6f89bbb3" +uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" +version = "1.1.17+0" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.5+0" + +[[deps.Opus_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "51a08fb14ec28da2ec7a927c4337e4332c2a4720" +uuid = "91d4177d-7536-5919-b921-800302f37372" +version = "1.3.2+0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.4.1" + +[[deps.PCRE_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b2a7af664e098055a7529ad1a900ded962bca488" +uuid = "2f80f16e-611a-54ab-bc61-aa92de5b98fc" +version = "8.44.0+0" + +[[deps.PDMats]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "cf494dca75a69712a72b80bc48f59dcf3dea63ec" +uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" +version = "0.11.16" + +[[deps.Parsers]] +deps = ["Dates"] +git-tree-sha1 = "0044b23da09b5608b4ecacb4e5e6c6332f833a7e" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "2.3.2" + +[[deps.Pixman_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b4f5d02549a10e20780a24fce72bea96b6329e29" +uuid = "30392449-352a-5448-841d-b1acce4e97dc" +version = "0.40.1+0" + +[[deps.Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +version = "1.8.0" + +[[deps.PlotThemes]] +deps = ["PlotUtils", "Statistics"] +git-tree-sha1 = "8162b2f8547bc23876edd0c5181b27702ae58dce" +uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a" +version = "3.0.0" + +[[deps.PlotUtils]] +deps = ["ColorSchemes", "Colors", "Dates", "Printf", "Random", "Reexport", "Statistics"] +git-tree-sha1 = "9888e59493658e476d3073f1ce24348bdc086660" +uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" +version = "1.3.0" + +[[deps.Plots]] +deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "GeometryBasics", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs", "UnicodeFun", "Unzip"] +git-tree-sha1 = "79830c17fe30f234931767238c584b3a75b3329d" +uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" +version = "1.31.6" + +[[deps.PlutoUI]] +deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "Markdown", "Random", "Reexport", "UUIDs"] +git-tree-sha1 = "8d1f54886b9037091edf146b517989fc4a09efec" +uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" +version = "0.7.39" + +[[deps.PooledArrays]] +deps = ["DataAPI", "Future"] +git-tree-sha1 = "a6062fe4063cdafe78f4a0a81cfffb89721b30e7" +uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" +version = "1.4.2" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.3.0" + +[[deps.PrettyTables]] +deps = ["Crayons", "Formatting", "Markdown", "Reexport", "Tables"] +git-tree-sha1 = "dfb54c4e414caa595a1f2ed759b160f5a3ddcba5" +uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" +version = "1.3.1" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[deps.ProgressLogging]] +deps = ["Logging", "SHA", "UUIDs"] +git-tree-sha1 = "80d919dee55b9c50e8d9e2da5eeafff3fe58b539" +uuid = "33c8b6b6-d38a-422a-b730-caa89a2f386c" +version = "0.1.4" + +[[deps.ProgressMeter]] +deps = ["Distributed", "Printf"] +git-tree-sha1 = "d7a7aef8f8f2d537104f170139553b14dfe39fe9" +uuid = "92933f4c-e287-5a05-a399-4b506db050ca" +version = "1.7.2" + +[[deps.Qt5Base_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "xkbcommon_jll"] +git-tree-sha1 = "c6c0f690d0cc7caddb74cef7aa847b824a16b256" +uuid = "ea2cea3b-5b76-57ae-a6ef-0a8af62496e1" +version = "5.15.3+1" + +[[deps.QuadGK]] +deps = ["DataStructures", "LinearAlgebra"] +git-tree-sha1 = "78aadffb3efd2155af139781b8a8df1ef279ea39" +uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" +version = "2.4.2" + +[[deps.REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[deps.Random]] +deps = ["SHA", "Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[deps.RangeArrays]] +git-tree-sha1 = "b9039e93773ddcfc828f12aadf7115b4b4d225f5" +uuid = "b3c3ace0-ae52-54e7-9d0b-2c1406fd6b9d" +version = "0.3.2" + +[[deps.Ratios]] +deps = ["Requires"] +git-tree-sha1 = "dc84268fe0e3335a62e315a3a7cf2afa7178a734" +uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439" +version = "0.4.3" + +[[deps.RealDot]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" +uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" +version = "0.1.0" + +[[deps.RecipesBase]] +git-tree-sha1 = "6bf3f380ff52ce0832ddd3a2a7b9538ed1bcca7d" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.2.1" + +[[deps.RecipesPipeline]] +deps = ["Dates", "NaNMath", "PlotUtils", "RecipesBase"] +git-tree-sha1 = "e7eac76a958f8664f2718508435d058168c7953d" +uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" +version = "0.6.3" + +[[deps.RecursiveArrayTools]] +deps = ["Adapt", "ArrayInterfaceCore", "ArrayInterfaceStaticArraysCore", "ChainRulesCore", "DocStringExtensions", "FillArrays", "GPUArraysCore", "LinearAlgebra", "RecipesBase", "StaticArraysCore", "Statistics", "ZygoteRules"] +git-tree-sha1 = "4ce7584604489e537b2ab84ed92b4107d03377f0" +uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" +version = "2.31.2" + +[[deps.Reexport]] +git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.2.2" + +[[deps.RelocatableFolders]] +deps = ["SHA", "Scratch"] +git-tree-sha1 = "22c5201127d7b243b9ee1de3b43c408879dff60f" +uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" +version = "0.3.0" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.0" + +[[deps.Rmath]] +deps = ["Random", "Rmath_jll"] +git-tree-sha1 = "bf3188feca147ce108c76ad82c2792c57abe7b1f" +uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" +version = "0.7.0" + +[[deps.Rmath_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "68db32dff12bb6127bac73c209881191bf0efbb7" +uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" +version = "0.3.0+0" + +[[deps.Roots]] +deps = ["CommonSolve", "Printf", "Setfield"] +git-tree-sha1 = "50f945fb7d7fdece03bbc76ff1ab96170f64a892" +uuid = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" +version = "2.0.2" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.SciMLBase]] +deps = ["ArrayInterfaceCore", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "RecipesBase", "RecursiveArrayTools", "StaticArraysCore", "Statistics", "Tables"] +git-tree-sha1 = "3077587613bd4ba73e2acd4df2d1300ef19d8513" +uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" +version = "1.47.0" + +[[deps.ScientificTypesBase]] +git-tree-sha1 = "a8e18eb383b5ecf1b5e6fc237eb39255044fd92b" +uuid = "30f210dd-8aff-4c5f-94ba-8e64358c1161" +version = "3.0.0" + +[[deps.Scratch]] +deps = ["Dates"] +git-tree-sha1 = "f94f779c94e58bf9ea243e77a37e16d9de9126bd" +uuid = "6c6a2e73-6563-6170-7368-637461726353" +version = "1.1.1" + +[[deps.SentinelArrays]] +deps = ["Dates", "Random"] +git-tree-sha1 = "db8481cf5d6278a121184809e9eb1628943c7704" +uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" +version = "1.3.13" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[deps.Setfield]] +deps = ["ConstructionBase", "Future", "MacroTools", "Requires"] +git-tree-sha1 = "38d88503f695eb0301479bc9b0d4320b378bafe5" +uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" +version = "0.8.2" + +[[deps.SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[deps.ShiftedArrays]] +git-tree-sha1 = "22395afdcf37d6709a5a0766cc4a5ca52cb85ea0" +uuid = "1277b4bf-5013-50f5-be3d-901d8477a67a" +version = "1.0.0" + +[[deps.Showoff]] +deps = ["Dates", "Grisu"] +git-tree-sha1 = "91eddf657aca81df9ae6ceb20b959ae5653ad1de" +uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f" +version = "1.0.3" + +[[deps.SimpleBufferStream]] +git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1" +uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" +version = "1.1.0" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[deps.SortingAlgorithms]] +deps = ["DataStructures"] +git-tree-sha1 = "b3363d7460f7d098ca0912c69b082f75625d7508" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "1.0.1" + +[[deps.SparseArrays]] +deps = ["LinearAlgebra", "Random"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + +[[deps.SpecialFunctions]] +deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "d75bda01f8c31ebb72df80a46c88b25d1c79c56d" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.1.7" + +[[deps.SplittablesBase]] +deps = ["Setfield", "Test"] +git-tree-sha1 = "39c9f91521de844bad65049efd4f9223e7ed43f9" +uuid = "171d559e-b47b-412a-8079-5efa626c420e" +version = "0.1.14" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "Random", "StaticArraysCore", "Statistics"] +git-tree-sha1 = "23368a3313d12a2326ad0035f0db0c0966f438ef" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.5.2" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "66fe9eb253f910fe8cf161953880cfdaef01cdf0" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.0.1" + +[[deps.StatisticalTraits]] +deps = ["ScientificTypesBase"] +git-tree-sha1 = "30b9236691858e13f167ce829490a68e1a597782" +uuid = "64bff920-2084-43da-a3e6-9bb72801c0c9" +version = "3.2.0" + +[[deps.Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.StatsAPI]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "f9af7f195fb13589dd2e2d57fdb401717d2eb1f6" +uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +version = "1.5.0" + +[[deps.StatsBase]] +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "d1bf48bfcc554a3761a133fe3a9bb01488e06916" +uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +version = "0.33.21" + +[[deps.StatsFuns]] +deps = ["ChainRulesCore", "HypergeometricFunctions", "InverseFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] +git-tree-sha1 = "5783b877201a82fc0014cbf381e7e6eb130473a4" +uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" +version = "1.0.1" + +[[deps.StatsModels]] +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "Printf", "REPL", "ShiftedArrays", "SparseArrays", "StatsBase", "StatsFuns", "Tables"] +git-tree-sha1 = "f8ba54b202c77622a713e25e7616d618308b34d3" +uuid = "3eaba693-59b7-5ba5-a881-562e759f1c8d" +version = "0.6.31" + +[[deps.StatsPlots]] +deps = ["AbstractFFTs", "Clustering", "DataStructures", "DataValues", "Distributions", "Interpolations", "KernelDensity", "LinearAlgebra", "MultivariateStats", "Observables", "Plots", "RecipesBase", "RecipesPipeline", "Reexport", "StatsBase", "TableOperations", "Tables", "Widgets"] +git-tree-sha1 = "2b35ba790f1f823872dcf378a6d3c3b520092eac" +uuid = "f3b207a7-027a-5e70-b257-86293d7955fd" +version = "0.15.1" + +[[deps.StructArrays]] +deps = ["Adapt", "DataAPI", "StaticArrays", "Tables"] +git-tree-sha1 = "ec47fb6069c57f1cee2f67541bf8f23415146de7" +uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +version = "0.6.11" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.0" + +[[deps.TableOperations]] +deps = ["SentinelArrays", "Tables", "Test"] +git-tree-sha1 = "e383c87cf2a1dc41fa30c093b2a19877c83e1bc1" +uuid = "ab02a1b2-a7df-11e8-156e-fb1833f50b87" +version = "1.2.0" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits", "Test"] +git-tree-sha1 = "5ce79ce186cc678bbb5c5681ca3379d1ddae11a1" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.7.0" + +[[deps.Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" +version = "1.10.0" + +[[deps.TensorCore]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" +uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" +version = "0.1.1" + +[[deps.TerminalLoggers]] +deps = ["LeftChildRightSiblingTrees", "Logging", "Markdown", "Printf", "ProgressLogging", "UUIDs"] +git-tree-sha1 = "62846a48a6cd70e63aa29944b8c4ef704360d72f" +uuid = "5d786b92-1e48-4d6f-9151-6b4477ca9bed" +version = "0.1.5" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.Tracker]] +deps = ["Adapt", "DiffRules", "ForwardDiff", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NNlib", "NaNMath", "Printf", "Random", "Requires", "SpecialFunctions", "Statistics"] +git-tree-sha1 = "0874c1b5de1b5529b776cfeca3ec0acfada97b1b" +uuid = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" +version = "0.2.20" + +[[deps.TranscodingStreams]] +deps = ["Random", "Test"] +git-tree-sha1 = "216b95ea110b5972db65aa90f88d8d89dcb8851c" +uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +version = "0.9.6" + +[[deps.Transducers]] +deps = ["Adapt", "ArgCheck", "BangBang", "Baselet", "CompositionsBase", "DefineSingletons", "Distributed", "InitialValues", "Logging", "Markdown", "MicroCollections", "Requires", "Setfield", "SplittablesBase", "Tables"] +git-tree-sha1 = "c76399a3bbe6f5a88faa33c8f8a65aa631d95013" +uuid = "28d57a85-8fef-5791-bfe6-a80928e7c999" +version = "0.4.73" + +[[deps.Tricks]] +git-tree-sha1 = "6bac775f2d42a611cdfcd1fb217ee719630c4175" +uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" +version = "0.1.6" + +[[deps.Turing]] +deps = ["AbstractMCMC", "AdvancedHMC", "AdvancedMH", "AdvancedPS", "AdvancedVI", "BangBang", "Bijectors", "DataStructures", "DiffResults", "Distributions", "DistributionsAD", "DocStringExtensions", "DynamicPPL", "EllipticalSliceSampling", "ForwardDiff", "Libtask", "LinearAlgebra", "MCMCChains", "NamedArrays", "Printf", "Random", "Reexport", "Requires", "SciMLBase", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Tracker", "ZygoteRules"] +git-tree-sha1 = "d5e128d1a8db72ebdd2b76644d19128cf90dda29" +uuid = "fce5fe82-541a-59a6-adf8-730c64b5f9a0" +version = "0.21.9" + +[[deps.URIs]] +git-tree-sha1 = "e59ecc5a41b000fa94423a578d29290c7266fc10" +uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" +version = "1.4.0" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[deps.UnPack]] +git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" +uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" +version = "1.0.2" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[deps.UnicodeFun]] +deps = ["REPL"] +git-tree-sha1 = "53915e50200959667e78a92a418594b428dffddf" +uuid = "1cfade01-22cf-5700-b092-accc4b62d6e1" +version = "0.4.1" + +[[deps.Unzip]] +git-tree-sha1 = "34db80951901073501137bdbc3d5a8e7bbd06670" +uuid = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" +version = "0.1.2" + +[[deps.Wayland_jll]] +deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "3e61f0b86f90dacb0bc0e73a0c5a83f6a8636e23" +uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" +version = "1.19.0+0" + +[[deps.Wayland_protocols_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4528479aa01ee1b3b4cd0e6faef0e04cf16466da" +uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91" +version = "1.25.0+0" + +[[deps.WeakRefStrings]] +deps = ["DataAPI", "InlineStrings", "Parsers"] +git-tree-sha1 = "b1be2855ed9ed8eac54e5caff2afcdb442d52c23" +uuid = "ea10d353-3f73-51f8-a26c-33c1cb351aa5" +version = "1.4.2" + +[[deps.Widgets]] +deps = ["Colors", "Dates", "Observables", "OrderedCollections"] +git-tree-sha1 = "fcdae142c1cfc7d89de2d11e08721d0f2f86c98a" +uuid = "cc8bc4a8-27d6-5769-a93b-9d913e69aa62" +version = "0.6.6" + +[[deps.WoodburyMatrices]] +deps = ["LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "de67fa59e33ad156a590055375a30b23c40299d3" +uuid = "efce3f68-66dc-5838-9240-27a6d6f5f9b6" +version = "0.5.5" + +[[deps.XML2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "58443b63fb7e465a8a7210828c91c08b92132dff" +uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" +version = "2.9.14+0" + +[[deps.XSLT_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"] +git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" +uuid = "aed1982a-8fda-507f-9586-7b0439959a61" +version = "1.1.34+0" + +[[deps.Xorg_libX11_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] +git-tree-sha1 = "5be649d550f3f4b95308bf0183b82e2582876527" +uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" +version = "1.6.9+4" + +[[deps.Xorg_libXau_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4e490d5c960c314f33885790ed410ff3a94ce67e" +uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" +version = "1.0.9+4" + +[[deps.Xorg_libXcursor_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "12e0eb3bc634fa2080c1c37fccf56f7c22989afd" +uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" +version = "1.2.0+4" + +[[deps.Xorg_libXdmcp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4fe47bd2247248125c428978740e18a681372dd4" +uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" +version = "1.1.3+4" + +[[deps.Xorg_libXext_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "b7c0aa8c376b31e4852b360222848637f481f8c3" +uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" +version = "1.3.4+4" + +[[deps.Xorg_libXfixes_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "0e0dc7431e7a0587559f9294aeec269471c991a4" +uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" +version = "5.0.3+4" + +[[deps.Xorg_libXi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] +git-tree-sha1 = "89b52bc2160aadc84d707093930ef0bffa641246" +uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" +version = "1.7.10+4" + +[[deps.Xorg_libXinerama_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll"] +git-tree-sha1 = "26be8b1c342929259317d8b9f7b53bf2bb73b123" +uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" +version = "1.1.4+4" + +[[deps.Xorg_libXrandr_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "34cea83cb726fb58f325887bf0612c6b3fb17631" +uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" +version = "1.5.2+4" + +[[deps.Xorg_libXrender_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "19560f30fd49f4d4efbe7002a1037f8c43d43b96" +uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" +version = "0.9.10+4" + +[[deps.Xorg_libpthread_stubs_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "6783737e45d3c59a4a4c4091f5f88cdcf0908cbb" +uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" +version = "0.1.0+3" + +[[deps.Xorg_libxcb_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] +git-tree-sha1 = "daf17f441228e7a3833846cd048892861cff16d6" +uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" +version = "1.13.0+3" + +[[deps.Xorg_libxkbfile_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "926af861744212db0eb001d9e40b5d16292080b2" +uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" +version = "1.1.0+4" + +[[deps.Xorg_xcb_util_image_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "0fab0a40349ba1cba2c1da699243396ff8e94b97" +uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll"] +git-tree-sha1 = "e7fd7b2881fa2eaa72717420894d3938177862d1" +uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_keysyms_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "d1151e2c45a544f32441a567d1690e701ec89b00" +uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_renderutil_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "dfd7a8f38d4613b6a575253b3174dd991ca6183e" +uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e" +version = "0.3.9+1" + +[[deps.Xorg_xcb_util_wm_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "e78d10aab01a4a154142c5006ed44fd9e8e31b67" +uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361" +version = "0.4.1+1" + +[[deps.Xorg_xkbcomp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxkbfile_jll"] +git-tree-sha1 = "4bcbf660f6c2e714f87e960a171b119d06ee163b" +uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" +version = "1.4.2+4" + +[[deps.Xorg_xkeyboard_config_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xkbcomp_jll"] +git-tree-sha1 = "5c8424f8a67c3f2209646d4425f3d415fee5931d" +uuid = "33bec58e-1273-512f-9401-5d533626f822" +version = "2.27.0+4" + +[[deps.Xorg_xtrans_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "79c31e7844f6ecf779705fbc12146eb190b7d845" +uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" +version = "1.4.0+3" + +[[deps.Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.12+3" + +[[deps.Zstd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e45044cd873ded54b6a5bac0eb5c971392cf1927" +uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" +version = "1.5.2+0" + +[[deps.ZygoteRules]] +deps = ["MacroTools"] +git-tree-sha1 = "8c1a8e4dfacb1fd631745552c8db35d0deb09ea0" +uuid = "700de1a5-db45-46bc-99cf-38207098b444" +version = "0.2.2" + +[[deps.libaom_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3a2ea60308f0996d26f1e5354e10c24e9ef905d4" +uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" +version = "3.4.0+0" + +[[deps.libass_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "5982a94fcba20f02f42ace44b9894ee2b140fe47" +uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" +version = "0.15.1+0" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.1.1+0" + +[[deps.libfdk_aac_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "daacc84a041563f965be61859a36e17c4e4fcd55" +uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" +version = "2.0.2+0" + +[[deps.libpng_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "94d180a6d2b5e55e447e2d27a29ed04fe79eb30c" +uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" +version = "1.6.38+0" + +[[deps.libvorbis_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll", "Pkg"] +git-tree-sha1 = "b910cb81ef3fe6e78bf6acee440bda86fd6ae00c" +uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" +version = "1.3.7+1" + +[[deps.nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" +version = "1.48.0+0" + +[[deps.p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "17.4.0+0" + +[[deps.x264_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4fea590b89e6ec504593146bf8b988b2c00922b2" +uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a" +version = "2021.5.5+0" + +[[deps.x265_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "ee567a171cce03570d77ad3a43e90218e38937a9" +uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" +version = "3.5.0+0" + +[[deps.xkbcommon_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll", "Wayland_protocols_jll", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] +git-tree-sha1 = "ece2350174195bb31de1a63bea3a41ae1aa593b6" +uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" +version = "0.9.1+5" +""" + +# ╔═╡ Cell order: +# ╟─da388a86-19cb-11ed-0c64-95c301c27153 +# ╟─c1026d6b-4e2e-4045-923e-eb5886b45604 +# ╟─4ed16d76-2815-4f8c-8ab0-3819a03a1acc +# ╟─c8547607-92be-4700-9468-863798c2ddce +# ╟─8f95b8c8-70a0-471a-be06-3b020db667b3 +# ╟─3a46c193-5a25-423f-bcb5-038f3756d7ba +# ╟─1cae04d1-82ca-47c8-b1fa-7fa5a754d4b1 +# ╟─f8040fa0-fdff-42da-8b9f-785627f51ee1 +# ╟─c6938b7f-e6e5-4bea-a273-52ab3916d07c +# ╟─effcd3d2-ba90-4ca8-a69c-f1ef1ad697ab +# ╠═3e98e9ff-b674-43f9-a3e0-1ca5d8614327 +# ╟─af404db3-7397-4fd7-a5f4-0c812bd90c4a +# ╟─af2e55f3-08b8-48d4-ae95-e65168a23eeb +# ╟─43191a7a-f1a2-41df-910d-cf85907e8f7a +# ╟─98ef1cca-de03-44c2-bcf4-6e79da139e11 +# ╟─9387dcb4-3f4e-4ec7-8393-30a483e00c63 +# ╟─59dd8a13-89c6-4ae9-8546-877bb7992570 +# ╟─632575ce-a1ce-4a36-95dc-010229367446 +# ╠═e9bb7a3c-9143-48c5-b33f-e7d6b48cb224 +# ╟─1ef001cc-fe70-42e5-8b97-690bb725a734 +# ╠═4ae89384-017d-4937-bcc9-3d8c63edaeb5 +# ╟─1761f829-6c7d-4186-a66c-b347be7c9a15 +# ╠═d57a7a26-a8a5-429d-b1b9-5e0499549544 +# ╟─ba598c45-a76e-41aa-bfd6-a64bb6cea875 +# ╟─391a1dc8-673a-47e9-aea3-ad79f366460d +# ╟─d3d8fe25-e674-42de-ac49-b83aac402e2d +# ╠═748c1ff2-2346-44f4-a799-75fb2002c6fc +# ╟─ae720bcd-1607-4155-9a69-bfb6944d5dde +# ╟─08f7be6d-fda9-4013-88f5-92f1b5d26336 +# ╠═40daa902-cb85-4cda-9b9f-7a32ee9cbf1c +# ╠═ab77aef9-920c-423a-9ce0-2b5adead1b7f +# ╟─b1d7e28a-b802-4fa1-87ab-7df3369a468a +# ╟─4293298e-52a5-40ca-970d-3f17c2c89adb +# ╟─860c4cf4-59b2-4036-8a30-7fbf44b18648 +# ╟─74a9a678-60b9-4e3f-97a2-56c8fdc7094f +# ╠═435036f6-76fc-458b-b0eb-119de02eabb7 +# ╟─6eff54f2-d2e0-4c18-8eda-3be3124b16a0 +# ╠═f11a15c9-bb0b-43c1-83e6-dce55f2a772f +# ╟─03b571e6-9d35-4123-b7bb-5f3b31558c9e +# ╠═7cffa790-bf2d-473f-95cc-ed67802d7b4f +# ╟─21aaa2db-6df0-4573-8951-bdfd9b6be6f9 +# ╠═b1401e7d-9207-4e31-b5ce-df82c8e9b069 +# ╟─241faf68-49b2-404b-b5d5-99061d1dd2a7 +# ╟─796ad911-9c95-454f-95f4-df5370b2496a +# ╟─ce97fbba-f5d0-42de-8b67-827c3478d8b0 +# ╠═f3b6f3ab-4304-4ef4-933c-728841c17998 +# ╟─ab51e2c3-dbd4-43e1-95b5-a875954ac532 +# ╠═e1db0ee1-1d91-49c4-be6c-1ea276750bfc +# ╟─80727f81-2440-4da5-8a8b-38ebfdc4ddc9 +# ╠═929330bf-beb5-4e42-8668-2a10adf13972 +# ╠═9668ab51-f86d-4af5-bf1e-3bef7081a53f +# ╠═ead10892-a94c-40a4-b8ed-efa96d4a32b8 +# ╟─6a330f81-f581-4ccd-8868-8a5b22afe9b8 +# ╠═b1f6c262-1a2d-4973-bd1a-ba363bcc5c41 +# ╟─659a3760-0a18-4a95-8168-fc6ca237c4d5 +# ╟─2e7f780e-8850-446e-97f8-51ec26f5e36a +# ╟─65d702d6-abec-43a1-89a8-95c30b3e748a +# ╟─611ad745-f92d-47ac-8d58-6f9baaf3077c +# ╟─ddb0d87e-cf0a-4b09-9bb6-4ee267fcdb9d +# ╟─1954544c-48b4-4997-871f-50c9bfa402b7 +# ╟─85ae4791-6262-4f07-9796-749982e00fec +# ╠═08c52bf6-0920-43e7-92a9-275ed298c9ac +# ╠═11021fb7-b072-46ac-8c23-f92825182c8c +# ╠═cece17c2-bacb-4b4a-897c-4116688812c6 +# ╠═c1e96563-849a-415a-b28a-b45b3a9548bb +# ╠═62582b10-924c-4ab8-9c2a-efa45c3ce57c +# ╠═29175b82-f208-4fcf-9704-4a1996cc6e3c +# ╟─05b90ddb-8479-4fbf-a469-d5b0bf4a91c8 +# ╠═2d7f773e-9fa1-475d-9f74-c13908209aeb +# ╟─8a0692db-6b85-42f6-8893-4219d58b1032 +# ╟─3c3f6378-ed20-4f40-a780-f9329ace34bc +# ╠═a43189a3-a94f-4e69-85b1-3a586b2cc0eb +# ╟─4bf4c216-fefb-40fc-9d36-eaa82ff5454b +# ╟─5a507f39-a6be-43aa-a909-4c87005ad1d2 +# ╟─db76ed48-f0c0-4664-b2cf-d47be7faaa3f +# ╟─fc324c67-85be-4c50-b315-9d00ad1dc2be +# ╠═61b1e15f-f3ff-4649-b90b-e85e2d172aaf +# ╟─7e992f3e-0337-4b5f-8f4d-c20bdb3b6b66 +# ╠═ddc0f5b3-385a-4ceb-82e1-f218299b26d9 +# ╠═9eef45d5-0cd2-460e-940f-bdc7114106c3 +# ╟─1d5835ad-4e04-48f0-90e6-aa1776d9406f +# ╟─ee37602c-229c-4709-8b29-627d32a25823 +# ╟─0fc9fd84-9fb1-42a1-bd68-8a9fcdce999d +# ╟─9348f3e5-4224-46f5-bc07-dee20b47a8d3 +# ╟─36fb8291-fea9-4f9f-ac52-a0eb61c2c8a8 +# ╟─f67d1d47-1e25-4c05-befd-c958dce45168 +# ╠═e4a67732-ff93-476e-8f5b-8433c1bf015e +# ╠═92206a26-d361-4be5-b215-3ae388dd7f2f +# ╟─c65e9c09-52c5-4647-9414-ad53841e8ff3 +# ╟─e585393f-e1bd-4199-984f-5a09745171cf +# ╟─40f528f0-acca-43ff-a500-16aeb97898c8 +# ╠═9fdaefb8-28b4-4b70-8412-1275dc1ed224 +# ╠═559660b8-1e69-41fe-9139-d031eb26e31c +# ╟─85a22998-d3e7-4c48-b191-4ebbe9e813f3 +# ╟─139b5acb-c938-4fc9-84a5-fdcbd697b9da +# ╟─d8dae6b8-00fb-4519-ae45-36d36a9c90bb +# ╟─969df742-bc8a-4e89-9e5e-62cb9e7c2215 +# ╟─00000000-0000-0000-0000-000000000001 +# ╟─00000000-0000-0000-0000-000000000002 diff --git a/section6_logistic_regression.jl b/section6_logistic_regression.jl new file mode 100644 index 0000000..2c4ea87 --- /dev/null +++ b/section6_logistic_regression.jl @@ -0,0 +1,2318 @@ +### A Pluto.jl notebook ### +# v0.19.11 + +using Markdown +using InteractiveUtils + +# ╔═╡ bce03358-19c9-11ed-31d9-5b0929af50b6 +begin + using PlutoUI + using StatsPlots + using Turing + using DataFrames + using StatsFuns: logistic + using Random + using LaTeXStrings + using Logging; Logging.disable_logging(Logging.Warn); +end; + +# ╔═╡ 74a2053f-ef53-41df-8afc-997c166e6f67 +begin + using RDatasets + # Import the "Default" dataset. + default_df = dataset("ISLR", "Default"); + # Show the first six rows of the dataset. + first(default_df, 6) +end + +# ╔═╡ 0a8fff98-24fd-49d6-a6b2-061e6350350b +TableOfContents() + +# ╔═╡ 9810605e-586b-4f38-a43c-4240cb91e154 +md""" +# Bayesian logistic regression +""" + +# ╔═╡ e752d05f-bc3c-42a4-ac5a-0517637c59b9 +md""" + +## Frequentist's logistic regression + +### The model +Recall linear regression's probabilistic model: + +```math +p(y_n|\mathbf{x}_n, \beta_0, \boldsymbol{\beta}_1, \sigma^2) = \mathcal{N}(y_n; \mu(\mathbf{x}_n), \sigma^2), +``` +where ``\mu`` is a linear function of the input ``\mathbf{x}_n`` +```math +\mu(\mathbf{x}_n) = \beta_0+\mathbf{x}_n^\top \boldsymbol{\beta}_1, +``` +and a Gaussian likelihood is assumed for the target ``y_n``. + +For binary classifications, ``y_n`` can only take binary choices (assume ``y_n\in \{0,1\}``). To reflect the change, a Bernoulli likelihood seems more suitable. However, a direct replacement of the mean parameter such as + +```math +\text{WRONG: }\;\;p(y_n|\mathbf{x}_n, \beta_0, \boldsymbol{\beta}_1) = \texttt{Bernoulli}(y_n; \mu(\mathbf{x}_n))= \begin{cases} \mu(\mathbf{x}_n) & y=1\\ 1-\mu(\mathbf{x}_n) & y=0\end{cases} +``` + +would not work, since a Bernoulli distribution's parameter needs to be between 0 and 1 but ``\mu(\mathbf{x})\in R`` as a linear function is not constrained. + + +A remedy is to impose a ``R\rightarrow [0,1]`` function to squeeze an unconstrained input of ``\mu`` to be between 0 and 1. And the logistic function does exactly the trick. The function is defined as + +```math +\texttt{logistic}(\mu) \triangleq \sigma(\mu) = \frac{1}{1+e^{-\mu}}. +``` + +We use `\sigma` as a shorthand notation for the logistic transformation. The function is plotted below: + +$(begin +plot(logistic, xlabel=L"\mu", ylabel="", label=L"\texttt{logistic}(\mu)", legend=:topleft, lw=2, size=(450,300)) +end) + +Note that no matter what the input is, the output is always between 0 and 1, which is exactly what we need. + +""" + +# ╔═╡ 793a70b2-af69-4b4c-b4c0-8eef3b4654e9 +md""" + +To put above steps together, we have the frequentist's probabilistic model for logistic regression: + + +!!! information "Logistic regression" + ```math + p(y_n|\mathbf{x}_n, \boldsymbol{\beta}) = \texttt{Bernoulli}(y_n; \sigma(\mu_n)), + ``` + where ``\mu_n= \beta_0 + \mathbf{x}_n^\top\boldsymbol{\beta}_1``. +""" + +# ╔═╡ af482903-2975-48d7-a4fe-4cebfa337a2b +md""" + +### Estimation + +A logistic regression model can be fit again by maximising the likelihood function + +```math +\hat{\boldsymbol{\beta}} \leftarrow \arg\max p(\mathbf{y}|\mathbf{X}, \boldsymbol{\beta}). +``` + +Since the optimation problem has no closed-form analytical solution, an iterative gradient-based optimisation algorithm such as gradient descent is usually used to find the MLE estimator. In Julia, logistic regressions can be fit by using `GLM.jl`. +""" + +# ╔═╡ ada4ad28-358e-4144-9d5c-f3b1d27deff1 +md""" +### A toy example + +""" + +# ╔═╡ 7a189076-f53f-48ed-ace2-ffbcc287ff6f +begin + D1 = [ + 7 4; + 5 6; + 8 6; + 9.5 5; + 9 7 + ] + + D2 = [ + 2 3; + 3 2; + 3 6; + 5.5 4.5; + 5 3; + ] + + D = [D1; D2] + targets = [ones(5); zeros(5)] + AB = [1.5 8; 10 1.9] +end; + +# ╔═╡ 1068259e-a7f6-4a56-b526-59e080c54d27 +begin + using GLM + glm_fit = glm([ones(size(D)[1]) D], targets, Bernoulli(), LogitLink()) +end + +# ╔═╡ 0ca3c752-627f-40ce-ac6c-d10fc90d4663 +begin + using StatsBase + XX, yy = Matrix(default_df[!, [:Balance, :Income, :StudentNum]]), default_df[!, :DefaultNum] + feature_scalar = fit(ZScoreTransform, XX[:, 1:2], dims=1) + XX[:, 1:2] .= StatsBase.transform(feature_scalar, XX[:, 1:2]) +end; + +# ╔═╡ 60a5cad4-c676-4334-8cbe-47877a68943f +md""" +We have plotted the fit model below. It can be observed the fitted regression function, defined as + +```math +p(y_n=1|\mathbf{x}_n, \hat\beta_0, \hat{\boldsymbol{\beta}}_1) = \hat{\sigma}(\mu_n)= \frac{1}{1+\exp(- \hat\beta_0 - \mathbf{x}_n^\top\hat{\boldsymbol{\beta}}_1)} +``` + +is a very sharp S-shaped surface valued between 0 and 1. Towards the top right corner of the input space, the prediction is closer to 1.0, entailing the output ``y_n`` is more likely to be positive (or class 1). And the model also implies a linear decision boundary as expected. +""" + +# ╔═╡ ccda7f54-67ee-4d17-a16c-6f8597447d1e +md""" +#### Pathological frequentist's prediction +One thing worth noting is the sharpness of the prediction surface. Data points on one side of the thin decision boundary are all indistinguishably predicted with either ``p(y_n=1|\ldots)=1,`` or ``0``. Such a clean-cut prediction is counter-intuitive. It should be naturally expected that +* predictions near the boundary should be more uncertain than those further away +* predictions further away from the observed data (marked as ```A, B``` in the figure) should be more uncertain. + +We will see next how Bayesian approaches the problem and provides us with an alternative prediction which is more reasonable. +""" + +# ╔═╡ e2918ef9-7f86-4d3b-93cb-65b8b5f48987 +md""" + +## Bayesian logistic regression + + +The Bayesian model reuses the likelihood function for ``\mathbf{y}``, but also imposes a prior on the regression parameter ``\beta_0, \boldsymbol{\beta}_1``. The final model is very similar to the linear regression equivalent, where we assume Gaussian priors for the regression parameter ``\beta_0, \boldsymbol{\beta}_1``. + +!!! infor "Bayesian logistic regression" + ```math + \begin{align} + \text{Priors: }\;\;\;\;\;\;\beta_0 &\sim \mathcal{N}(m_0^{\beta_0}, v_0^{\beta_0})\\ + \boldsymbol{\beta}_1 &\sim \mathcal{N}(\mathbf{m}_0^{{\beta}_1}, \mathbf{V}_0^{{\beta}_1})\\ + \text{Likelihood: }\;\;\text{for } n &= 1,2,\ldots, N:\\ + \mu_n &=\beta_0 + \boldsymbol{\beta}_1^\top\mathbf{x}_n \\ + \sigma_n &= \texttt{logistic}(\mu_n)\\ + y_n &\sim \texttt{Bernoulli}(\sigma_n). + \end{align} + ``` +""" + +# ╔═╡ 8b73706e-fe00-4489-8095-b3ec4528c58b +md""" + +### Implementation in `Julia` + +Model translation is straightforward. +""" + +# ╔═╡ 6d2af85d-8c9e-4da7-8a38-6c0df102f954 +begin + @model function bayesian_logistic_reg(X, y; v₀=10^2, V₀ = 10^2) + # priors + β₀ ~ Normal(0, sqrt(v₀)) + nfeatures = size(X)[2] + β ~ MvNormal(zeros(nfeatures), sqrt(V₀)) + # Likelihood + μs = β₀ .+ X * β + # logistic transformations + σs = logistic.(μs) + for i in eachindex(y) + y[i] ~ Bernoulli(σs[i]) + end + return (; σs) + end + +end; + +# ╔═╡ 8a8d8eb9-9cea-43f0-9607-9d3ca908c370 +md"Next, we use `Turing` to do Bayesian logistic regression analysis on the toy data example introduced earlier." + +# ╔═╡ 41a3984c-aee4-494f-8ba2-69c0274185ed +chain_logreg_sim_data = let + sample( + bayesian_logistic_reg(D, targets; v₀=5^2), + NUTS(), + MCMCThreads(), + 2000, + 3 + ) +end; + +# ╔═╡ e1e43074-9e5f-4516-bf0d-0ce4209afb6c +summarystats(chain_logreg_sim_data) + +# ╔═╡ 15b2d945-4e78-4c41-9712-5d623b15914e +describe(chain_logreg_sim_data)[2] + +# ╔═╡ 5e5fdd62-ac1c-4ef6-a5a4-64ffe441b496 +plot(chain_logreg_sim_data) + +# ╔═╡ bdcc9726-d1fd-4d34-987e-925e1a96e58f +md""" + +### Bayesian prediction +""" + +# ╔═╡ fd9d6126-d764-40f5-9a4d-fda49a0962a9 +md""" + +To make a prediction at a new input location ``\mathbf{x}_\ast``, we can use the `predict()` or `generated_quantities()` method from `Turing`. + +The procedure starts with initialising a `Turing` model with `missing` prediction targets ``\mathbf{y}_\ast``. Then use either `predict()` or `generated_quantities()` to find the Monte Carlo approximated prediction. Check the code below for an example. +""" + +# ╔═╡ 69258680-fc21-40ca-998a-1a81279342ea +begin + # randomly generated test dataset + N_test = 5 + D_test = rand(N_test, 2) * 10 + pred_model = bayesian_logistic_reg(D_test, Vector{Union{Missing, Float64}}(undef, size(D_test)[1])) + y_preds = predict(pred_model, chain_logreg_sim_data) +end; + +# ╔═╡ be4d04ff-9ae8-40c6-ae7b-9ec29cd23b43 +mixeddensity(y_preds[:,1:1,:], size(100,100)) + +# ╔═╡ a84e1f2f-fdde-432f-89d3-265480ef9f53 +md""" +## Prediction comparison + +""" + +# ╔═╡ 6aaa775e-b2c4-4943-8860-9aff2e4a725c +md""" + +### Why does Bayesian predict better? + +Recall to make a prediction at a new input ``\mathbf{x}_\ast``, the Bayesian approach aims at computing its posterior (predictive) distribution, which is computed via an integration (and then approximated by the Monte Carlo method): + +```math +\begin{align} +p_{\text{Bayes}}(y_\ast=1 |\mathbf{x}_\ast, \mathcal{D}) &= \int p(y_\ast=1|\boldsymbol{\beta})p(\boldsymbol{\beta}|\mathcal{D}) \mathrm{d}\boldsymbol{\beta}\\ +&= \int \sigma_{\mathbf{x}_\ast}(\boldsymbol{\beta}) p(\boldsymbol{\beta}|\mathcal{D}) \mathrm{d}\boldsymbol{\beta}\\ +&\approx \frac{1}{R} \sum_{r=1}^R \sigma^{(r)}_{\mathbf{x}_\ast}, +\end{align} +``` +where, to avoid cluttered notations, we have assumed ``\boldsymbol{\beta}^\top = [\beta_0, \boldsymbol{\beta}_1]``, and + +```math +\sigma^{(r)}_{\mathbf{x}_\ast} = \frac{1}{1+\exp\{\beta^{(r)}_0 +\mathbf{x}_\ast^\top \boldsymbol{\beta}_1^{(r)}\}}. +``` + +Compared with the frequentist's point prediction + +```math +p_{\text{freq}}(y_{\ast}=1|\mathbf{x}_\ast, \hat{\boldsymbol{\beta}}) = \hat{\sigma}_{\mathbf{x}_\ast}(\hat{\boldsymbol{\beta}})= \frac{1}{1+\exp(- \hat\beta_0 - \mathbf{x}_\ast^\top\hat{\boldsymbol{\beta}}_1)}, +``` + +the Bayesian prediction is an *ensemble* method. To be more specific, there are in total ``R`` predictions made based on the ``R`` MCMC samples ``\{\beta_0^{(r)}, \boldsymbol{\beta}_1^{(r)}\}_{r=1}^R``. And the Bayesian provides the final verdict by averaging over the ``R`` individual models. + +The idea is illustrated below in a figure in which the posterior prediction mean (thick green line) is plotted with some of the ensemble models (lighter grey lines). The Bayesian approach by averaging over multiple models provides a more reasonable over-fitting proof prediction. +""" + +# ╔═╡ 68b88445-fb94-4d26-a723-234b3045ca54 +begin + p1_ = Plots.plot(D1[:,1], D1[:,2], xlabel=L"$x_1$", ylabel=L"$x_2$", label="class 1", seriestype=:scatter, markersize = 4, legend = :outerright, title="Binary classification", xlim=[0, 11], ylim=[0, 9.5]) + Plots.plot!(p1_, D2[:,1], D2[:,2], label="class 2", seriestype=:scatter, markersize = 4) + Plots.plot!(p1_, AB[1:1, 1], AB[1:1, 2], label="", seriestype=:scatter, markersize = 3, markershape =:x, annotate = [(AB[1,1]-0.8, AB[1,2], "A"), (AB[2,1]-0.8, AB[2,2], "B")], markerstrokewidth = 3, markercolor=:red) + Plots.plot!(p1_, AB[2:2, 1], AB[2:2,2], seriestype=:scatter, label="", markersize = 3, markershape =:x, markerstrokewidth = 3, markercolor=:red) + # Plots.plot!(size=(500,500)) +end; + +# ╔═╡ 39c43d27-6806-4fb6-a0e8-5f41ae0ee94e +md""" +## A real-world example + +In this section, we apply Bayesian logistic regression analysis to a real-world dataset. The data used here is described in the book [Introduction to Statistical Learning](https://hastie.su.domains/ISLR2/ISLRv2_website.pdf). The dataset (referred to as `Default`) is about customer default records for a credit card company. +""" + +# ╔═╡ 436f0628-ee73-4045-82f3-6d785b5ba51f +md""" + +#### Step 1: import the dataset +""" + +# ╔═╡ e47c4ad6-17e4-4265-bee2-738b81e61696 +md""" + +#### Step 2: pre-process the dataset +""" + +# ╔═╡ 8b56260f-2e42-4a89-a1c0-bf856b9f75d3 +md""" +By checking the raw data, we find the `Default` and `Student` variables are of `string` type. We need to first transform them into binary data types. +""" + +# ╔═╡ 40db5082-3558-4fd4-ab47-1127f6d67e38 +begin + # transform the non-numerical features to numerical + default_df[!, :DefaultNum] = map((x) -> x.Default == "Yes" ? true : false, eachrow(default_df)) + default_df[!, :StudentNum] = map((x) -> x.Student == "Yes" ? true : false, eachrow(default_df)) +end; + +# ╔═╡ fbcdbc4e-f55b-4bf8-a10d-42f2627dbfdb +describe(default_df) + +# ╔═╡ 8c73a18f-55a1-4740-8795-5bbb6ff425de +md"The two numerical features `Balance` and `Income` are with very different mean and value ranges. It is in general a good idea to standardize them such that the transformed data are with zero mean and unit variance. By standardising the features, the prior's variances, *i.e. ``\mathbf{V}_0^{\boldsymbol{\beta}}``*, are also easier to be specified, since all the features are of the same scale. +" + +# ╔═╡ a84de1b9-3c27-4b63-822f-f454b7d3098b +md""" + +#### Step 4: making inference with `Turing` +""" + +# ╔═╡ b25a3f92-f3ad-4c05-961d-2f69d39d98c3 +md"It is, in general, a good idea to fit the data with the frequentist model first and use the estimation as a reference." + +# ╔═╡ 4d9c1339-c38f-4705-9c00-2c99228da905 +begin + default_df_new = DataFrame([XX yy], [:Balance, :Income, :StudentNum, :Default]) + glm(@formula(Default ~ Balance +Income+StudentNum), default_df_new, Bernoulli(), LogitLink()) +end + +# ╔═╡ bd11a4c4-1f2b-4d3c-8e3f-8382dd9f3b3c +md"Next, we use the Bayesian logistic regression model implemented in `Turing` to do the inference." + +# ╔═╡ 244ba3cf-63ba-4501-8e88-f71c95c15a7c +chain_default = let + chain = sample( + bayesian_logistic_reg(XX, yy; v₀=1, V₀ =1), + NUTS(), + MCMCThreads(), + 2000, + 3 + ) + replacenames(chain, Dict(["β[1]" => "Balance", "β[2]" => "Income", "β[3]" => "Student"])) +end; + +# ╔═╡ c83f3735-6aba-4183-b010-5f21cd2ff968 +describe(chain_default)[1] + +# ╔═╡ 30d1520d-d301-422a-81e1-a40122d5e3fa +md"It can be observed that the Bayesian inference's posterior means are similar to the frequentist's estimation, which implies our prior choice is reasonably weak." + +# ╔═╡ 53c5b238-61fd-4ef3-9194-b076b3434b16 +describe(chain_default)[2] + +# ╔═╡ 0c34decf-ee35-4f9d-bf83-cfff75f8ff3b +md"The Bayesian's credible interval also tells us the intercept, `Balance`, and `Student` are significant predictors (their 95% credible intervals are either strictly positive or negative). But `Income` factor's impact on predicting the log-ratio of `Default` is not statistically significant, which is in agreement with the Frequentist's analysis. The same result can also be observed from the density plots." + +# ╔═╡ f092a42e-16e9-45ac-88cd-133a92402ff6 +plot(chain_default) + +# ╔═╡ 59245146-ef30-4df1-9ac3-776871e5d062 +md""" +## Appendix + +""" + +# ╔═╡ ea897f9a-89ff-421c-989a-b5f395cec705 +begin + prediction(ws, x1, x2) = mean(logistic.(ws * [1.0, x1, x2])) +end + +# ╔═╡ 78d6fe62-432b-49f3-b38f-0f6f6f5a04ed +chain_array = let + model_ex1 = bayesian_logistic_reg(D, targets) + Random.seed!(100) + chain=sample(model_ex1, NUTS(), 1000, discard_initial=100, thinning=10) + Array(chain) +end; + +# ╔═╡ 2a632fe1-698f-4265-8509-453ee7827ae6 +let + + p_bayes_pred = Plots.plot(D1[:, 1], D1[:,2], seriestype=:scatter, markersize = 5, markercolor=1, label="class 1", legend=:topright, xlim=[-1, 11], ylim=[-1,11]) + Plots.plot!(p_bayes_pred, D2[:, 1], D2[:,2], seriestype=:scatter, markersize = 5, markercolor=2, label="class 2") + mean_pred = mean(chain_array, dims=1)[:] + + b, k = -chain_array[1, 1:2] ./ chain_array[1, 3] + plot!(-2:12, (x) -> k*x+b, lw=0.1, lc=:gray, label=L"\sigma^{(r)}\sim p(\sigma|\mathcal{D})") + for i in 2:60 + b, k = -chain_array[i, 1:2] ./ chain_array[i, 3] + plot!(-2:12, (x) -> k*x+b, lw=0.1, lc=:gray, label="") + end + b, k = - mean_pred[1:2] ./ mean_pred[3] + plot!(-2:12, (x) -> k*x+b, lw=3, lc=3, label=L"\texttt{mean}(\sigma^{(r)})") + p_bayes_pred + +end + +# ╔═╡ c92f0602-9a6c-4e2c-8a28-2a870d332fe4 +begin + p1 = Plots.plot(D1[:,1], D1[:,2], xlabel=L"$x_1$", ylabel=L"$x_2$", label="class 1", seriestype=:scatter, markersize = 4, legend = :bottomright, title="Binary classification", ratio =1.0) + Plots.plot!(p1, D2[:,1], D2[:,2], label="class 2", seriestype=:scatter, markersize = 4) + # plot!((x)-> -x, lw=4, lc=:gray, label="Decision boundary", ls=:dash, legend=:outerright) +end; + +# ╔═╡ f42b1665-df4b-4181-be03-71ccc3dbfae2 +md""" + +In a supervised learning setting, we are predicting the target ``y_n`` based on ``n``-the sample's features ``\mathbf{x}_n``. +For example, in regression analysis, the target or labels ``y_n`` are assumed to be real-valued, i.e. ``y_n\in R``. For example, in the ```Advertising``` example, the target ```sales``` of a particular problem is real-valued. + + +The targets ``y_n``, however, can take value other than the real number. For example, a very common example is ``y_n`` can take binary choices, say ``y_n \in \{\texttt{true}, \texttt{false}\}``. Such a supervised learning task is usually referred to as *binary* **classification**. For example, given a subject's age, gender, and other measurements, how likely he/she will survive a pandemic? The outcome is binary here: either survive or not. Also, check the following plot for an example of binary classification with 2-dimensional input. + +$(begin +p1 +end) + + +A popular statistical model for binary classification is *logistic regression*, in which we aim at drawing a linear decision boundary to classify the input (as shown in the figure above). In this chapter, we are going to investigate how to do Bayesian logistic regression. We will first review the frequentist's logistic model and then extends it to a Bayesian approach. The two approaches will be compared and the benefit of the Bayesian approach should become evident when we compare their prediction on unseen input data. +""" + +# ╔═╡ 82fc962c-a172-47ef-a86c-fa49bace3567 +p_freq_1= let + freq_coef = coef(glm_fit)' + # prediction(ws, x1, x2) = logistic(ws * [1.0, x1, x2]) + p_freq_1 = Plots.contour(2:0.1:9, 2:0.1:8, (x, y) -> prediction(freq_coef, x, y), fill=false, connectgaps=true, levels=8, line_smoothing = 0.85, legend=:left, title="Frequentist Prediction", c=:roma, ratio=1.0, xlabel=L"x_1", ylabel=L"$x_2") + Plots.plot!(p_freq_1, D1[:, 1], D1[:,2], seriestype=:scatter, markersize = 3, markercolor=1, label="class 1") + Plots.plot!(p_freq_1, D2[:, 1], D2[:,2], seriestype=:scatter, markersize = 3, markercolor=2, label="class 2") + Plots.plot!(p_freq_1, AB[1:2, 1], AB[1:2, 2], label="", seriestype=:scatter, markersize = 2, markershape =:star4, annotate = [(AB[1,1], AB[1,2], text("A", :top,:red, 9)), (AB[2,1], AB[2,2], text("B", :top, :red, 9))], markerstrokewidth = 1, markercolor=:red) + markers = [2, 5, 6, 9] + for m in markers + p0 = round(prediction(freq_coef, D[m, 1], D[m, 2]), digits=2) + annotate!(D[m, 1], D[m,2], text(L"\hat{\sigma}="*"$(p0)", :bottom, 10)) + end + + for i in 1:2 + p0 = round(prediction(freq_coef, AB[i, 1], AB[i, 2]), digits=2) + annotate!(AB[i, 1], AB[i,2], text(L"\hat{\sigma}="*"$(p0)", :bottom, :red, 10)) + end + p_freq_1 +end; + +# ╔═╡ cd76fa94-d0d7-43bb-8221-2a4dafa8af53 +p_freq_1 + +# ╔═╡ 3e45f16f-ea6c-4960-98b7-1e642fb919c1 +p_bayes_1 = let + p_bayes_1 = Plots.contour(2:0.1:9, 2:0.1:8, (x, y) -> prediction(chain_array, x, y), fill=false, connectgaps=true, levels=8, line_smoothing = 0.85, legend=:left, title="Bayesian Prediction", c=:roma, ratio=1.0, xlabel=L"x_1", ylabel=L"$x_2") + Plots.plot!(p_bayes_1, D1[:, 1], D1[:,2], seriestype=:scatter, markersize = 3, markercolor=1, label="class 1") + Plots.plot!(p_bayes_1, D2[:, 1], D2[:,2], seriestype=:scatter, markersize = 3, markercolor=2, label="class 2") + Plots.plot!(p_bayes_1, AB[1:2, 1], AB[1:2, 2], label="", seriestype=:scatter, markersize = 2, markershape =:star4, annotate = [(AB[1,1], AB[1,2], text("A", :top,:red, 9)), (AB[2,1], AB[2,2], text("B", :top, :red, 9))], markerstrokewidth = 1, markercolor=:red) + markers = [2, 5, 6, 9] + for m in markers + p0 = round(prediction(chain_array, D[m, 1], D[m, 2]), digits=2) + annotate!(D[m, 1], D[m,2], text(L"\hat{\sigma}="*"$(p0)", :bottom, 10)) + end + + for i in 1:2 + p0 = round(prediction(chain_array, AB[i, 1], AB[i, 2]), digits=2) + annotate!(AB[i, 1], AB[i,2], text(L"\hat{\sigma}="*"$(p0)", :bottom, :red, 10)) + end + p_bayes_1 +end; + +# ╔═╡ 44ccb675-a657-4fe8-934f-ddf29cb78f74 +md""" + +We have discussed the undesired properties of the Frequentist's method. The prediction lack nuance to account for the differences between the prediction locations. The prediction is very black and white: all data points are either predicted with 100% or 0% being positive. + + +Now we move on to check what the Bayesian prediction surface looks like. Recall that Bayesian inference always aims at computing the posterior of the quantity of interest. In this case, what we are interested in is the predictive distribution on a new input location ``\mathbf{x}_\ast``: + +```math +p(y_\ast=1|\mathbf{x}_\ast, \mathcal{D}). +``` +The contour plot of the Bayesian predictive distribution is listed below. + +$(begin +p_bayes_1 +end) + +It can be observed that the Bayesian prediction is more nuanced compared with the clean-cut frequentist's prediction. +* data points closer to the decision boundary are correctly predicted with less confidence +* data points located further away from the observed input data are predicted with some reasonable level of uncertainty. + +The surface plots of the two predictions are listed below for a more direct visual comparison. The Bayesian prediction is more natural and matches people's expectations. +""" + +# ╔═╡ 8a21c570-9bfe-4f66-9157-1b0dc4028ef4 +p_freq_surface_1 = let + freq_coef = coef(glm_fit)' + Plots.surface(0:0.1:10, 0:0.1:10, (x, y) -> prediction(freq_coef, x, y), legend=:best, title="Frequentist Prediction", c=:roma, ratio=1.0, xlabel=L"x_1", ylabel=L"$x_2", zlabel=L"p(y=1|\ldots)") +end; + +# ╔═╡ 0c70c6be-518b-4ba4-bd69-cc34d2217077 +p_freq_surface_1 + +# ╔═╡ f9b3916a-d4b2-4e6b-9a7d-be077fd45ac0 +p_bayes_surface_1 = let + Plots.surface(0:0.1:10, 0:0.1:10, (x, y) -> prediction(chain_array, x, y), legend=:best, title="Bayesian Prediction", c=:roma, ratio=1.0, xlabel=L"x_1", ylabel=L"$x_2", zlabel=L"p(y=1|\ldots)") +end; + +# ╔═╡ 922704a0-b0c9-4fe0-a0fb-3ab58a7f01d9 +plot(p_freq_surface_1, p_bayes_surface_1, size=(800,400)) + +# ╔═╡ 00000000-0000-0000-0000-000000000001 +PLUTO_PROJECT_TOML_CONTENTS = """ +[deps] +DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +GLM = "38e38edf-8417-5370-95a0-9cbb8c7f171a" +LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" +PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8" +RDatasets = "ce6b1742-4840-55fa-b093-852dadbb1d8b" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +StatsFuns = "4c63d2b9-4356-54db-8cca-17b64c39e42c" +StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd" +Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0" + +[compat] +DataFrames = "~1.3.4" +GLM = "~1.8.0" +LaTeXStrings = "~1.3.0" +PlutoUI = "~0.7.39" +RDatasets = "~0.7.7" +StatsBase = "~0.33.21" +StatsFuns = "~1.0.1" +StatsPlots = "~0.15.1" +Turing = "~0.21.9" +""" + +# ╔═╡ 00000000-0000-0000-0000-000000000002 +PLUTO_MANIFEST_TOML_CONTENTS = """ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.8.0" +manifest_format = "2.0" +project_hash = "50f4d97c12c5e4fcbfdd0d0aab004e966888a69b" + +[[deps.AbstractFFTs]] +deps = ["ChainRulesCore", "LinearAlgebra"] +git-tree-sha1 = "69f7020bd72f069c219b5e8c236c1fa90d2cb409" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.2.1" + +[[deps.AbstractMCMC]] +deps = ["BangBang", "ConsoleProgressMonitor", "Distributed", "Logging", "LoggingExtras", "ProgressLogging", "Random", "StatsBase", "TerminalLoggers", "Transducers"] +git-tree-sha1 = "5c26c7759412ffcaf0dd6e3172e55d783dd7610b" +uuid = "80f14c24-f653-4e6a-9b94-39d6b0f70001" +version = "4.1.3" + +[[deps.AbstractPPL]] +deps = ["AbstractMCMC", "DensityInterface", "Setfield", "SparseArrays"] +git-tree-sha1 = "6320752437e9fbf49639a410017d862ad64415a5" +uuid = "7a57a42e-76ec-4ea3-a279-07e840d6d9cf" +version = "0.5.2" + +[[deps.AbstractPlutoDingetjes]] +deps = ["Pkg"] +git-tree-sha1 = "8eaf9f1b4921132a4cff3f36a1d9ba923b14a481" +uuid = "6e696c72-6542-2067-7265-42206c756150" +version = "1.1.4" + +[[deps.AbstractTrees]] +git-tree-sha1 = "03e0550477d86222521d254b741d470ba17ea0b5" +uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" +version = "0.3.4" + +[[deps.Adapt]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "195c5505521008abea5aee4f96930717958eac6f" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "3.4.0" + +[[deps.AdvancedHMC]] +deps = ["AbstractMCMC", "ArgCheck", "DocStringExtensions", "InplaceOps", "LinearAlgebra", "ProgressMeter", "Random", "Requires", "Setfield", "Statistics", "StatsBase", "StatsFuns", "UnPack"] +git-tree-sha1 = "345effa84030f273ee86fcdd706d8484ce9a1a3c" +uuid = "0bf59076-c3b1-5ca4-86bd-e02cd72cde3d" +version = "0.3.5" + +[[deps.AdvancedMH]] +deps = ["AbstractMCMC", "Distributions", "Random", "Requires"] +git-tree-sha1 = "d7a7dabeaef34e5106cdf6c2ac956e9e3f97f666" +uuid = "5b7e9947-ddc0-4b3f-9b55-0d8042f74170" +version = "0.6.8" + +[[deps.AdvancedPS]] +deps = ["AbstractMCMC", "Distributions", "Libtask", "Random", "StatsFuns"] +git-tree-sha1 = "9ff1247be1e2aa2e740e84e8c18652bd9d55df22" +uuid = "576499cb-2369-40b2-a588-c64705576edc" +version = "0.3.8" + +[[deps.AdvancedVI]] +deps = ["Bijectors", "Distributions", "DistributionsAD", "DocStringExtensions", "ForwardDiff", "LinearAlgebra", "ProgressMeter", "Random", "Requires", "StatsBase", "StatsFuns", "Tracker"] +git-tree-sha1 = "e743af305716a527cdb3a67b31a33a7c3832c41f" +uuid = "b5ca4192-6429-45e5-a2d9-87aec30a685c" +version = "0.1.5" + +[[deps.ArgCheck]] +git-tree-sha1 = "a3a402a35a2f7e0b87828ccabbd5ebfbebe356b4" +uuid = "dce04be8-c92d-5529-be00-80e4d2c0e197" +version = "2.3.0" + +[[deps.ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" +version = "1.1.1" + +[[deps.Arpack]] +deps = ["Arpack_jll", "Libdl", "LinearAlgebra", "Logging"] +git-tree-sha1 = "91ca22c4b8437da89b030f08d71db55a379ce958" +uuid = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97" +version = "0.5.3" + +[[deps.Arpack_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "OpenBLAS_jll", "Pkg"] +git-tree-sha1 = "5ba6c757e8feccf03a1554dfaf3e26b3cfc7fd5e" +uuid = "68821587-b530-5797-8361-c406ea357684" +version = "3.5.1+1" + +[[deps.ArrayInterfaceCore]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "40debc9f72d0511e12d817c7ca06a721b6423ba3" +uuid = "30b0a656-2188-435a-8636-2ec0e6a096e2" +version = "0.1.17" + +[[deps.ArrayInterfaceStaticArraysCore]] +deps = ["Adapt", "ArrayInterfaceCore", "LinearAlgebra", "StaticArraysCore"] +git-tree-sha1 = "a1e2cf6ced6505cbad2490532388683f1e88c3ed" +uuid = "dd5226c6-a4d4-4bc7-8575-46859f9c95b9" +version = "0.1.0" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[deps.AxisAlgorithms]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"] +git-tree-sha1 = "66771c8d21c8ff5e3a93379480a2307ac36863f7" +uuid = "13072b0f-2c55-5437-9ae7-d433b7a33950" +version = "1.0.1" + +[[deps.AxisArrays]] +deps = ["Dates", "IntervalSets", "IterTools", "RangeArrays"] +git-tree-sha1 = "1dd4d9f5beebac0c03446918741b1a03dc5e5788" +uuid = "39de3d68-74b9-583c-8d2d-e117c070f3a9" +version = "0.4.6" + +[[deps.BangBang]] +deps = ["Compat", "ConstructionBase", "Future", "InitialValues", "LinearAlgebra", "Requires", "Setfield", "Tables", "ZygoteRules"] +git-tree-sha1 = "b15a6bc52594f5e4a3b825858d1089618871bf9d" +uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" +version = "0.3.36" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[deps.Baselet]] +git-tree-sha1 = "aebf55e6d7795e02ca500a689d326ac979aaf89e" +uuid = "9718e550-a3fa-408a-8086-8db961cd8217" +version = "0.1.1" + +[[deps.Bijectors]] +deps = ["ArgCheck", "ChainRulesCore", "ChangesOfVariables", "Compat", "Distributions", "Functors", "InverseFunctions", "IrrationalConstants", "LinearAlgebra", "LogExpFunctions", "MappedArrays", "Random", "Reexport", "Requires", "Roots", "SparseArrays", "Statistics"] +git-tree-sha1 = "875f3845e1256ee1d9e0c8ca3993e709b32c0ed1" +uuid = "76274a88-744f-5084-9051-94815aaf08c4" +version = "0.10.3" + +[[deps.Bzip2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2" +uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" +version = "1.0.8+0" + +[[deps.CSV]] +deps = ["CodecZlib", "Dates", "FilePathsBase", "InlineStrings", "Mmap", "Parsers", "PooledArrays", "SentinelArrays", "Tables", "Unicode", "WeakRefStrings"] +git-tree-sha1 = "873fb188a4b9d76549b81465b1f75c82aaf59238" +uuid = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" +version = "0.10.4" + +[[deps.Cairo_jll]] +deps = ["Artifacts", "Bzip2_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "4b859a208b2397a7a623a03449e4636bdb17bcf2" +uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" +version = "1.16.1+1" + +[[deps.Calculus]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" +uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" +version = "0.5.1" + +[[deps.CategoricalArrays]] +deps = ["DataAPI", "Future", "Missings", "Printf", "Requires", "Statistics", "Unicode"] +git-tree-sha1 = "5f5a975d996026a8dd877c35fe26a7b8179c02ba" +uuid = "324d7699-5711-5eae-9e2f-1d82baa6b597" +version = "0.10.6" + +[[deps.ChainRules]] +deps = ["ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "Statistics"] +git-tree-sha1 = "f9d6dd293ed05233d37a5644f880f5def9fdfae3" +uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" +version = "1.42.0" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "80ca332f6dcb2508adba68f22f551adb2d00a624" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.15.3" + +[[deps.ChangesOfVariables]] +deps = ["ChainRulesCore", "LinearAlgebra", "Test"] +git-tree-sha1 = "38f7a08f19d8810338d4f5085211c7dfa5d5bdd8" +uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" +version = "0.1.4" + +[[deps.Clustering]] +deps = ["Distances", "LinearAlgebra", "NearestNeighbors", "Printf", "SparseArrays", "Statistics", "StatsBase"] +git-tree-sha1 = "75479b7df4167267d75294d14b58244695beb2ac" +uuid = "aaaa29a8-35af-508c-8bc3-b662a17a0fe5" +version = "0.14.2" + +[[deps.CodecZlib]] +deps = ["TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "ded953804d019afa9a3f98981d99b33e3db7b6da" +uuid = "944b1d66-785c-5afd-91f1-9de20f533193" +version = "0.7.0" + +[[deps.ColorSchemes]] +deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "Random"] +git-tree-sha1 = "1fd869cc3875b57347f7027521f561cf46d1fcd8" +uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" +version = "3.19.0" + +[[deps.ColorTypes]] +deps = ["FixedPointNumbers", "Random"] +git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4" +uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" +version = "0.11.4" + +[[deps.ColorVectorSpace]] +deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "SpecialFunctions", "Statistics", "TensorCore"] +git-tree-sha1 = "d08c20eef1f2cbc6e60fd3612ac4340b89fea322" +uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" +version = "0.9.9" + +[[deps.Colors]] +deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] +git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40" +uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" +version = "0.12.8" + +[[deps.Combinatorics]] +git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" +uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" +version = "1.0.2" + +[[deps.CommonSolve]] +git-tree-sha1 = "332a332c97c7071600984b3c31d9067e1a4e6e25" +uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" +version = "0.2.1" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools", "Test"] +git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.0" + +[[deps.Compat]] +deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] +git-tree-sha1 = "9be8be1d8a6f44b96482c8af52238ea7987da3e3" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "3.45.0" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "0.5.2+0" + +[[deps.CompositionsBase]] +git-tree-sha1 = "455419f7e328a1a2493cabc6428d79e951349769" +uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" +version = "0.1.1" + +[[deps.ConsoleProgressMonitor]] +deps = ["Logging", "ProgressMeter"] +git-tree-sha1 = "3ab7b2136722890b9af903859afcf457fa3059e8" +uuid = "88cd18e8-d9cc-4ea6-8889-5259c0d15c8b" +version = "0.1.2" + +[[deps.ConstructionBase]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "59d00b3139a9de4eb961057eabb65ac6522be954" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.4.0" + +[[deps.Contour]] +git-tree-sha1 = "d05d9e7b7aedff4e5b51a029dced05cfb6125781" +uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" +version = "0.6.2" + +[[deps.Crayons]] +git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15" +uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" +version = "4.1.1" + +[[deps.DataAPI]] +git-tree-sha1 = "fb5f5316dd3fd4c5e7c30a24d50643b73e37cd40" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.10.0" + +[[deps.DataFrames]] +deps = ["Compat", "DataAPI", "Future", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrettyTables", "Printf", "REPL", "Reexport", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] +git-tree-sha1 = "daa21eb85147f72e41f6352a57fccea377e310a9" +uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +version = "1.3.4" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "d1fff3a548102f48987a52a2e0d114fa97d730f0" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.13" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.DataValues]] +deps = ["DataValueInterfaces", "Dates"] +git-tree-sha1 = "d88a19299eba280a6d062e135a43f00323ae70bf" +uuid = "e7dc6d0d-1eca-5fa6-8ad6-5aecde8b7ea5" +version = "0.4.13" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[deps.DefineSingletons]] +git-tree-sha1 = "0fba8b706d0178b4dc7fd44a96a92382c9065c2c" +uuid = "244e2a9f-e319-4986-a169-4d1fe445cd52" +version = "0.1.2" + +[[deps.DelimitedFiles]] +deps = ["Mmap"] +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" + +[[deps.DensityInterface]] +deps = ["InverseFunctions", "Test"] +git-tree-sha1 = "80c3e8639e3353e5d2912fb3a1916b8455e2494b" +uuid = "b429d917-457f-4dbc-8f4c-0cc954292b1d" +version = "0.4.0" + +[[deps.DiffResults]] +deps = ["StaticArrays"] +git-tree-sha1 = "c18e98cba888c6c25d1c3b048e4b3380ca956805" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.0.3" + +[[deps.DiffRules]] +deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] +git-tree-sha1 = "28d605d9a0ac17118fe2c5e9ce0fbb76c3ceb120" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.11.0" + +[[deps.Distances]] +deps = ["LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "3258d0659f812acde79e8a74b11f17ac06d0ca04" +uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" +version = "0.10.7" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[deps.Distributions]] +deps = ["ChainRulesCore", "DensityInterface", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"] +git-tree-sha1 = "aafa0665e3db0d3d0890cdc8191ea03dc279b042" +uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" +version = "0.25.66" + +[[deps.DistributionsAD]] +deps = ["Adapt", "ChainRules", "ChainRulesCore", "Compat", "DiffRules", "Distributions", "FillArrays", "LinearAlgebra", "NaNMath", "PDMats", "Random", "Requires", "SpecialFunctions", "StaticArrays", "StatsBase", "StatsFuns", "ZygoteRules"] +git-tree-sha1 = "ec811a2688b3504ce5b315fe7bc86464480d5964" +uuid = "ced4e74d-a319-5a8a-b0ac-84af2272839c" +version = "0.6.41" + +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.8.6" + +[[deps.Downloads]] +deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +version = "1.6.0" + +[[deps.DualNumbers]] +deps = ["Calculus", "NaNMath", "SpecialFunctions"] +git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566" +uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74" +version = "0.6.8" + +[[deps.DynamicPPL]] +deps = ["AbstractMCMC", "AbstractPPL", "BangBang", "Bijectors", "ChainRulesCore", "Distributions", "LinearAlgebra", "MacroTools", "Random", "Setfield", "Test", "ZygoteRules"] +git-tree-sha1 = "c6f574d855670c2906af3f4053e6db10224e5dda" +uuid = "366bfd00-2699-11ea-058f-f148b4cae6d8" +version = "0.19.3" + +[[deps.EarCut_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3f3a2501fa7236e9b911e0f7a588c657e822bb6d" +uuid = "5ae413db-bbd1-5e63-b57d-d24a61df00f5" +version = "2.2.3+0" + +[[deps.EllipticalSliceSampling]] +deps = ["AbstractMCMC", "ArrayInterfaceCore", "Distributions", "Random", "Statistics"] +git-tree-sha1 = "4cda4527e990c0cc201286e0a0bfbbce00abcfc2" +uuid = "cad2338a-1db2-11e9-3401-43bc07c9ede2" +version = "1.0.0" + +[[deps.Expat_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "bad72f730e9e91c08d9427d5e8db95478a3c323d" +uuid = "2e619515-83b5-522b-bb60-26c02a35a201" +version = "2.4.8+0" + +[[deps.ExprTools]] +git-tree-sha1 = "56559bbef6ca5ea0c0818fa5c90320398a6fbf8d" +uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" +version = "0.1.8" + +[[deps.Extents]] +git-tree-sha1 = "5e1e4c53fa39afe63a7d356e30452249365fba99" +uuid = "411431e0-e8b7-467b-b5e0-f676ba4f2910" +version = "0.1.1" + +[[deps.FFMPEG]] +deps = ["FFMPEG_jll"] +git-tree-sha1 = "b57e3acbe22f8484b4b5ff66a7499717fe1a9cc8" +uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" +version = "0.4.1" + +[[deps.FFMPEG_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] +git-tree-sha1 = "ccd479984c7838684b3ac204b716c89955c76623" +uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" +version = "4.4.2+0" + +[[deps.FFTW]] +deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] +git-tree-sha1 = "90630efff0894f8142308e334473eba54c433549" +uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" +version = "1.5.0" + +[[deps.FFTW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "c6033cc3892d0ef5bb9cd29b7f2f0331ea5184ea" +uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" +version = "3.3.10+0" + +[[deps.FileIO]] +deps = ["Pkg", "Requires", "UUIDs"] +git-tree-sha1 = "94f5101b96d2d968ace56f7f2db19d0a5f592e28" +uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" +version = "1.15.0" + +[[deps.FilePathsBase]] +deps = ["Compat", "Dates", "Mmap", "Printf", "Test", "UUIDs"] +git-tree-sha1 = "129b104185df66e408edd6625d480b7f9e9823a0" +uuid = "48062228-2e41-5def-b9a4-89aafe57970f" +version = "0.9.18" + +[[deps.FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" + +[[deps.FillArrays]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"] +git-tree-sha1 = "246621d23d1f43e3b9c368bf3b72b2331a27c286" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "0.13.2" + +[[deps.FixedPointNumbers]] +deps = ["Statistics"] +git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc" +uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" +version = "0.8.4" + +[[deps.Fontconfig_jll]] +deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "21efd19106a55620a188615da6d3d06cd7f6ee03" +uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" +version = "2.13.93+0" + +[[deps.Formatting]] +deps = ["Printf"] +git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" +uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" +version = "0.4.2" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"] +git-tree-sha1 = "425e126d13023600ebdecd4cf037f96e396187dd" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "0.10.31" + +[[deps.FreeType2_jll]] +deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "87eb71354d8ec1a96d4a7636bd57a7347dde3ef9" +uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" +version = "2.10.4+0" + +[[deps.FriBidi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "aa31987c2ba8704e23c6c8ba8a4f769d5d7e4f91" +uuid = "559328eb-81f9-559d-9380-de523a88c83c" +version = "1.0.10+0" + +[[deps.FunctionWrappers]] +git-tree-sha1 = "241552bc2209f0fa068b6415b1942cc0aa486bcc" +uuid = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" +version = "1.1.2" + +[[deps.Functors]] +git-tree-sha1 = "223fffa49ca0ff9ce4f875be001ffe173b2b7de4" +uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196" +version = "0.2.8" + +[[deps.Future]] +deps = ["Random"] +uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" + +[[deps.GLFW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll"] +git-tree-sha1 = "d972031d28c8c8d9d7b41a536ad7bb0c2579caca" +uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" +version = "3.3.8+0" + +[[deps.GLM]] +deps = ["Distributions", "LinearAlgebra", "Printf", "Reexport", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "StatsModels"] +git-tree-sha1 = "039118892476c2bf045a43b88fcb75ed566000ff" +uuid = "38e38edf-8417-5370-95a0-9cbb8c7f171a" +version = "1.8.0" + +[[deps.GPUArraysCore]] +deps = ["Adapt"] +git-tree-sha1 = "d88b17a38322e153c519f5a9ed8d91e9baa03d8f" +uuid = "46192b85-c4d5-4398-a991-12ede77f4527" +version = "0.1.1" + +[[deps.GR]] +deps = ["Base64", "DelimitedFiles", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Pkg", "Printf", "Random", "RelocatableFolders", "Serialization", "Sockets", "Test", "UUIDs"] +git-tree-sha1 = "037a1ca47e8a5989cc07d19729567bb71bfabd0c" +uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" +version = "0.66.0" + +[[deps.GR_jll]] +deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Pkg", "Qt5Base_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "c8ab731c9127cd931c93221f65d6a1008dad7256" +uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" +version = "0.66.0+0" + +[[deps.GeoInterface]] +deps = ["Extents"] +git-tree-sha1 = "fb28b5dc239d0174d7297310ef7b84a11804dfab" +uuid = "cf35fbd7-0cd7-5166-be24-54bfbe79505f" +version = "1.0.1" + +[[deps.GeometryBasics]] +deps = ["EarCut_jll", "GeoInterface", "IterTools", "LinearAlgebra", "StaticArrays", "StructArrays", "Tables"] +git-tree-sha1 = "a7a97895780dab1085a97769316aa348830dc991" +uuid = "5c1252a2-5f33-56bf-86c9-59e7332b4326" +version = "0.4.3" + +[[deps.Gettext_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "9b02998aba7bf074d14de89f9d37ca24a1a0b046" +uuid = "78b55507-aeef-58d4-861c-77aaff3498b1" +version = "0.21.0+0" + +[[deps.Glib_jll]] +deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "a32d672ac2c967f3deb8a81d828afc739c838a06" +uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" +version = "2.68.3+2" + +[[deps.Graphite2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "344bf40dcab1073aca04aa0df4fb092f920e4011" +uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" +version = "1.3.14+0" + +[[deps.Grisu]] +git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" +uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" +version = "1.0.2" + +[[deps.HTTP]] +deps = ["Base64", "CodecZlib", "Dates", "IniFile", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "ed47af35905b7cc8f1a522ca684b35a212269bd8" +uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" +version = "1.2.0" + +[[deps.HarfBuzz_jll]] +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] +git-tree-sha1 = "129acf094d168394e80ee1dc4bc06ec835e510a3" +uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" +version = "2.8.1+1" + +[[deps.HypergeometricFunctions]] +deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions", "Test"] +git-tree-sha1 = "709d864e3ed6e3545230601f94e11ebc65994641" +uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" +version = "0.3.11" + +[[deps.Hyperscript]] +deps = ["Test"] +git-tree-sha1 = "8d511d5b81240fc8e6802386302675bdf47737b9" +uuid = "47d2ed2b-36de-50cf-bf87-49c2cf4b8b91" +version = "0.0.4" + +[[deps.HypertextLiteral]] +deps = ["Tricks"] +git-tree-sha1 = "c47c5fa4c5308f27ccaac35504858d8914e102f9" +uuid = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2" +version = "0.9.4" + +[[deps.IOCapture]] +deps = ["Logging", "Random"] +git-tree-sha1 = "f7be53659ab06ddc986428d3a9dcc95f6fa6705a" +uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" +version = "0.2.2" + +[[deps.IniFile]] +git-tree-sha1 = "f550e6e32074c939295eb5ea6de31849ac2c9625" +uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f" +version = "0.5.1" + +[[deps.InitialValues]] +git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3" +uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c" +version = "0.3.1" + +[[deps.InlineStrings]] +deps = ["Parsers"] +git-tree-sha1 = "d19f9edd8c34760dca2de2b503f969d8700ed288" +uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" +version = "1.1.4" + +[[deps.InplaceOps]] +deps = ["LinearAlgebra", "Test"] +git-tree-sha1 = "50b41d59e7164ab6fda65e71049fee9d890731ff" +uuid = "505f98c9-085e-5b2c-8e89-488be7bf1f34" +version = "0.3.0" + +[[deps.IntelOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "d979e54b71da82f3a65b62553da4fc3d18c9004c" +uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" +version = "2018.0.3+2" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[deps.Interpolations]] +deps = ["Adapt", "AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "Requires", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"] +git-tree-sha1 = "23e651bbb8d00e9971015d0dd306b780edbdb6b9" +uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" +version = "0.14.3" + +[[deps.IntervalSets]] +deps = ["Dates", "Random", "Statistics"] +git-tree-sha1 = "57af5939800bce15980bddd2426912c4f83012d8" +uuid = "8197267c-284f-5f27-9208-e0e47529a953" +version = "0.7.1" + +[[deps.InverseFunctions]] +deps = ["Test"] +git-tree-sha1 = "b3364212fb5d870f724876ffcd34dd8ec6d98918" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.7" + +[[deps.InvertedIndices]] +git-tree-sha1 = "bee5f1ef5bf65df56bdd2e40447590b272a5471f" +uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" +version = "1.1.0" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "7fd44fd4ff43fc60815f8e764c0f352b83c49151" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.1.1" + +[[deps.IterTools]] +git-tree-sha1 = "fa6287a4469f5e048d763df38279ee729fbd44e5" +uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" +version = "1.4.0" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLLWrappers]] +deps = ["Preferences"] +git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.4.1" + +[[deps.JSON]] +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "3c837543ddb02250ef42f4738347454f95079d4e" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.21.3" + +[[deps.JpegTurbo_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b53380851c6e6664204efb2e62cd24fa5c47e4ba" +uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" +version = "2.1.2+0" + +[[deps.KernelDensity]] +deps = ["Distributions", "DocStringExtensions", "FFTW", "Interpolations", "StatsBase"] +git-tree-sha1 = "9816b296736292a80b9a3200eb7fbb57aaa3917a" +uuid = "5ab0869b-81aa-558d-bb23-cbf5423bbe9b" +version = "0.6.5" + +[[deps.LAME_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "f6250b16881adf048549549fba48b1161acdac8c" +uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" +version = "3.100.1+0" + +[[deps.LERC_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" +uuid = "88015f11-f218-50d7-93a8-a6af411a945d" +version = "3.0.0+1" + +[[deps.LRUCache]] +git-tree-sha1 = "d64a0aff6691612ab9fb0117b0995270871c5dfc" +uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" +version = "1.3.0" + +[[deps.LZO_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e5b909bcf985c5e2605737d2ce278ed791b89be6" +uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" +version = "2.10.1+0" + +[[deps.LaTeXStrings]] +git-tree-sha1 = "f2355693d6778a178ade15952b7ac47a4ff97996" +uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +version = "1.3.0" + +[[deps.Latexify]] +deps = ["Formatting", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "Printf", "Requires"] +git-tree-sha1 = "1a43be956d433b5d0321197150c2f94e16c0aaa0" +uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" +version = "0.15.16" + +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" + +[[deps.LeftChildRightSiblingTrees]] +deps = ["AbstractTrees"] +git-tree-sha1 = "b864cb409e8e445688bc478ef87c0afe4f6d1f8d" +uuid = "1d6d02ad-be62-4b6b-8a6d-2f90e265016e" +version = "0.1.3" + +[[deps.LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" +version = "0.6.3" + +[[deps.LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" +version = "7.84.0+0" + +[[deps.LibGit2]] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[deps.LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" +version = "1.10.2+0" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[deps.Libffi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "0b4a5d71f3e5200a7dff793393e09dfc2d874290" +uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" +version = "3.2.2+1" + +[[deps.Libgcrypt_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"] +git-tree-sha1 = "64613c82a59c120435c067c2b809fc61cf5166ae" +uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" +version = "1.8.7+0" + +[[deps.Libglvnd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"] +git-tree-sha1 = "7739f837d6447403596a75d19ed01fd08d6f56bf" +uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" +version = "1.3.0+3" + +[[deps.Libgpg_error_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "c333716e46366857753e273ce6a69ee0945a6db9" +uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" +version = "1.42.0+0" + +[[deps.Libiconv_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "42b62845d70a619f063a7da093d995ec8e15e778" +uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" +version = "1.16.1+1" + +[[deps.Libmount_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "9c30530bf0effd46e15e0fdcf2b8636e78cbbd73" +uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" +version = "2.35.0+0" + +[[deps.Libtask]] +deps = ["FunctionWrappers", "LRUCache", "LinearAlgebra", "Statistics"] +git-tree-sha1 = "dfa6c5f2d5a8918dd97c7f1a9ea0de68c2365426" +uuid = "6f1fad26-d15e-5dc8-ae53-837a1d7b8c9f" +version = "0.7.5" + +[[deps.Libtiff_jll]] +deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "Pkg", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "3eb79b0ca5764d4799c06699573fd8f533259713" +uuid = "89763e89-9b03-5906-acba-b20f662cd828" +version = "4.4.0+0" + +[[deps.Libuuid_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "7f3efec06033682db852f8b3bc3c1d2b0a0ab066" +uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" +version = "2.36.0+0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[deps.LogExpFunctions]] +deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "361c2b088575b07946508f135ac556751240091c" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.17" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "5d4d2d9904227b8bd66386c1138cf4d5ffa826bf" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "0.4.9" + +[[deps.MCMCChains]] +deps = ["AbstractMCMC", "AxisArrays", "Compat", "Dates", "Distributions", "Formatting", "IteratorInterfaceExtensions", "KernelDensity", "LinearAlgebra", "MCMCDiagnosticTools", "MLJModelInterface", "NaturalSort", "OrderedCollections", "PrettyTables", "Random", "RecipesBase", "Serialization", "Statistics", "StatsBase", "StatsFuns", "TableTraits", "Tables"] +git-tree-sha1 = "8cb9b8fb081afd7728f5de25b9025bff97cb5c7a" +uuid = "c7f686f2-ff18-58e9-bc7b-31028e88f75d" +version = "5.3.1" + +[[deps.MCMCDiagnosticTools]] +deps = ["AbstractFFTs", "DataAPI", "Distributions", "LinearAlgebra", "MLJModelInterface", "Random", "SpecialFunctions", "Statistics", "StatsBase", "Tables"] +git-tree-sha1 = "058d08594e91ba1d98dcc3669f9421a76824aa95" +uuid = "be115224-59cd-429b-ad48-344e309966f0" +version = "0.1.3" + +[[deps.MKL_jll]] +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] +git-tree-sha1 = "e595b205efd49508358f7dc670a940c790204629" +uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" +version = "2022.0.0+0" + +[[deps.MLJModelInterface]] +deps = ["Random", "ScientificTypesBase", "StatisticalTraits"] +git-tree-sha1 = "16fa7c2e14aa5b3854bc77ab5f1dbe2cdc488903" +uuid = "e80e1ace-859a-464e-9ed9-23947d8ae3ea" +version = "1.6.0" + +[[deps.MacroTools]] +deps = ["Markdown", "Random"] +git-tree-sha1 = "3d3e902b31198a27340d0bf00d6ac452866021cf" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.9" + +[[deps.MappedArrays]] +git-tree-sha1 = "e8b359ef06ec72e8c030463fe02efe5527ee5142" +uuid = "dbb5928d-eab1-5f90-85c2-b9b0edb7c900" +version = "0.4.1" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[deps.MbedTLS]] +deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "Random", "Sockets"] +git-tree-sha1 = "d9ab10da9de748859a7780338e1d6566993d1f25" +uuid = "739be429-bea8-5141-9913-cc70e7f3736d" +version = "1.1.3" + +[[deps.MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +version = "2.28.0+0" + +[[deps.Measures]] +git-tree-sha1 = "e498ddeee6f9fdb4551ce855a46f54dbd900245f" +uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" +version = "0.3.1" + +[[deps.MicroCollections]] +deps = ["BangBang", "InitialValues", "Setfield"] +git-tree-sha1 = "6bb7786e4f24d44b4e29df03c69add1b63d88f01" +uuid = "128add7d-3638-4c79-886c-908ea0c25c34" +version = "0.1.2" + +[[deps.Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "bf210ce90b6c9eed32d25dbcae1ebc565df2687f" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "1.0.2" + +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[deps.Mocking]] +deps = ["Compat", "ExprTools"] +git-tree-sha1 = "29714d0a7a8083bba8427a4fbfb00a540c681ce7" +uuid = "78c3b35d-d492-501b-9361-3d52fe80e533" +version = "0.7.3" + +[[deps.MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" +version = "2022.2.1" + +[[deps.MultivariateStats]] +deps = ["Arpack", "LinearAlgebra", "SparseArrays", "Statistics", "StatsBase"] +git-tree-sha1 = "6d019f5a0465522bbfdd68ecfad7f86b535d6935" +uuid = "6f286f6a-111f-5878-ab1e-185364afe411" +version = "0.9.0" + +[[deps.NNlib]] +deps = ["Adapt", "ChainRulesCore", "LinearAlgebra", "Pkg", "Requires", "Statistics"] +git-tree-sha1 = "415108fd88d6f55cedf7ee940c7d4b01fad85421" +uuid = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" +version = "0.8.9" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "a7c3d1da1189a1c2fe843a3bfa04d18d20eb3211" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.0.1" + +[[deps.NamedArrays]] +deps = ["Combinatorics", "DataStructures", "DelimitedFiles", "InvertedIndices", "LinearAlgebra", "Random", "Requires", "SparseArrays", "Statistics"] +git-tree-sha1 = "2fd5787125d1a93fbe30961bd841707b8a80d75b" +uuid = "86f7a689-2022-50b4-a561-43c23ac3c673" +version = "0.9.6" + +[[deps.NaturalSort]] +git-tree-sha1 = "eda490d06b9f7c00752ee81cfa451efe55521e21" +uuid = "c020b1a1-e9b0-503a-9c33-f039bfc54a85" +version = "1.0.0" + +[[deps.NearestNeighbors]] +deps = ["Distances", "StaticArrays"] +git-tree-sha1 = "0e353ed734b1747fc20cd4cba0edd9ac027eff6a" +uuid = "b8a86587-4115-5ab1-83bc-aa920d37bbce" +version = "0.4.11" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" +version = "1.2.0" + +[[deps.Observables]] +git-tree-sha1 = "dfd8d34871bc3ad08cd16026c1828e271d554db9" +uuid = "510215fc-4207-5dde-b226-833fc4488ee2" +version = "0.5.1" + +[[deps.OffsetArrays]] +deps = ["Adapt"] +git-tree-sha1 = "1ea784113a6aa054c5ebd95945fa5e52c2f378e7" +uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +version = "1.12.7" + +[[deps.Ogg_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "887579a3eb005446d514ab7aeac5d1d027658b8f" +uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" +version = "1.3.5+1" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.20+0" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+0" + +[[deps.OpenSSL_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e60321e3f2616584ff98f0a4f18d98ae6f89bbb3" +uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" +version = "1.1.17+0" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.5+0" + +[[deps.Opus_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "51a08fb14ec28da2ec7a927c4337e4332c2a4720" +uuid = "91d4177d-7536-5919-b921-800302f37372" +version = "1.3.2+0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.4.1" + +[[deps.PCRE_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b2a7af664e098055a7529ad1a900ded962bca488" +uuid = "2f80f16e-611a-54ab-bc61-aa92de5b98fc" +version = "8.44.0+0" + +[[deps.PDMats]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "cf494dca75a69712a72b80bc48f59dcf3dea63ec" +uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" +version = "0.11.16" + +[[deps.Parsers]] +deps = ["Dates"] +git-tree-sha1 = "0044b23da09b5608b4ecacb4e5e6c6332f833a7e" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "2.3.2" + +[[deps.Pixman_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b4f5d02549a10e20780a24fce72bea96b6329e29" +uuid = "30392449-352a-5448-841d-b1acce4e97dc" +version = "0.40.1+0" + +[[deps.Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +version = "1.8.0" + +[[deps.PlotThemes]] +deps = ["PlotUtils", "Statistics"] +git-tree-sha1 = "8162b2f8547bc23876edd0c5181b27702ae58dce" +uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a" +version = "3.0.0" + +[[deps.PlotUtils]] +deps = ["ColorSchemes", "Colors", "Dates", "Printf", "Random", "Reexport", "Statistics"] +git-tree-sha1 = "9888e59493658e476d3073f1ce24348bdc086660" +uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" +version = "1.3.0" + +[[deps.Plots]] +deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "GeometryBasics", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs", "UnicodeFun", "Unzip"] +git-tree-sha1 = "79830c17fe30f234931767238c584b3a75b3329d" +uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" +version = "1.31.6" + +[[deps.PlutoUI]] +deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "Markdown", "Random", "Reexport", "UUIDs"] +git-tree-sha1 = "8d1f54886b9037091edf146b517989fc4a09efec" +uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" +version = "0.7.39" + +[[deps.PooledArrays]] +deps = ["DataAPI", "Future"] +git-tree-sha1 = "a6062fe4063cdafe78f4a0a81cfffb89721b30e7" +uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" +version = "1.4.2" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.3.0" + +[[deps.PrettyTables]] +deps = ["Crayons", "Formatting", "Markdown", "Reexport", "Tables"] +git-tree-sha1 = "dfb54c4e414caa595a1f2ed759b160f5a3ddcba5" +uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" +version = "1.3.1" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[deps.ProgressLogging]] +deps = ["Logging", "SHA", "UUIDs"] +git-tree-sha1 = "80d919dee55b9c50e8d9e2da5eeafff3fe58b539" +uuid = "33c8b6b6-d38a-422a-b730-caa89a2f386c" +version = "0.1.4" + +[[deps.ProgressMeter]] +deps = ["Distributed", "Printf"] +git-tree-sha1 = "d7a7aef8f8f2d537104f170139553b14dfe39fe9" +uuid = "92933f4c-e287-5a05-a399-4b506db050ca" +version = "1.7.2" + +[[deps.Qt5Base_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "xkbcommon_jll"] +git-tree-sha1 = "c6c0f690d0cc7caddb74cef7aa847b824a16b256" +uuid = "ea2cea3b-5b76-57ae-a6ef-0a8af62496e1" +version = "5.15.3+1" + +[[deps.QuadGK]] +deps = ["DataStructures", "LinearAlgebra"] +git-tree-sha1 = "78aadffb3efd2155af139781b8a8df1ef279ea39" +uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" +version = "2.4.2" + +[[deps.RData]] +deps = ["CategoricalArrays", "CodecZlib", "DataFrames", "Dates", "FileIO", "Requires", "TimeZones", "Unicode"] +git-tree-sha1 = "19e47a495dfb7240eb44dc6971d660f7e4244a72" +uuid = "df47a6cb-8c03-5eed-afd8-b6050d6c41da" +version = "0.8.3" + +[[deps.RDatasets]] +deps = ["CSV", "CodecZlib", "DataFrames", "FileIO", "Printf", "RData", "Reexport"] +git-tree-sha1 = "2720e6f6afb3e562ccb70a6b62f8f308ff810333" +uuid = "ce6b1742-4840-55fa-b093-852dadbb1d8b" +version = "0.7.7" + +[[deps.REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[deps.Random]] +deps = ["SHA", "Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[deps.RangeArrays]] +git-tree-sha1 = "b9039e93773ddcfc828f12aadf7115b4b4d225f5" +uuid = "b3c3ace0-ae52-54e7-9d0b-2c1406fd6b9d" +version = "0.3.2" + +[[deps.Ratios]] +deps = ["Requires"] +git-tree-sha1 = "dc84268fe0e3335a62e315a3a7cf2afa7178a734" +uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439" +version = "0.4.3" + +[[deps.RealDot]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" +uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" +version = "0.1.0" + +[[deps.RecipesBase]] +git-tree-sha1 = "6bf3f380ff52ce0832ddd3a2a7b9538ed1bcca7d" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.2.1" + +[[deps.RecipesPipeline]] +deps = ["Dates", "NaNMath", "PlotUtils", "RecipesBase"] +git-tree-sha1 = "e7eac76a958f8664f2718508435d058168c7953d" +uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" +version = "0.6.3" + +[[deps.RecursiveArrayTools]] +deps = ["Adapt", "ArrayInterfaceCore", "ArrayInterfaceStaticArraysCore", "ChainRulesCore", "DocStringExtensions", "FillArrays", "GPUArraysCore", "LinearAlgebra", "RecipesBase", "StaticArraysCore", "Statistics", "ZygoteRules"] +git-tree-sha1 = "4ce7584604489e537b2ab84ed92b4107d03377f0" +uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" +version = "2.31.2" + +[[deps.Reexport]] +git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.2.2" + +[[deps.RelocatableFolders]] +deps = ["SHA", "Scratch"] +git-tree-sha1 = "22c5201127d7b243b9ee1de3b43c408879dff60f" +uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" +version = "0.3.0" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.0" + +[[deps.Rmath]] +deps = ["Random", "Rmath_jll"] +git-tree-sha1 = "bf3188feca147ce108c76ad82c2792c57abe7b1f" +uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" +version = "0.7.0" + +[[deps.Rmath_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "68db32dff12bb6127bac73c209881191bf0efbb7" +uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" +version = "0.3.0+0" + +[[deps.Roots]] +deps = ["CommonSolve", "Printf", "Setfield"] +git-tree-sha1 = "50f945fb7d7fdece03bbc76ff1ab96170f64a892" +uuid = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" +version = "2.0.2" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.SciMLBase]] +deps = ["ArrayInterfaceCore", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "RecipesBase", "RecursiveArrayTools", "StaticArraysCore", "Statistics", "Tables"] +git-tree-sha1 = "3077587613bd4ba73e2acd4df2d1300ef19d8513" +uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" +version = "1.47.0" + +[[deps.ScientificTypesBase]] +git-tree-sha1 = "a8e18eb383b5ecf1b5e6fc237eb39255044fd92b" +uuid = "30f210dd-8aff-4c5f-94ba-8e64358c1161" +version = "3.0.0" + +[[deps.Scratch]] +deps = ["Dates"] +git-tree-sha1 = "f94f779c94e58bf9ea243e77a37e16d9de9126bd" +uuid = "6c6a2e73-6563-6170-7368-637461726353" +version = "1.1.1" + +[[deps.SentinelArrays]] +deps = ["Dates", "Random"] +git-tree-sha1 = "db8481cf5d6278a121184809e9eb1628943c7704" +uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" +version = "1.3.13" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[deps.Setfield]] +deps = ["ConstructionBase", "Future", "MacroTools", "Requires"] +git-tree-sha1 = "38d88503f695eb0301479bc9b0d4320b378bafe5" +uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" +version = "0.8.2" + +[[deps.SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[deps.ShiftedArrays]] +git-tree-sha1 = "22395afdcf37d6709a5a0766cc4a5ca52cb85ea0" +uuid = "1277b4bf-5013-50f5-be3d-901d8477a67a" +version = "1.0.0" + +[[deps.Showoff]] +deps = ["Dates", "Grisu"] +git-tree-sha1 = "91eddf657aca81df9ae6ceb20b959ae5653ad1de" +uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f" +version = "1.0.3" + +[[deps.SimpleBufferStream]] +git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1" +uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" +version = "1.1.0" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[deps.SortingAlgorithms]] +deps = ["DataStructures"] +git-tree-sha1 = "b3363d7460f7d098ca0912c69b082f75625d7508" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "1.0.1" + +[[deps.SparseArrays]] +deps = ["LinearAlgebra", "Random"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + +[[deps.SpecialFunctions]] +deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "d75bda01f8c31ebb72df80a46c88b25d1c79c56d" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.1.7" + +[[deps.SplittablesBase]] +deps = ["Setfield", "Test"] +git-tree-sha1 = "39c9f91521de844bad65049efd4f9223e7ed43f9" +uuid = "171d559e-b47b-412a-8079-5efa626c420e" +version = "0.1.14" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "Random", "StaticArraysCore", "Statistics"] +git-tree-sha1 = "23368a3313d12a2326ad0035f0db0c0966f438ef" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.5.2" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "66fe9eb253f910fe8cf161953880cfdaef01cdf0" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.0.1" + +[[deps.StatisticalTraits]] +deps = ["ScientificTypesBase"] +git-tree-sha1 = "30b9236691858e13f167ce829490a68e1a597782" +uuid = "64bff920-2084-43da-a3e6-9bb72801c0c9" +version = "3.2.0" + +[[deps.Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.StatsAPI]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "f9af7f195fb13589dd2e2d57fdb401717d2eb1f6" +uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +version = "1.5.0" + +[[deps.StatsBase]] +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "d1bf48bfcc554a3761a133fe3a9bb01488e06916" +uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +version = "0.33.21" + +[[deps.StatsFuns]] +deps = ["ChainRulesCore", "HypergeometricFunctions", "InverseFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] +git-tree-sha1 = "5783b877201a82fc0014cbf381e7e6eb130473a4" +uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" +version = "1.0.1" + +[[deps.StatsModels]] +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "Printf", "REPL", "ShiftedArrays", "SparseArrays", "StatsBase", "StatsFuns", "Tables"] +git-tree-sha1 = "f8ba54b202c77622a713e25e7616d618308b34d3" +uuid = "3eaba693-59b7-5ba5-a881-562e759f1c8d" +version = "0.6.31" + +[[deps.StatsPlots]] +deps = ["AbstractFFTs", "Clustering", "DataStructures", "DataValues", "Distributions", "Interpolations", "KernelDensity", "LinearAlgebra", "MultivariateStats", "Observables", "Plots", "RecipesBase", "RecipesPipeline", "Reexport", "StatsBase", "TableOperations", "Tables", "Widgets"] +git-tree-sha1 = "2b35ba790f1f823872dcf378a6d3c3b520092eac" +uuid = "f3b207a7-027a-5e70-b257-86293d7955fd" +version = "0.15.1" + +[[deps.StructArrays]] +deps = ["Adapt", "DataAPI", "StaticArrays", "Tables"] +git-tree-sha1 = "ec47fb6069c57f1cee2f67541bf8f23415146de7" +uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +version = "0.6.11" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.0" + +[[deps.TableOperations]] +deps = ["SentinelArrays", "Tables", "Test"] +git-tree-sha1 = "e383c87cf2a1dc41fa30c093b2a19877c83e1bc1" +uuid = "ab02a1b2-a7df-11e8-156e-fb1833f50b87" +version = "1.2.0" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits", "Test"] +git-tree-sha1 = "5ce79ce186cc678bbb5c5681ca3379d1ddae11a1" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.7.0" + +[[deps.Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" +version = "1.10.0" + +[[deps.TensorCore]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" +uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" +version = "0.1.1" + +[[deps.TerminalLoggers]] +deps = ["LeftChildRightSiblingTrees", "Logging", "Markdown", "Printf", "ProgressLogging", "UUIDs"] +git-tree-sha1 = "62846a48a6cd70e63aa29944b8c4ef704360d72f" +uuid = "5d786b92-1e48-4d6f-9151-6b4477ca9bed" +version = "0.1.5" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.TimeZones]] +deps = ["Dates", "Downloads", "InlineStrings", "LazyArtifacts", "Mocking", "Printf", "RecipesBase", "Scratch", "Unicode"] +git-tree-sha1 = "d634a3641062c040fc8a7e2a3ea17661cc159688" +uuid = "f269a46b-ccf7-5d73-abea-4c690281aa53" +version = "1.9.0" + +[[deps.Tracker]] +deps = ["Adapt", "DiffRules", "ForwardDiff", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NNlib", "NaNMath", "Printf", "Random", "Requires", "SpecialFunctions", "Statistics"] +git-tree-sha1 = "0874c1b5de1b5529b776cfeca3ec0acfada97b1b" +uuid = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" +version = "0.2.20" + +[[deps.TranscodingStreams]] +deps = ["Random", "Test"] +git-tree-sha1 = "216b95ea110b5972db65aa90f88d8d89dcb8851c" +uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +version = "0.9.6" + +[[deps.Transducers]] +deps = ["Adapt", "ArgCheck", "BangBang", "Baselet", "CompositionsBase", "DefineSingletons", "Distributed", "InitialValues", "Logging", "Markdown", "MicroCollections", "Requires", "Setfield", "SplittablesBase", "Tables"] +git-tree-sha1 = "c76399a3bbe6f5a88faa33c8f8a65aa631d95013" +uuid = "28d57a85-8fef-5791-bfe6-a80928e7c999" +version = "0.4.73" + +[[deps.Tricks]] +git-tree-sha1 = "6bac775f2d42a611cdfcd1fb217ee719630c4175" +uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" +version = "0.1.6" + +[[deps.Turing]] +deps = ["AbstractMCMC", "AdvancedHMC", "AdvancedMH", "AdvancedPS", "AdvancedVI", "BangBang", "Bijectors", "DataStructures", "DiffResults", "Distributions", "DistributionsAD", "DocStringExtensions", "DynamicPPL", "EllipticalSliceSampling", "ForwardDiff", "Libtask", "LinearAlgebra", "MCMCChains", "NamedArrays", "Printf", "Random", "Reexport", "Requires", "SciMLBase", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Tracker", "ZygoteRules"] +git-tree-sha1 = "d5e128d1a8db72ebdd2b76644d19128cf90dda29" +uuid = "fce5fe82-541a-59a6-adf8-730c64b5f9a0" +version = "0.21.9" + +[[deps.URIs]] +git-tree-sha1 = "e59ecc5a41b000fa94423a578d29290c7266fc10" +uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" +version = "1.4.0" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[deps.UnPack]] +git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" +uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" +version = "1.0.2" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[deps.UnicodeFun]] +deps = ["REPL"] +git-tree-sha1 = "53915e50200959667e78a92a418594b428dffddf" +uuid = "1cfade01-22cf-5700-b092-accc4b62d6e1" +version = "0.4.1" + +[[deps.Unzip]] +git-tree-sha1 = "34db80951901073501137bdbc3d5a8e7bbd06670" +uuid = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" +version = "0.1.2" + +[[deps.Wayland_jll]] +deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "3e61f0b86f90dacb0bc0e73a0c5a83f6a8636e23" +uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" +version = "1.19.0+0" + +[[deps.Wayland_protocols_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4528479aa01ee1b3b4cd0e6faef0e04cf16466da" +uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91" +version = "1.25.0+0" + +[[deps.WeakRefStrings]] +deps = ["DataAPI", "InlineStrings", "Parsers"] +git-tree-sha1 = "b1be2855ed9ed8eac54e5caff2afcdb442d52c23" +uuid = "ea10d353-3f73-51f8-a26c-33c1cb351aa5" +version = "1.4.2" + +[[deps.Widgets]] +deps = ["Colors", "Dates", "Observables", "OrderedCollections"] +git-tree-sha1 = "fcdae142c1cfc7d89de2d11e08721d0f2f86c98a" +uuid = "cc8bc4a8-27d6-5769-a93b-9d913e69aa62" +version = "0.6.6" + +[[deps.WoodburyMatrices]] +deps = ["LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "de67fa59e33ad156a590055375a30b23c40299d3" +uuid = "efce3f68-66dc-5838-9240-27a6d6f5f9b6" +version = "0.5.5" + +[[deps.XML2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "58443b63fb7e465a8a7210828c91c08b92132dff" +uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" +version = "2.9.14+0" + +[[deps.XSLT_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"] +git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" +uuid = "aed1982a-8fda-507f-9586-7b0439959a61" +version = "1.1.34+0" + +[[deps.Xorg_libX11_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] +git-tree-sha1 = "5be649d550f3f4b95308bf0183b82e2582876527" +uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" +version = "1.6.9+4" + +[[deps.Xorg_libXau_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4e490d5c960c314f33885790ed410ff3a94ce67e" +uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" +version = "1.0.9+4" + +[[deps.Xorg_libXcursor_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "12e0eb3bc634fa2080c1c37fccf56f7c22989afd" +uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" +version = "1.2.0+4" + +[[deps.Xorg_libXdmcp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4fe47bd2247248125c428978740e18a681372dd4" +uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" +version = "1.1.3+4" + +[[deps.Xorg_libXext_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "b7c0aa8c376b31e4852b360222848637f481f8c3" +uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" +version = "1.3.4+4" + +[[deps.Xorg_libXfixes_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "0e0dc7431e7a0587559f9294aeec269471c991a4" +uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" +version = "5.0.3+4" + +[[deps.Xorg_libXi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] +git-tree-sha1 = "89b52bc2160aadc84d707093930ef0bffa641246" +uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" +version = "1.7.10+4" + +[[deps.Xorg_libXinerama_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll"] +git-tree-sha1 = "26be8b1c342929259317d8b9f7b53bf2bb73b123" +uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" +version = "1.1.4+4" + +[[deps.Xorg_libXrandr_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "34cea83cb726fb58f325887bf0612c6b3fb17631" +uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" +version = "1.5.2+4" + +[[deps.Xorg_libXrender_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "19560f30fd49f4d4efbe7002a1037f8c43d43b96" +uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" +version = "0.9.10+4" + +[[deps.Xorg_libpthread_stubs_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "6783737e45d3c59a4a4c4091f5f88cdcf0908cbb" +uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" +version = "0.1.0+3" + +[[deps.Xorg_libxcb_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] +git-tree-sha1 = "daf17f441228e7a3833846cd048892861cff16d6" +uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" +version = "1.13.0+3" + +[[deps.Xorg_libxkbfile_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "926af861744212db0eb001d9e40b5d16292080b2" +uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" +version = "1.1.0+4" + +[[deps.Xorg_xcb_util_image_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "0fab0a40349ba1cba2c1da699243396ff8e94b97" +uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll"] +git-tree-sha1 = "e7fd7b2881fa2eaa72717420894d3938177862d1" +uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_keysyms_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "d1151e2c45a544f32441a567d1690e701ec89b00" +uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_renderutil_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "dfd7a8f38d4613b6a575253b3174dd991ca6183e" +uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e" +version = "0.3.9+1" + +[[deps.Xorg_xcb_util_wm_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "e78d10aab01a4a154142c5006ed44fd9e8e31b67" +uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361" +version = "0.4.1+1" + +[[deps.Xorg_xkbcomp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxkbfile_jll"] +git-tree-sha1 = "4bcbf660f6c2e714f87e960a171b119d06ee163b" +uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" +version = "1.4.2+4" + +[[deps.Xorg_xkeyboard_config_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xkbcomp_jll"] +git-tree-sha1 = "5c8424f8a67c3f2209646d4425f3d415fee5931d" +uuid = "33bec58e-1273-512f-9401-5d533626f822" +version = "2.27.0+4" + +[[deps.Xorg_xtrans_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "79c31e7844f6ecf779705fbc12146eb190b7d845" +uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" +version = "1.4.0+3" + +[[deps.Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.12+3" + +[[deps.Zstd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e45044cd873ded54b6a5bac0eb5c971392cf1927" +uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" +version = "1.5.2+0" + +[[deps.ZygoteRules]] +deps = ["MacroTools"] +git-tree-sha1 = "8c1a8e4dfacb1fd631745552c8db35d0deb09ea0" +uuid = "700de1a5-db45-46bc-99cf-38207098b444" +version = "0.2.2" + +[[deps.libaom_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3a2ea60308f0996d26f1e5354e10c24e9ef905d4" +uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" +version = "3.4.0+0" + +[[deps.libass_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "5982a94fcba20f02f42ace44b9894ee2b140fe47" +uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" +version = "0.15.1+0" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.1.1+0" + +[[deps.libfdk_aac_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "daacc84a041563f965be61859a36e17c4e4fcd55" +uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" +version = "2.0.2+0" + +[[deps.libpng_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "94d180a6d2b5e55e447e2d27a29ed04fe79eb30c" +uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" +version = "1.6.38+0" + +[[deps.libvorbis_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll", "Pkg"] +git-tree-sha1 = "b910cb81ef3fe6e78bf6acee440bda86fd6ae00c" +uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" +version = "1.3.7+1" + +[[deps.nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" +version = "1.48.0+0" + +[[deps.p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "17.4.0+0" + +[[deps.x264_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4fea590b89e6ec504593146bf8b988b2c00922b2" +uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a" +version = "2021.5.5+0" + +[[deps.x265_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "ee567a171cce03570d77ad3a43e90218e38937a9" +uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" +version = "3.5.0+0" + +[[deps.xkbcommon_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll", "Wayland_protocols_jll", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] +git-tree-sha1 = "ece2350174195bb31de1a63bea3a41ae1aa593b6" +uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" +version = "0.9.1+5" +""" + +# ╔═╡ Cell order: +# ╟─bce03358-19c9-11ed-31d9-5b0929af50b6 +# ╟─0a8fff98-24fd-49d6-a6b2-061e6350350b +# ╟─9810605e-586b-4f38-a43c-4240cb91e154 +# ╟─f42b1665-df4b-4181-be03-71ccc3dbfae2 +# ╟─e752d05f-bc3c-42a4-ac5a-0517637c59b9 +# ╟─793a70b2-af69-4b4c-b4c0-8eef3b4654e9 +# ╟─af482903-2975-48d7-a4fe-4cebfa337a2b +# ╟─ada4ad28-358e-4144-9d5c-f3b1d27deff1 +# ╠═7a189076-f53f-48ed-ace2-ffbcc287ff6f +# ╠═1068259e-a7f6-4a56-b526-59e080c54d27 +# ╟─60a5cad4-c676-4334-8cbe-47877a68943f +# ╟─0c70c6be-518b-4ba4-bd69-cc34d2217077 +# ╟─cd76fa94-d0d7-43bb-8221-2a4dafa8af53 +# ╟─ccda7f54-67ee-4d17-a16c-6f8597447d1e +# ╟─e2918ef9-7f86-4d3b-93cb-65b8b5f48987 +# ╟─8b73706e-fe00-4489-8095-b3ec4528c58b +# ╠═6d2af85d-8c9e-4da7-8a38-6c0df102f954 +# ╟─8a8d8eb9-9cea-43f0-9607-9d3ca908c370 +# ╠═41a3984c-aee4-494f-8ba2-69c0274185ed +# ╠═e1e43074-9e5f-4516-bf0d-0ce4209afb6c +# ╠═15b2d945-4e78-4c41-9712-5d623b15914e +# ╠═5e5fdd62-ac1c-4ef6-a5a4-64ffe441b496 +# ╟─bdcc9726-d1fd-4d34-987e-925e1a96e58f +# ╟─fd9d6126-d764-40f5-9a4d-fda49a0962a9 +# ╠═69258680-fc21-40ca-998a-1a81279342ea +# ╠═be4d04ff-9ae8-40c6-ae7b-9ec29cd23b43 +# ╟─a84e1f2f-fdde-432f-89d3-265480ef9f53 +# ╟─44ccb675-a657-4fe8-934f-ddf29cb78f74 +# ╟─922704a0-b0c9-4fe0-a0fb-3ab58a7f01d9 +# ╟─6aaa775e-b2c4-4943-8860-9aff2e4a725c +# ╟─2a632fe1-698f-4265-8509-453ee7827ae6 +# ╟─68b88445-fb94-4d26-a723-234b3045ca54 +# ╟─39c43d27-6806-4fb6-a0e8-5f41ae0ee94e +# ╟─436f0628-ee73-4045-82f3-6d785b5ba51f +# ╠═74a2053f-ef53-41df-8afc-997c166e6f67 +# ╟─e47c4ad6-17e4-4265-bee2-738b81e61696 +# ╟─8b56260f-2e42-4a89-a1c0-bf856b9f75d3 +# ╠═40db5082-3558-4fd4-ab47-1127f6d67e38 +# ╠═fbcdbc4e-f55b-4bf8-a10d-42f2627dbfdb +# ╟─8c73a18f-55a1-4740-8795-5bbb6ff425de +# ╠═0ca3c752-627f-40ce-ac6c-d10fc90d4663 +# ╟─a84de1b9-3c27-4b63-822f-f454b7d3098b +# ╟─b25a3f92-f3ad-4c05-961d-2f69d39d98c3 +# ╠═4d9c1339-c38f-4705-9c00-2c99228da905 +# ╟─bd11a4c4-1f2b-4d3c-8e3f-8382dd9f3b3c +# ╠═244ba3cf-63ba-4501-8e88-f71c95c15a7c +# ╠═c83f3735-6aba-4183-b010-5f21cd2ff968 +# ╟─30d1520d-d301-422a-81e1-a40122d5e3fa +# ╠═53c5b238-61fd-4ef3-9194-b076b3434b16 +# ╟─0c34decf-ee35-4f9d-bf83-cfff75f8ff3b +# ╠═f092a42e-16e9-45ac-88cd-133a92402ff6 +# ╟─59245146-ef30-4df1-9ac3-776871e5d062 +# ╠═ea897f9a-89ff-421c-989a-b5f395cec705 +# ╠═78d6fe62-432b-49f3-b38f-0f6f6f5a04ed +# ╠═c92f0602-9a6c-4e2c-8a28-2a870d332fe4 +# ╠═82fc962c-a172-47ef-a86c-fa49bace3567 +# ╠═3e45f16f-ea6c-4960-98b7-1e642fb919c1 +# ╠═8a21c570-9bfe-4f66-9157-1b0dc4028ef4 +# ╠═f9b3916a-d4b2-4e6b-9a7d-be077fd45ac0 +# ╟─00000000-0000-0000-0000-000000000001 +# ╟─00000000-0000-0000-0000-000000000002 diff --git a/section7_glm.jl b/section7_glm.jl new file mode 100644 index 0000000..53f1a95 --- /dev/null +++ b/section7_glm.jl @@ -0,0 +1,2111 @@ +### A Pluto.jl notebook ### +# v0.19.11 + +using Markdown +using InteractiveUtils + +# ╔═╡ 88154488-233d-11ed-1072-3dc0dd25d3fd +begin + using PlutoUI + using StatsPlots + using Turing + using DataFrames + using Random + using LaTeXStrings + using Logging; Logging.disable_logging(Logging.Warn); +end; + +# ╔═╡ 52431ba0-762b-42d4-ab91-148998c90600 +begin + using CSV + data_url= "https://exeter-data-analytics.github.io/StatModelling/_data/cuckoo.csv" + df_cuckoo=CSV.File(download(data_url)) |> DataFrame +end; + +# ╔═╡ 89a55d82-d5a9-40cd-9247-9d5355d4fd7c +begin + using StatsBase + df_cuckoo[!, :Mass] = zscore(df_cuckoo[!, :Mass]) +end; + +# ╔═╡ ec93d30f-9d57-4598-8f64-ca706c4f0160 +using GLM + +# ╔═╡ fbb41799-8ce2-4286-be48-b6977930b6be +using StatsModels + +# ╔═╡ 623efa9d-485d-4d9c-8e6d-aedb7dcbc00d +TableOfContents() + +# ╔═╡ 0e52bc27-41e9-4361-a036-77eee3774e46 +md""" +# Bayesian generalised linear models + +Logistic regression can be viewed as a specific kind of generalised regression when the target ``y_n \in \{1,0\}`` is binary data. There are also other possible data types for ``y_n``, such as count data where the target takes integer values, *i.e.* ``y_n \in \mathbb{N}``, or ``y_n\in R^+`` when the target can only take positive real values. + + + +From a data generation perspective, we can simply choose the appropriate likelihood function such that the support matches the target's data type. For example, for real-valued data, a Gaussian is a good choice, while for binary data, a `Bernoulli` is a natural choice. In classific frequentist statistical terms, such a flexible regression model is called **generalised linear model** (GLM). + + +In this chapter, we are going to see how Bayesian GLMs can be used to do more flexible regression modelling. We will recap the frequentist's models first and then extend them to their Bayesian equivalences. + +## A recap on frequentist's GLMs + + + +A **generalised linear model** can be specified as + +```math +p(y_n|\mathbf{x}_n, \boldsymbol{\beta}_1, \beta_0, \theta) = \mathcal{P}(y_n; g^{-1}(\mu_n), \theta) +``` +where ``\mu`` as before is a linear function of the input ``\mathbf{x}_n``: +```math +\mu(\mathbf{x}_n) = \beta_0+\boldsymbol{\beta}_1^\top \mathbf{x}_n, +``` +and ``\theta`` is some optional parameters associated with the likelihood function ``\mathcal P`` (for example, the observation's noise for the linear regression model). + +Based on the above general definition, GLMs have three components: + +1. A linear function ``\mu(\mathbf{x}_n)``, that's also why the model is called generalised **linear** models; +2. A suitable likelihood function ``\mathcal{P}``, such as Gaussian, Bernoulli, Poisson, *etc.* +3. A suitable **link function** ``g(\mu)`` that is associated with the requirement of the chosen likelihood function. + + +**Example (logistic regression)** Take logistic regression as an example, the suitable likelihood function is ``\texttt{Bernoulli}(p)``. Since the bias ``p`` should be between 0 and 1, a suitable (inverse) link function is ``g^{-1}(\mu) = \texttt{logistic}(\mu)``, which is a ``R \rightarrow [0,1]`` deterministic transformation. + + +**Example (linear regression)** For linear regression, the likelihood function is Gaussian: ``\mathcal{N}(\mu, \sigma^2)``. The link function is simply an identity function , *i.e.* ``g^{-1}(x) =g(x) = x``, since the mean parameter of a Gaussian is unconstrained. An extra parameter is needed for the observation noise ``\sigma^2``. + +""" + +# ╔═╡ 73c61d37-9c26-43b7-ae99-9a79c6fe9804 +md""" + +The following table has summarised some commonly used GLMs. + + +|Distribution | Support | Typical uses | Inverse Link ``g^{-1}(\cdot)`` | +|:------------|:---------|:--------------|:--------------| +|Normal | ``R, (-\infty, +\infty)``| Real valued regression|``\texttt{identity}(x) =x``| +| Bernoulli| ``\{0, 1\}``| binary classification| ``\texttt{logistic}(x)=\frac{1}{1+e^{-x}}``| +| Binomial| ``\{0, 1, \ldots, N\}``| count of # of positives out of N binary choices| ``\texttt{logistic}(x)=\frac{1}{1+e^{-x}}``| +| Categorical| ``\{1, 2,\ldots, K\}``| K class classification| ``\texttt{softmax}_i(\mathbf{x})= \frac{e^{x_i}}{\sum_{k=1}^K e^{x_k}}``| +| Poisson| ``\{0, 1,2,\ldots\}``| count of occurrences in fixed amount of time/space| ``\exp(x) = e^x``| +| Gamma/Exponential | ``(0, +\infty)``| scale parameters | ``\texttt{negInv}(x)=-(x^{-1})``| + +""" + +# ╔═╡ 5d01251e-5ea2-4d2c-82c8-d9c576264887 +md""" +## Bayesian GLM + +The frequentist's GLMs have specified a likelihood function for the targets ``\mathbf{y}``: +```math +p(\mathbf{y}|\mathbf{X}, \boldsymbol{\beta}_1, \beta_0). +``` +To fully specify a Bayesian model, we only need to add a prior distribution for the unknown regression parameters: ``p(\beta_0, \boldsymbol{\beta})``. Since the regression parameters take unconstrained real-values, a sensible prior choice is therefore Gaussian, which was also used in the Bayesian linear and logistic regression models discussed earlier. + +A general Bayesian GLM model therefore can be specified as: + +!!! infor "Bayesian GLM" + ```math + \begin{align} + \text{Priors: }\;\;\;\;\;\;\beta_0 &\sim \mathcal{N}(m_0^{\beta_0}, v_0^{\beta_0})\\ + \boldsymbol{\beta}_1 &\sim \mathcal{N}(\mathbf{m}_0^{\beta_1}, \mathbf{V}_0^{\beta_1})\\ + \text{Likelihood: } \;\; \text{for } n &= 1,2,\ldots, N:\\ + \mu_n &=\beta_0 + \boldsymbol{\beta}_1^\top \mathbf{x}_n \\ + y_n &\sim \mathcal{P}(g^{-1}(\mu_n)). + \end{align} + ``` + + +In the following section, we are going to use Poisson regression as a concrete example to demonstrate how to do GLMs in a Bayesian way in `Turing`. + +""" + +# ╔═╡ 8b8471cd-6a77-4d8a-bbd9-ee28e0aab1f6 +md""" + +## Bayesian Poisson Regression + +To make the illustration easier, we will consider a popular GLM: Poisson regression. The regression model is a popular choice for count data. + + +To help illustrate the idea, a real-world `Cuckoo` dataset, described and analysed in the book [Statistical modelling in R](https://exeter-data-analytics.github.io/StatModelling/generalised-linear-models.html) is used here as a concrete example. + +$(Resource("https://exeter-data-analytics.github.io/StatModelling/_img/03-cuckoo.png", :align=>"")) + +The question of interest for the Cuckoo data is: + +> How does nestling mass affect begging between two different species? + + + + + +The begging rate is a count data, which takes non-negative integer values. Bayesian Poisson regression, therefore, is a suitable model. +""" + +# ╔═╡ ad45d197-0bae-4145-92b9-3b28064a692c +md""" +### Data exploration + +We first **download** and **import** the data to the notebook's environment, and then carry out some initial data exploration. +""" + +# ╔═╡ b2e26c07-43ad-47c1-a157-2368fbe5c707 +first(df_cuckoo, 5) + +# ╔═╡ e925ca4b-45c2-48fe-9d94-c34c15583a51 +describe(df_cuckoo) + +# ╔═╡ 39f3b1c0-e8bd-4d11-99ea-af9d74c7d77e +md""" + +The dataset has three variables: +* `Mass`: continuous predictor +* `Species` ``\in\{\texttt{Cuckoo, Warbler}\}``: a binary predictor indicating the species of the bird +* `Beg`: non-negative integer count data. + +The data is displayed below in a scatter plot. +""" + +# ╔═╡ b2e54b06-91ad-4cb2-b398-fd7926f8c387 +@df df_cuckoo scatter(:Mass, :Beg, group =:Species, legend=:outerright, xlabel="Mass", ylabel="Beg") + +# ╔═╡ f39d0bab-3ce6-44c4-9fe0-77438884852a +md""" +It seems that the begging count is positively correlated with the mass variable for both species. The correlations, however, show different trends, which indicates there might be some interactions between the two predictors: `Mass` and `Species`. A model that accommodates such an interaction is: + +```math +\ln(\mathbb{E}[\texttt{Beg}|\ldots]) = \beta_0 + \beta_1\cdot \texttt{Mass} + \beta_2 \cdot \texttt{Species} + \beta_3 \cdot (\texttt{Mass} \times \texttt{Species}) +``` + +Since `Species` is a binary variable, *i.e.* `Species` ``\in \{0,1\}``, the model for `Species` ``=0`` is + + +```math +\ln(\mathbb{E}[\texttt{Beg}|\texttt{Species} = 0]) = \beta_0 + \beta_1\cdot \texttt{Mass} , + +``` + +On the other hand, when `Species` ``=1``, + +```math +\ln(\mathbb{E}[\texttt{Beg}|\texttt{Species} = 1]) = (\beta_0 + \beta_2) + (\beta_1+\beta_3) \cdot \texttt{Mass}. + +``` + + +Therefore, ``\beta_3`` can be interpreted as the *add-on* effect of `Mass` on `Beg` when an observation is a ``\texttt{Warbler}``, assuming species ``\texttt{Warbler}`` is encoded as 1 and ``\texttt{Cuckoo}`` is encoded as 0. +""" + +# ╔═╡ 0475637e-d092-472d-82f4-fac65f34024e +md""" +### Data preprocessing + +""" + +# ╔═╡ 3b02812e-bd5f-47d2-89e2-3deb6f243562 +md""" + +Most GLMs employ non-linear link functions, which can be problematic for a MCMC sampler to mix. It is therefore a common practice to standardise the numerical features such that they have zero means and unit variances. +""" + +# ╔═╡ a422af52-c350-45a0-a886-59a8e71b62ba +md""" +### Frequentist inference + +It is usually a good idea to fit a frequentist model as a reference. This can be easily accomplished with `GLM.jl`. To accommodate the two different trends of the two species, we have added an interaction term. +""" + +# ╔═╡ d4f7d14c-2710-4d6c-869f-3c0ab75d3d51 +begin + glm(@formula(Beg~Mass*Species), df_cuckoo, Poisson()) +end + +# ╔═╡ b6aa0ffe-c51f-4279-94b2-13c37797acf1 +md""" +### Bayesian inference with `Turing` +""" + +# ╔═╡ eac559ce-b05f-4b91-84b8-ed1f57a53c66 +md""" + +Based on the general Bayesian GLM model, we only need to subsitute in the required Poisson likelihood for ``\mathcal{P}`` and its associated (inverse) link function ``g^{-1}``, which is an exponential function. The final model is listed below. + +!!! infor "Bayesian Poisson regression" + ```math + \begin{align} + \text{Priors: }\;\;\;\;\;\;\beta_0 &\sim \mathcal{N}(m_0^{\beta_0}, v_0^{\beta_0})\\ + \boldsymbol{\beta}_1 &\sim \mathcal{N}(\mathbf{m}_0^{\beta_1}, \mathbf{V}_0^{\beta_1})\\ + \text{Likelihood: } \;\; \text{for } n &= 1,2,\ldots, N:\\ + \mu_n &=\beta_0 + \boldsymbol{\beta}_1^\top \mathbf{x}_n \\ + \lambda_n &= e^{\mu_n}\\ + y_n &\sim \texttt{Poisson}(\lambda_n). + \end{align} + ``` + +The model can be easily ported to `Turing`. Here we have assumed +* the prior mean are all zeros, i.e. ``m_0^{\beta_0}=0``, ``\mathbf{m}_0^{\beta}=\mathbf{0}`` +* the prior variances are set to ``1``; + * since all features have been standardised, the prior variance should be weak-informative enough (we will carry out predictive checks at the end to make sure the prior parameters are reasonable) +""" + +# ╔═╡ 47cafa8d-6eb9-40c8-a9a7-56c9e7909c3d +@model function bayesian_poisson_regression(X, y; v₀=1, V₀ = 1) + # priors + β₀ ~ Normal(0, sqrt(v₀)) + nfeatures = size(X)[2] + β ~ MvNormal(zeros(nfeatures), sqrt(V₀)) + # Likelihood + μs = β₀ .+ X * β + # inverse link function for Poisson is exponential + λs = exp.(μs) + for i in eachindex(y) + y[i] ~ Poisson(λs[i]) + end + return (; μs, λs) +end + +# ╔═╡ 8af86af4-5144-4c36-b185-1c91189c9061 +md""" + +#### Prepare design matrix ``\mathbf{X}`` + +Instead of preparing the input design matrix ``\mathbf{X}`` manually, we can use `StatsModels.jl` to do the hard work for us. We only need to specify the model by the familiar `@formula` format and the `ModelFrame` object can prepare the required design matrix for us. It will typically do dummy encoding for the categorical variables and encode the interaction terms automatically. + +The prepared data are then passed to the `Turing` model to carry out the inference. +""" + +# ╔═╡ 03064a4c-6445-446a-a4b5-f50d7d2332d5 +begin + XX_cuckoo = ModelFrame(@formula(Beg~Mass*Species), df_cuckoo) |> modelmatrix + # remove the first column, the intercept + XX_cuckoo = XX_cuckoo[:, 2:end] +end; + +# ╔═╡ 44fa5546-4abb-4e0b-bde3-d444aa912377 +chain_poisson_cuckoo = let + yy = df_cuckoo[!, :Beg] + Random.seed!(100) + chain = sample( + bayesian_poisson_regression(XX_cuckoo, yy; v₀=1, V₀=1), + NUTS(), + MCMCThreads(), + 1500, + 3 + ) + chain +end; + +# ╔═╡ 7fe35625-4796-4240-bcdd-03aef6ade093 +md""" + +The inference results look similar to the frequentist method. However, the posterior means are shrinked a little bit towards zero, the prior's mean. The credible intervals also show that all three predictors' parameters are not likely to be zeros, which is in agreement with the frequentist's test result. +""" + +# ╔═╡ 1a949d5a-2795-4974-8ae9-83a4e3c7fc90 +describe(chain_poisson_cuckoo) + +# ╔═╡ fd583678-f289-4075-9dee-8bdd334ce17f +plot(chain_poisson_cuckoo) + +# ╔═╡ 6456936d-423e-4c56-931e-15e23fcbd82d +md""" + +Different from the frequentist's method, the Bayesian method provides us with uncertain measurements of all parameters within the model. For the Poisson regression model, we are interested in the posterior predictive of the expected begging count: ``\lambda_\ast = e^{\beta_0+x_\ast^\top \beta_1}``. The expected value has its posterior distribution, which can be approximated by the Monte Carlo method: + +```math +p(\lambda_\ast | \mathcal{D}) \approx \frac{1}{R} \sum_r e^{\beta_0^{(r)}+x_\ast^\top \beta_1^{(r)}}, +``` + +where ``\{\beta_0^{(r)}, \boldsymbol{\beta}_1^{(r)}\}_{r=1}^R`` are the posterior MCMC samples. The Monte Carlo formula can be interpreted as an *ensemble method*: multiple models, each indexed by one of the ``R`` posterior samples, all contribute to the final prediction. + +We can use `Julia`'s `generated_quantities()` method to find the approximation. +""" + +# ╔═╡ 6ea6d1a1-fde0-4eb8-aa4c-a99a4f6a22e2 +begin + xs_test = collect(-1.5:0.1:3) + test_df = DataFrame(Mass = xs_test, Species = trues(length(xs_test)), Beg=zeros(length(xs_test))) + XX_test = ModelFrame(@formula(Beg~Mass*Species), test_df) |> modelmatrix + # remove the first column, the intercept + XX_test = XX_test[:, 2:end] + ys_ = Vector{Union{Missing, Int64}}(undef, size(XX_test)[1]) + pred_model_poisson = bayesian_poisson_regression(XX_test, ys_; v₀=1, V₀=1) + gen_true = generated_quantities(pred_model_poisson, chain_poisson_cuckoo) + Xs_false =[xs_test falses(length(xs_test)) xs_test .* falses(length(xs_test))] + gen_false = generated_quantities(bayesian_poisson_regression(Xs_false, ys_; v₀=1, V₀=1), chain_poisson_cuckoo) + λs_true = map(x -> x.λs, gen_true) + λs_false = map(x -> x.λs, gen_false) +end; + +# ╔═╡ 7a7a5641-2462-46fb-8ab0-5a76788af289 +md""" + +The Bayesian posterior distributions of ``\lambda`` are shown below. Note that the Bayesion inference not only provides us with a point estimator (the posterior mean) but also uncertainty measurement associated with the estimate. +""" + +# ╔═╡ 79a32094-2dd4-484f-b91f-b5f9d99cc4bd +let + plt =@df df_cuckoo scatter(:Mass, :Beg, group =:Species, legend=:outerright, ylim=[-9,250], xlabel="Mass", ylabel="Beg", legendtitle=L"\texttt{Species}") + plot!(xs_test, mean(λs_false), lc=1, lw=1.5,label=L"\mathbb{E}[\lambda|\mathcal{D}]"*" Cuckoo") + plot!(xs_test, mean(λs_true), lc=2, lw=1.5,label=L"\mathbb{E}[\lambda|\mathcal{D}]"*" Warbler") + for i in 1:80 + plot!(xs_test, λs_false[i, 1], lw=0.2, lc=1, alpha =0.5, label="") + plot!(xs_test, λs_true[i, 1], lw=0.2, lc=2,alpha=0.5, label="") + end + plt +end + +# ╔═╡ b4227421-2b35-467f-b11f-f2425b12c9b9 +md""" +#### Predictive checks + +Lastly, we carry out predictive checks to make sure the Bayesian model's assumption matches the observed data. To simulate data from the posterior predictive distribution, we use the `predict()` method. +""" + +# ╔═╡ 4ab38b80-0bae-4ea5-a109-3a88556daac5 +pred_ys_poisson = let + yy_ = Vector{Union{Missing, Float64}}(undef, size(XX_cuckoo)[1]) + gen = predict( + bayesian_poisson_regression(XX_cuckoo, yy_; v₀=1, V₀=1), + chain_poisson_cuckoo + ) +end + +# ╔═╡ 6ae3eb45-9577-4bfe-8363-0b3c47bd0421 +md""" +The mean and (log-transformed) standard deviation of the simulated samples are first calculated; and then plotted to compare against the observed. It can be observed from the plot that the simulated data based on our model assumption matches what we have observed since the observed statistic sits well within the boundary of the simulated statistics. +""" + +# ╔═╡ 9d2d1c39-6c64-4deb-a2ef-dbbfbfd88323 +let + pred_y_μ_σ = DataFrame(mean= mean(Array(pred_ys_poisson), dims=2)[:], std=log.(std(Array(pred_ys_poisson), dims=2)[:])); + @df pred_y_μ_σ scatter(:mean, :std, ms=2, alpha=0.5, label="Predicted", xlabel=L"\mu(\mathbf{y})", ylabel=L"\ln(\sigma(\mathbf{y}))", legend=:topleft) + scatter!([mean(df_cuckoo.Beg)], [log(std(df_cuckoo.Beg))], ms=8,label="Observed") +end + +# ╔═╡ 00000000-0000-0000-0000-000000000001 +PLUTO_PROJECT_TOML_CONTENTS = """ +[deps] +CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" +DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +GLM = "38e38edf-8417-5370-95a0-9cbb8c7f171a" +LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" +PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +StatsModels = "3eaba693-59b7-5ba5-a881-562e759f1c8d" +StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd" +Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0" + +[compat] +CSV = "~0.10.4" +DataFrames = "~1.3.4" +GLM = "~1.8.0" +LaTeXStrings = "~1.3.0" +PlutoUI = "~0.7.39" +StatsBase = "~0.33.21" +StatsModels = "~0.6.31" +StatsPlots = "~0.15.1" +Turing = "~0.21.10" +""" + +# ╔═╡ 00000000-0000-0000-0000-000000000002 +PLUTO_MANIFEST_TOML_CONTENTS = """ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.8.0" +manifest_format = "2.0" +project_hash = "61910a51e4d391476966f114ca79cf939ef1ea7e" + +[[deps.AbstractFFTs]] +deps = ["ChainRulesCore", "LinearAlgebra"] +git-tree-sha1 = "69f7020bd72f069c219b5e8c236c1fa90d2cb409" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.2.1" + +[[deps.AbstractMCMC]] +deps = ["BangBang", "ConsoleProgressMonitor", "Distributed", "Logging", "LoggingExtras", "ProgressLogging", "Random", "StatsBase", "TerminalLoggers", "Transducers"] +git-tree-sha1 = "5c26c7759412ffcaf0dd6e3172e55d783dd7610b" +uuid = "80f14c24-f653-4e6a-9b94-39d6b0f70001" +version = "4.1.3" + +[[deps.AbstractPPL]] +deps = ["AbstractMCMC", "DensityInterface", "Setfield", "SparseArrays"] +git-tree-sha1 = "6320752437e9fbf49639a410017d862ad64415a5" +uuid = "7a57a42e-76ec-4ea3-a279-07e840d6d9cf" +version = "0.5.2" + +[[deps.AbstractPlutoDingetjes]] +deps = ["Pkg"] +git-tree-sha1 = "8eaf9f1b4921132a4cff3f36a1d9ba923b14a481" +uuid = "6e696c72-6542-2067-7265-42206c756150" +version = "1.1.4" + +[[deps.AbstractTrees]] +git-tree-sha1 = "03e0550477d86222521d254b741d470ba17ea0b5" +uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" +version = "0.3.4" + +[[deps.Adapt]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "195c5505521008abea5aee4f96930717958eac6f" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "3.4.0" + +[[deps.AdvancedHMC]] +deps = ["AbstractMCMC", "ArgCheck", "DocStringExtensions", "InplaceOps", "LinearAlgebra", "ProgressMeter", "Random", "Requires", "Setfield", "Statistics", "StatsBase", "StatsFuns", "UnPack"] +git-tree-sha1 = "345effa84030f273ee86fcdd706d8484ce9a1a3c" +uuid = "0bf59076-c3b1-5ca4-86bd-e02cd72cde3d" +version = "0.3.5" + +[[deps.AdvancedMH]] +deps = ["AbstractMCMC", "Distributions", "Random", "Requires"] +git-tree-sha1 = "d7a7dabeaef34e5106cdf6c2ac956e9e3f97f666" +uuid = "5b7e9947-ddc0-4b3f-9b55-0d8042f74170" +version = "0.6.8" + +[[deps.AdvancedPS]] +deps = ["AbstractMCMC", "Distributions", "Libtask", "Random", "StatsFuns"] +git-tree-sha1 = "9ff1247be1e2aa2e740e84e8c18652bd9d55df22" +uuid = "576499cb-2369-40b2-a588-c64705576edc" +version = "0.3.8" + +[[deps.AdvancedVI]] +deps = ["Bijectors", "Distributions", "DistributionsAD", "DocStringExtensions", "ForwardDiff", "LinearAlgebra", "ProgressMeter", "Random", "Requires", "StatsBase", "StatsFuns", "Tracker"] +git-tree-sha1 = "e743af305716a527cdb3a67b31a33a7c3832c41f" +uuid = "b5ca4192-6429-45e5-a2d9-87aec30a685c" +version = "0.1.5" + +[[deps.ArgCheck]] +git-tree-sha1 = "a3a402a35a2f7e0b87828ccabbd5ebfbebe356b4" +uuid = "dce04be8-c92d-5529-be00-80e4d2c0e197" +version = "2.3.0" + +[[deps.ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" +version = "1.1.1" + +[[deps.Arpack]] +deps = ["Arpack_jll", "Libdl", "LinearAlgebra", "Logging"] +git-tree-sha1 = "91ca22c4b8437da89b030f08d71db55a379ce958" +uuid = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97" +version = "0.5.3" + +[[deps.Arpack_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "OpenBLAS_jll", "Pkg"] +git-tree-sha1 = "5ba6c757e8feccf03a1554dfaf3e26b3cfc7fd5e" +uuid = "68821587-b530-5797-8361-c406ea357684" +version = "3.5.1+1" + +[[deps.ArrayInterfaceCore]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "40debc9f72d0511e12d817c7ca06a721b6423ba3" +uuid = "30b0a656-2188-435a-8636-2ec0e6a096e2" +version = "0.1.17" + +[[deps.ArrayInterfaceStaticArraysCore]] +deps = ["Adapt", "ArrayInterfaceCore", "LinearAlgebra", "StaticArraysCore"] +git-tree-sha1 = "a1e2cf6ced6505cbad2490532388683f1e88c3ed" +uuid = "dd5226c6-a4d4-4bc7-8575-46859f9c95b9" +version = "0.1.0" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[deps.AxisAlgorithms]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"] +git-tree-sha1 = "66771c8d21c8ff5e3a93379480a2307ac36863f7" +uuid = "13072b0f-2c55-5437-9ae7-d433b7a33950" +version = "1.0.1" + +[[deps.AxisArrays]] +deps = ["Dates", "IntervalSets", "IterTools", "RangeArrays"] +git-tree-sha1 = "1dd4d9f5beebac0c03446918741b1a03dc5e5788" +uuid = "39de3d68-74b9-583c-8d2d-e117c070f3a9" +version = "0.4.6" + +[[deps.BangBang]] +deps = ["Compat", "ConstructionBase", "Future", "InitialValues", "LinearAlgebra", "Requires", "Setfield", "Tables", "ZygoteRules"] +git-tree-sha1 = "b15a6bc52594f5e4a3b825858d1089618871bf9d" +uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66" +version = "0.3.36" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[deps.Baselet]] +git-tree-sha1 = "aebf55e6d7795e02ca500a689d326ac979aaf89e" +uuid = "9718e550-a3fa-408a-8086-8db961cd8217" +version = "0.1.1" + +[[deps.Bijectors]] +deps = ["ArgCheck", "ChainRulesCore", "ChangesOfVariables", "Compat", "Distributions", "Functors", "InverseFunctions", "IrrationalConstants", "LinearAlgebra", "LogExpFunctions", "MappedArrays", "Random", "Reexport", "Requires", "Roots", "SparseArrays", "Statistics"] +git-tree-sha1 = "875f3845e1256ee1d9e0c8ca3993e709b32c0ed1" +uuid = "76274a88-744f-5084-9051-94815aaf08c4" +version = "0.10.3" + +[[deps.Bzip2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2" +uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" +version = "1.0.8+0" + +[[deps.CSV]] +deps = ["CodecZlib", "Dates", "FilePathsBase", "InlineStrings", "Mmap", "Parsers", "PooledArrays", "SentinelArrays", "Tables", "Unicode", "WeakRefStrings"] +git-tree-sha1 = "873fb188a4b9d76549b81465b1f75c82aaf59238" +uuid = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" +version = "0.10.4" + +[[deps.Cairo_jll]] +deps = ["Artifacts", "Bzip2_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "4b859a208b2397a7a623a03449e4636bdb17bcf2" +uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" +version = "1.16.1+1" + +[[deps.Calculus]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" +uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" +version = "0.5.1" + +[[deps.ChainRules]] +deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "Statistics", "StructArrays"] +git-tree-sha1 = "76a4fae57a1c564a63c6f2d0a3dd5538525852ff" +uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" +version = "1.44.3" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "80ca332f6dcb2508adba68f22f551adb2d00a624" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.15.3" + +[[deps.ChangesOfVariables]] +deps = ["ChainRulesCore", "LinearAlgebra", "Test"] +git-tree-sha1 = "38f7a08f19d8810338d4f5085211c7dfa5d5bdd8" +uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" +version = "0.1.4" + +[[deps.Clustering]] +deps = ["Distances", "LinearAlgebra", "NearestNeighbors", "Printf", "SparseArrays", "Statistics", "StatsBase"] +git-tree-sha1 = "75479b7df4167267d75294d14b58244695beb2ac" +uuid = "aaaa29a8-35af-508c-8bc3-b662a17a0fe5" +version = "0.14.2" + +[[deps.CodecZlib]] +deps = ["TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "ded953804d019afa9a3f98981d99b33e3db7b6da" +uuid = "944b1d66-785c-5afd-91f1-9de20f533193" +version = "0.7.0" + +[[deps.ColorSchemes]] +deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "Random"] +git-tree-sha1 = "1fd869cc3875b57347f7027521f561cf46d1fcd8" +uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" +version = "3.19.0" + +[[deps.ColorTypes]] +deps = ["FixedPointNumbers", "Random"] +git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4" +uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" +version = "0.11.4" + +[[deps.ColorVectorSpace]] +deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "SpecialFunctions", "Statistics", "TensorCore"] +git-tree-sha1 = "d08c20eef1f2cbc6e60fd3612ac4340b89fea322" +uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" +version = "0.9.9" + +[[deps.Colors]] +deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] +git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40" +uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" +version = "0.12.8" + +[[deps.Combinatorics]] +git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" +uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" +version = "1.0.2" + +[[deps.CommonSolve]] +git-tree-sha1 = "332a332c97c7071600984b3c31d9067e1a4e6e25" +uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" +version = "0.2.1" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools", "Test"] +git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.0" + +[[deps.Compat]] +deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] +git-tree-sha1 = "78bee250c6826e1cf805a88b7f1e86025275d208" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "3.46.0" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "0.5.2+0" + +[[deps.CompositionsBase]] +git-tree-sha1 = "455419f7e328a1a2493cabc6428d79e951349769" +uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" +version = "0.1.1" + +[[deps.ConsoleProgressMonitor]] +deps = ["Logging", "ProgressMeter"] +git-tree-sha1 = "3ab7b2136722890b9af903859afcf457fa3059e8" +uuid = "88cd18e8-d9cc-4ea6-8889-5259c0d15c8b" +version = "0.1.2" + +[[deps.ConstructionBase]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "fb21ddd70a051d882a1686a5a550990bbe371a95" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.4.1" + +[[deps.Contour]] +git-tree-sha1 = "d05d9e7b7aedff4e5b51a029dced05cfb6125781" +uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" +version = "0.6.2" + +[[deps.Crayons]] +git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15" +uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" +version = "4.1.1" + +[[deps.DataAPI]] +git-tree-sha1 = "fb5f5316dd3fd4c5e7c30a24d50643b73e37cd40" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.10.0" + +[[deps.DataFrames]] +deps = ["Compat", "DataAPI", "Future", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrettyTables", "Printf", "REPL", "Reexport", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] +git-tree-sha1 = "daa21eb85147f72e41f6352a57fccea377e310a9" +uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +version = "1.3.4" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "d1fff3a548102f48987a52a2e0d114fa97d730f0" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.13" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.DataValues]] +deps = ["DataValueInterfaces", "Dates"] +git-tree-sha1 = "d88a19299eba280a6d062e135a43f00323ae70bf" +uuid = "e7dc6d0d-1eca-5fa6-8ad6-5aecde8b7ea5" +version = "0.4.13" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[deps.DefineSingletons]] +git-tree-sha1 = "0fba8b706d0178b4dc7fd44a96a92382c9065c2c" +uuid = "244e2a9f-e319-4986-a169-4d1fe445cd52" +version = "0.1.2" + +[[deps.DelimitedFiles]] +deps = ["Mmap"] +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" + +[[deps.DensityInterface]] +deps = ["InverseFunctions", "Test"] +git-tree-sha1 = "80c3e8639e3353e5d2912fb3a1916b8455e2494b" +uuid = "b429d917-457f-4dbc-8f4c-0cc954292b1d" +version = "0.4.0" + +[[deps.DiffResults]] +deps = ["StaticArrays"] +git-tree-sha1 = "c18e98cba888c6c25d1c3b048e4b3380ca956805" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.0.3" + +[[deps.DiffRules]] +deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] +git-tree-sha1 = "28d605d9a0ac17118fe2c5e9ce0fbb76c3ceb120" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.11.0" + +[[deps.Distances]] +deps = ["LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "3258d0659f812acde79e8a74b11f17ac06d0ca04" +uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" +version = "0.10.7" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[deps.Distributions]] +deps = ["ChainRulesCore", "DensityInterface", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"] +git-tree-sha1 = "6180800cebb409d7eeef8b2a9a562107b9705be5" +uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" +version = "0.25.67" + +[[deps.DistributionsAD]] +deps = ["Adapt", "ChainRules", "ChainRulesCore", "Compat", "DiffRules", "Distributions", "FillArrays", "LinearAlgebra", "NaNMath", "PDMats", "Random", "Requires", "SpecialFunctions", "StaticArrays", "StatsBase", "StatsFuns", "ZygoteRules"] +git-tree-sha1 = "74dd5dac82812af7041ae322584d5c2181dead5c" +uuid = "ced4e74d-a319-5a8a-b0ac-84af2272839c" +version = "0.6.42" + +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.8.6" + +[[deps.Downloads]] +deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +version = "1.6.0" + +[[deps.DualNumbers]] +deps = ["Calculus", "NaNMath", "SpecialFunctions"] +git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566" +uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74" +version = "0.6.8" + +[[deps.DynamicPPL]] +deps = ["AbstractMCMC", "AbstractPPL", "BangBang", "Bijectors", "ChainRulesCore", "ConstructionBase", "Distributions", "DocStringExtensions", "LinearAlgebra", "MacroTools", "Random", "Setfield", "Test", "ZygoteRules"] +git-tree-sha1 = "b1d485d5e92a16545d14775d08eb22ca7a840515" +uuid = "366bfd00-2699-11ea-058f-f148b4cae6d8" +version = "0.20.0" + +[[deps.EarCut_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3f3a2501fa7236e9b911e0f7a588c657e822bb6d" +uuid = "5ae413db-bbd1-5e63-b57d-d24a61df00f5" +version = "2.2.3+0" + +[[deps.EllipticalSliceSampling]] +deps = ["AbstractMCMC", "ArrayInterfaceCore", "Distributions", "Random", "Statistics"] +git-tree-sha1 = "4cda4527e990c0cc201286e0a0bfbbce00abcfc2" +uuid = "cad2338a-1db2-11e9-3401-43bc07c9ede2" +version = "1.0.0" + +[[deps.Expat_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "bad72f730e9e91c08d9427d5e8db95478a3c323d" +uuid = "2e619515-83b5-522b-bb60-26c02a35a201" +version = "2.4.8+0" + +[[deps.Extents]] +git-tree-sha1 = "5e1e4c53fa39afe63a7d356e30452249365fba99" +uuid = "411431e0-e8b7-467b-b5e0-f676ba4f2910" +version = "0.1.1" + +[[deps.FFMPEG]] +deps = ["FFMPEG_jll"] +git-tree-sha1 = "b57e3acbe22f8484b4b5ff66a7499717fe1a9cc8" +uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" +version = "0.4.1" + +[[deps.FFMPEG_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] +git-tree-sha1 = "ccd479984c7838684b3ac204b716c89955c76623" +uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" +version = "4.4.2+0" + +[[deps.FFTW]] +deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] +git-tree-sha1 = "90630efff0894f8142308e334473eba54c433549" +uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" +version = "1.5.0" + +[[deps.FFTW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "c6033cc3892d0ef5bb9cd29b7f2f0331ea5184ea" +uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" +version = "3.3.10+0" + +[[deps.FilePathsBase]] +deps = ["Compat", "Dates", "Mmap", "Printf", "Test", "UUIDs"] +git-tree-sha1 = "129b104185df66e408edd6625d480b7f9e9823a0" +uuid = "48062228-2e41-5def-b9a4-89aafe57970f" +version = "0.9.18" + +[[deps.FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" + +[[deps.FillArrays]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"] +git-tree-sha1 = "246621d23d1f43e3b9c368bf3b72b2331a27c286" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "0.13.2" + +[[deps.FixedPointNumbers]] +deps = ["Statistics"] +git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc" +uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" +version = "0.8.4" + +[[deps.Fontconfig_jll]] +deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "21efd19106a55620a188615da6d3d06cd7f6ee03" +uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" +version = "2.13.93+0" + +[[deps.Formatting]] +deps = ["Printf"] +git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" +uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" +version = "0.4.2" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"] +git-tree-sha1 = "187198a4ed8ccd7b5d99c41b69c679269ea2b2d4" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "0.10.32" + +[[deps.FreeType2_jll]] +deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "87eb71354d8ec1a96d4a7636bd57a7347dde3ef9" +uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" +version = "2.10.4+0" + +[[deps.FriBidi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "aa31987c2ba8704e23c6c8ba8a4f769d5d7e4f91" +uuid = "559328eb-81f9-559d-9380-de523a88c83c" +version = "1.0.10+0" + +[[deps.FunctionWrappers]] +git-tree-sha1 = "241552bc2209f0fa068b6415b1942cc0aa486bcc" +uuid = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" +version = "1.1.2" + +[[deps.FunctionWrappersWrappers]] +deps = ["FunctionWrappers"] +git-tree-sha1 = "2da4f223fbc4328b389bcce5f3e93dbe71678590" +uuid = "77dc65aa-8811-40c2-897b-53d922fa7daf" +version = "0.1.0" + +[[deps.Functors]] +git-tree-sha1 = "223fffa49ca0ff9ce4f875be001ffe173b2b7de4" +uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196" +version = "0.2.8" + +[[deps.Future]] +deps = ["Random"] +uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" + +[[deps.GLFW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll"] +git-tree-sha1 = "d972031d28c8c8d9d7b41a536ad7bb0c2579caca" +uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" +version = "3.3.8+0" + +[[deps.GLM]] +deps = ["Distributions", "LinearAlgebra", "Printf", "Reexport", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "StatsModels"] +git-tree-sha1 = "039118892476c2bf045a43b88fcb75ed566000ff" +uuid = "38e38edf-8417-5370-95a0-9cbb8c7f171a" +version = "1.8.0" + +[[deps.GPUArraysCore]] +deps = ["Adapt"] +git-tree-sha1 = "6872f5ec8fd1a38880f027a26739d42dcda6691f" +uuid = "46192b85-c4d5-4398-a991-12ede77f4527" +version = "0.1.2" + +[[deps.GR]] +deps = ["Base64", "DelimitedFiles", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Pkg", "Printf", "Random", "RelocatableFolders", "Serialization", "Sockets", "Test", "UUIDs"] +git-tree-sha1 = "cf0a9940f250dc3cb6cc6c6821b4bf8a4286cf9c" +uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" +version = "0.66.2" + +[[deps.GR_jll]] +deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Pkg", "Qt5Base_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "2d908286d120c584abbe7621756c341707096ba4" +uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" +version = "0.66.2+0" + +[[deps.GeoInterface]] +deps = ["Extents"] +git-tree-sha1 = "fb28b5dc239d0174d7297310ef7b84a11804dfab" +uuid = "cf35fbd7-0cd7-5166-be24-54bfbe79505f" +version = "1.0.1" + +[[deps.GeometryBasics]] +deps = ["EarCut_jll", "GeoInterface", "IterTools", "LinearAlgebra", "StaticArrays", "StructArrays", "Tables"] +git-tree-sha1 = "a7a97895780dab1085a97769316aa348830dc991" +uuid = "5c1252a2-5f33-56bf-86c9-59e7332b4326" +version = "0.4.3" + +[[deps.Gettext_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "9b02998aba7bf074d14de89f9d37ca24a1a0b046" +uuid = "78b55507-aeef-58d4-861c-77aaff3498b1" +version = "0.21.0+0" + +[[deps.Glib_jll]] +deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "a32d672ac2c967f3deb8a81d828afc739c838a06" +uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" +version = "2.68.3+2" + +[[deps.Graphite2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "344bf40dcab1073aca04aa0df4fb092f920e4011" +uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" +version = "1.3.14+0" + +[[deps.Grisu]] +git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" +uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" +version = "1.0.2" + +[[deps.HTTP]] +deps = ["Base64", "CodecZlib", "Dates", "IniFile", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "f0956f8d42a92816d2bf062f8a6a6a0ad7f9b937" +uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" +version = "1.2.1" + +[[deps.HarfBuzz_jll]] +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] +git-tree-sha1 = "129acf094d168394e80ee1dc4bc06ec835e510a3" +uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" +version = "2.8.1+1" + +[[deps.HypergeometricFunctions]] +deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions", "Test"] +git-tree-sha1 = "709d864e3ed6e3545230601f94e11ebc65994641" +uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" +version = "0.3.11" + +[[deps.Hyperscript]] +deps = ["Test"] +git-tree-sha1 = "8d511d5b81240fc8e6802386302675bdf47737b9" +uuid = "47d2ed2b-36de-50cf-bf87-49c2cf4b8b91" +version = "0.0.4" + +[[deps.HypertextLiteral]] +deps = ["Tricks"] +git-tree-sha1 = "c47c5fa4c5308f27ccaac35504858d8914e102f9" +uuid = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2" +version = "0.9.4" + +[[deps.IOCapture]] +deps = ["Logging", "Random"] +git-tree-sha1 = "f7be53659ab06ddc986428d3a9dcc95f6fa6705a" +uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" +version = "0.2.2" + +[[deps.IniFile]] +git-tree-sha1 = "f550e6e32074c939295eb5ea6de31849ac2c9625" +uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f" +version = "0.5.1" + +[[deps.InitialValues]] +git-tree-sha1 = "4da0f88e9a39111c2fa3add390ab15f3a44f3ca3" +uuid = "22cec73e-a1b8-11e9-2c92-598750a2cf9c" +version = "0.3.1" + +[[deps.InlineStrings]] +deps = ["Parsers"] +git-tree-sha1 = "d19f9edd8c34760dca2de2b503f969d8700ed288" +uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" +version = "1.1.4" + +[[deps.InplaceOps]] +deps = ["LinearAlgebra", "Test"] +git-tree-sha1 = "50b41d59e7164ab6fda65e71049fee9d890731ff" +uuid = "505f98c9-085e-5b2c-8e89-488be7bf1f34" +version = "0.3.0" + +[[deps.IntelOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "d979e54b71da82f3a65b62553da4fc3d18c9004c" +uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" +version = "2018.0.3+2" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[deps.Interpolations]] +deps = ["Adapt", "AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "Requires", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"] +git-tree-sha1 = "64f138f9453a018c8f3562e7bae54edc059af249" +uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" +version = "0.14.4" + +[[deps.IntervalSets]] +deps = ["Dates", "Random", "Statistics"] +git-tree-sha1 = "076bb0da51a8c8d1229936a1af7bdfacd65037e1" +uuid = "8197267c-284f-5f27-9208-e0e47529a953" +version = "0.7.2" + +[[deps.InverseFunctions]] +deps = ["Test"] +git-tree-sha1 = "b3364212fb5d870f724876ffcd34dd8ec6d98918" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.7" + +[[deps.InvertedIndices]] +git-tree-sha1 = "bee5f1ef5bf65df56bdd2e40447590b272a5471f" +uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" +version = "1.1.0" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "7fd44fd4ff43fc60815f8e764c0f352b83c49151" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.1.1" + +[[deps.IterTools]] +git-tree-sha1 = "fa6287a4469f5e048d763df38279ee729fbd44e5" +uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" +version = "1.4.0" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLLWrappers]] +deps = ["Preferences"] +git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.4.1" + +[[deps.JSON]] +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "3c837543ddb02250ef42f4738347454f95079d4e" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.21.3" + +[[deps.JpegTurbo_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b53380851c6e6664204efb2e62cd24fa5c47e4ba" +uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" +version = "2.1.2+0" + +[[deps.KernelDensity]] +deps = ["Distributions", "DocStringExtensions", "FFTW", "Interpolations", "StatsBase"] +git-tree-sha1 = "9816b296736292a80b9a3200eb7fbb57aaa3917a" +uuid = "5ab0869b-81aa-558d-bb23-cbf5423bbe9b" +version = "0.6.5" + +[[deps.LAME_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "f6250b16881adf048549549fba48b1161acdac8c" +uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" +version = "3.100.1+0" + +[[deps.LERC_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" +uuid = "88015f11-f218-50d7-93a8-a6af411a945d" +version = "3.0.0+1" + +[[deps.LRUCache]] +git-tree-sha1 = "d64a0aff6691612ab9fb0117b0995270871c5dfc" +uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" +version = "1.3.0" + +[[deps.LZO_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e5b909bcf985c5e2605737d2ce278ed791b89be6" +uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" +version = "2.10.1+0" + +[[deps.LaTeXStrings]] +git-tree-sha1 = "f2355693d6778a178ade15952b7ac47a4ff97996" +uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +version = "1.3.0" + +[[deps.Latexify]] +deps = ["Formatting", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "Printf", "Requires"] +git-tree-sha1 = "1a43be956d433b5d0321197150c2f94e16c0aaa0" +uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" +version = "0.15.16" + +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" + +[[deps.LeftChildRightSiblingTrees]] +deps = ["AbstractTrees"] +git-tree-sha1 = "b864cb409e8e445688bc478ef87c0afe4f6d1f8d" +uuid = "1d6d02ad-be62-4b6b-8a6d-2f90e265016e" +version = "0.1.3" + +[[deps.LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" +version = "0.6.3" + +[[deps.LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" +version = "7.84.0+0" + +[[deps.LibGit2]] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[deps.LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" +version = "1.10.2+0" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[deps.Libffi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "0b4a5d71f3e5200a7dff793393e09dfc2d874290" +uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" +version = "3.2.2+1" + +[[deps.Libgcrypt_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"] +git-tree-sha1 = "64613c82a59c120435c067c2b809fc61cf5166ae" +uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" +version = "1.8.7+0" + +[[deps.Libglvnd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"] +git-tree-sha1 = "7739f837d6447403596a75d19ed01fd08d6f56bf" +uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" +version = "1.3.0+3" + +[[deps.Libgpg_error_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "c333716e46366857753e273ce6a69ee0945a6db9" +uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" +version = "1.42.0+0" + +[[deps.Libiconv_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "42b62845d70a619f063a7da093d995ec8e15e778" +uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" +version = "1.16.1+1" + +[[deps.Libmount_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "9c30530bf0effd46e15e0fdcf2b8636e78cbbd73" +uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" +version = "2.35.0+0" + +[[deps.Libtask]] +deps = ["FunctionWrappers", "LRUCache", "LinearAlgebra", "Statistics"] +git-tree-sha1 = "dfa6c5f2d5a8918dd97c7f1a9ea0de68c2365426" +uuid = "6f1fad26-d15e-5dc8-ae53-837a1d7b8c9f" +version = "0.7.5" + +[[deps.Libtiff_jll]] +deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "Pkg", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "3eb79b0ca5764d4799c06699573fd8f533259713" +uuid = "89763e89-9b03-5906-acba-b20f662cd828" +version = "4.4.0+0" + +[[deps.Libuuid_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "7f3efec06033682db852f8b3bc3c1d2b0a0ab066" +uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" +version = "2.36.0+0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[deps.LogExpFunctions]] +deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "94d9c52ca447e23eac0c0f074effbcd38830deb5" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.18" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "5d4d2d9904227b8bd66386c1138cf4d5ffa826bf" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "0.4.9" + +[[deps.MCMCChains]] +deps = ["AbstractMCMC", "AxisArrays", "Compat", "Dates", "Distributions", "Formatting", "IteratorInterfaceExtensions", "KernelDensity", "LinearAlgebra", "MCMCDiagnosticTools", "MLJModelInterface", "NaturalSort", "OrderedCollections", "PrettyTables", "Random", "RecipesBase", "Serialization", "Statistics", "StatsBase", "StatsFuns", "TableTraits", "Tables"] +git-tree-sha1 = "8cb9b8fb081afd7728f5de25b9025bff97cb5c7a" +uuid = "c7f686f2-ff18-58e9-bc7b-31028e88f75d" +version = "5.3.1" + +[[deps.MCMCDiagnosticTools]] +deps = ["AbstractFFTs", "DataAPI", "Distributions", "LinearAlgebra", "MLJModelInterface", "Random", "SpecialFunctions", "Statistics", "StatsBase", "Tables"] +git-tree-sha1 = "59ac3cc5c08023f58b9cd6a5c447c4407cede6bc" +uuid = "be115224-59cd-429b-ad48-344e309966f0" +version = "0.1.4" + +[[deps.MKL_jll]] +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] +git-tree-sha1 = "e595b205efd49508358f7dc670a940c790204629" +uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" +version = "2022.0.0+0" + +[[deps.MLJModelInterface]] +deps = ["Random", "ScientificTypesBase", "StatisticalTraits"] +git-tree-sha1 = "16fa7c2e14aa5b3854bc77ab5f1dbe2cdc488903" +uuid = "e80e1ace-859a-464e-9ed9-23947d8ae3ea" +version = "1.6.0" + +[[deps.MacroTools]] +deps = ["Markdown", "Random"] +git-tree-sha1 = "3d3e902b31198a27340d0bf00d6ac452866021cf" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.9" + +[[deps.MappedArrays]] +git-tree-sha1 = "e8b359ef06ec72e8c030463fe02efe5527ee5142" +uuid = "dbb5928d-eab1-5f90-85c2-b9b0edb7c900" +version = "0.4.1" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[deps.MbedTLS]] +deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "Random", "Sockets"] +git-tree-sha1 = "d9ab10da9de748859a7780338e1d6566993d1f25" +uuid = "739be429-bea8-5141-9913-cc70e7f3736d" +version = "1.1.3" + +[[deps.MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +version = "2.28.0+0" + +[[deps.Measures]] +git-tree-sha1 = "e498ddeee6f9fdb4551ce855a46f54dbd900245f" +uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" +version = "0.3.1" + +[[deps.MicroCollections]] +deps = ["BangBang", "InitialValues", "Setfield"] +git-tree-sha1 = "6bb7786e4f24d44b4e29df03c69add1b63d88f01" +uuid = "128add7d-3638-4c79-886c-908ea0c25c34" +version = "0.1.2" + +[[deps.Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "bf210ce90b6c9eed32d25dbcae1ebc565df2687f" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "1.0.2" + +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[deps.MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" +version = "2022.2.1" + +[[deps.MultivariateStats]] +deps = ["Arpack", "LinearAlgebra", "SparseArrays", "Statistics", "StatsBase"] +git-tree-sha1 = "6d019f5a0465522bbfdd68ecfad7f86b535d6935" +uuid = "6f286f6a-111f-5878-ab1e-185364afe411" +version = "0.9.0" + +[[deps.NNlib]] +deps = ["Adapt", "ChainRulesCore", "LinearAlgebra", "Pkg", "Requires", "Statistics"] +git-tree-sha1 = "415108fd88d6f55cedf7ee940c7d4b01fad85421" +uuid = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" +version = "0.8.9" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "a7c3d1da1189a1c2fe843a3bfa04d18d20eb3211" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.0.1" + +[[deps.NamedArrays]] +deps = ["Combinatorics", "DataStructures", "DelimitedFiles", "InvertedIndices", "LinearAlgebra", "Random", "Requires", "SparseArrays", "Statistics"] +git-tree-sha1 = "2fd5787125d1a93fbe30961bd841707b8a80d75b" +uuid = "86f7a689-2022-50b4-a561-43c23ac3c673" +version = "0.9.6" + +[[deps.NaturalSort]] +git-tree-sha1 = "eda490d06b9f7c00752ee81cfa451efe55521e21" +uuid = "c020b1a1-e9b0-503a-9c33-f039bfc54a85" +version = "1.0.0" + +[[deps.NearestNeighbors]] +deps = ["Distances", "StaticArrays"] +git-tree-sha1 = "0e353ed734b1747fc20cd4cba0edd9ac027eff6a" +uuid = "b8a86587-4115-5ab1-83bc-aa920d37bbce" +version = "0.4.11" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" +version = "1.2.0" + +[[deps.Observables]] +git-tree-sha1 = "dfd8d34871bc3ad08cd16026c1828e271d554db9" +uuid = "510215fc-4207-5dde-b226-833fc4488ee2" +version = "0.5.1" + +[[deps.OffsetArrays]] +deps = ["Adapt"] +git-tree-sha1 = "1ea784113a6aa054c5ebd95945fa5e52c2f378e7" +uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +version = "1.12.7" + +[[deps.Ogg_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "887579a3eb005446d514ab7aeac5d1d027658b8f" +uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" +version = "1.3.5+1" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.20+0" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+0" + +[[deps.OpenSSL_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e60321e3f2616584ff98f0a4f18d98ae6f89bbb3" +uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" +version = "1.1.17+0" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.5+0" + +[[deps.Opus_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "51a08fb14ec28da2ec7a927c4337e4332c2a4720" +uuid = "91d4177d-7536-5919-b921-800302f37372" +version = "1.3.2+0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.4.1" + +[[deps.PCRE_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b2a7af664e098055a7529ad1a900ded962bca488" +uuid = "2f80f16e-611a-54ab-bc61-aa92de5b98fc" +version = "8.44.0+0" + +[[deps.PDMats]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "cf494dca75a69712a72b80bc48f59dcf3dea63ec" +uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" +version = "0.11.16" + +[[deps.Parsers]] +deps = ["Dates"] +git-tree-sha1 = "0044b23da09b5608b4ecacb4e5e6c6332f833a7e" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "2.3.2" + +[[deps.Pixman_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "b4f5d02549a10e20780a24fce72bea96b6329e29" +uuid = "30392449-352a-5448-841d-b1acce4e97dc" +version = "0.40.1+0" + +[[deps.Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +version = "1.8.0" + +[[deps.PlotThemes]] +deps = ["PlotUtils", "Statistics"] +git-tree-sha1 = "8162b2f8547bc23876edd0c5181b27702ae58dce" +uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a" +version = "3.0.0" + +[[deps.PlotUtils]] +deps = ["ColorSchemes", "Colors", "Dates", "Printf", "Random", "Reexport", "Statistics"] +git-tree-sha1 = "9888e59493658e476d3073f1ce24348bdc086660" +uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" +version = "1.3.0" + +[[deps.Plots]] +deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "GeometryBasics", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs", "UnicodeFun", "Unzip"] +git-tree-sha1 = "a19652399f43938413340b2068e11e55caa46b65" +uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" +version = "1.31.7" + +[[deps.PlutoUI]] +deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "Markdown", "Random", "Reexport", "UUIDs"] +git-tree-sha1 = "8d1f54886b9037091edf146b517989fc4a09efec" +uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" +version = "0.7.39" + +[[deps.PooledArrays]] +deps = ["DataAPI", "Future"] +git-tree-sha1 = "a6062fe4063cdafe78f4a0a81cfffb89721b30e7" +uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" +version = "1.4.2" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.3.0" + +[[deps.PrettyTables]] +deps = ["Crayons", "Formatting", "Markdown", "Reexport", "Tables"] +git-tree-sha1 = "dfb54c4e414caa595a1f2ed759b160f5a3ddcba5" +uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" +version = "1.3.1" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[deps.ProgressLogging]] +deps = ["Logging", "SHA", "UUIDs"] +git-tree-sha1 = "80d919dee55b9c50e8d9e2da5eeafff3fe58b539" +uuid = "33c8b6b6-d38a-422a-b730-caa89a2f386c" +version = "0.1.4" + +[[deps.ProgressMeter]] +deps = ["Distributed", "Printf"] +git-tree-sha1 = "d7a7aef8f8f2d537104f170139553b14dfe39fe9" +uuid = "92933f4c-e287-5a05-a399-4b506db050ca" +version = "1.7.2" + +[[deps.Qt5Base_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "xkbcommon_jll"] +git-tree-sha1 = "c6c0f690d0cc7caddb74cef7aa847b824a16b256" +uuid = "ea2cea3b-5b76-57ae-a6ef-0a8af62496e1" +version = "5.15.3+1" + +[[deps.QuadGK]] +deps = ["DataStructures", "LinearAlgebra"] +git-tree-sha1 = "78aadffb3efd2155af139781b8a8df1ef279ea39" +uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" +version = "2.4.2" + +[[deps.REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[deps.Random]] +deps = ["SHA", "Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[deps.RangeArrays]] +git-tree-sha1 = "b9039e93773ddcfc828f12aadf7115b4b4d225f5" +uuid = "b3c3ace0-ae52-54e7-9d0b-2c1406fd6b9d" +version = "0.3.2" + +[[deps.Ratios]] +deps = ["Requires"] +git-tree-sha1 = "dc84268fe0e3335a62e315a3a7cf2afa7178a734" +uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439" +version = "0.4.3" + +[[deps.RealDot]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" +uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" +version = "0.1.0" + +[[deps.RecipesBase]] +git-tree-sha1 = "6bf3f380ff52ce0832ddd3a2a7b9538ed1bcca7d" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.2.1" + +[[deps.RecipesPipeline]] +deps = ["Dates", "NaNMath", "PlotUtils", "RecipesBase"] +git-tree-sha1 = "e7eac76a958f8664f2718508435d058168c7953d" +uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" +version = "0.6.3" + +[[deps.RecursiveArrayTools]] +deps = ["Adapt", "ArrayInterfaceCore", "ArrayInterfaceStaticArraysCore", "ChainRulesCore", "DocStringExtensions", "FillArrays", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "StaticArraysCore", "Statistics", "Tables", "ZygoteRules"] +git-tree-sha1 = "3004608dc42101a944e44c1c68b599fa7c669080" +uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" +version = "2.32.0" + +[[deps.Reexport]] +git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.2.2" + +[[deps.RelocatableFolders]] +deps = ["SHA", "Scratch"] +git-tree-sha1 = "22c5201127d7b243b9ee1de3b43c408879dff60f" +uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" +version = "0.3.0" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.0" + +[[deps.Rmath]] +deps = ["Random", "Rmath_jll"] +git-tree-sha1 = "bf3188feca147ce108c76ad82c2792c57abe7b1f" +uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" +version = "0.7.0" + +[[deps.Rmath_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "68db32dff12bb6127bac73c209881191bf0efbb7" +uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" +version = "0.3.0+0" + +[[deps.Roots]] +deps = ["CommonSolve", "Printf", "Setfield"] +git-tree-sha1 = "50f945fb7d7fdece03bbc76ff1ab96170f64a892" +uuid = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" +version = "2.0.2" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.SciMLBase]] +deps = ["ArrayInterfaceCore", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "RecipesBase", "RecursiveArrayTools", "StaticArraysCore", "Statistics", "Tables"] +git-tree-sha1 = "f1bc477b771a75178da44adb252fdc70b4b22e24" +uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" +version = "1.50.1" + +[[deps.ScientificTypesBase]] +git-tree-sha1 = "a8e18eb383b5ecf1b5e6fc237eb39255044fd92b" +uuid = "30f210dd-8aff-4c5f-94ba-8e64358c1161" +version = "3.0.0" + +[[deps.Scratch]] +deps = ["Dates"] +git-tree-sha1 = "f94f779c94e58bf9ea243e77a37e16d9de9126bd" +uuid = "6c6a2e73-6563-6170-7368-637461726353" +version = "1.1.1" + +[[deps.SentinelArrays]] +deps = ["Dates", "Random"] +git-tree-sha1 = "db8481cf5d6278a121184809e9eb1628943c7704" +uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" +version = "1.3.13" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[deps.Setfield]] +deps = ["ConstructionBase", "Future", "MacroTools", "Requires"] +git-tree-sha1 = "38d88503f695eb0301479bc9b0d4320b378bafe5" +uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" +version = "0.8.2" + +[[deps.SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[deps.ShiftedArrays]] +git-tree-sha1 = "22395afdcf37d6709a5a0766cc4a5ca52cb85ea0" +uuid = "1277b4bf-5013-50f5-be3d-901d8477a67a" +version = "1.0.0" + +[[deps.Showoff]] +deps = ["Dates", "Grisu"] +git-tree-sha1 = "91eddf657aca81df9ae6ceb20b959ae5653ad1de" +uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f" +version = "1.0.3" + +[[deps.SimpleBufferStream]] +git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1" +uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" +version = "1.1.0" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[deps.SortingAlgorithms]] +deps = ["DataStructures"] +git-tree-sha1 = "b3363d7460f7d098ca0912c69b082f75625d7508" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "1.0.1" + +[[deps.SparseArrays]] +deps = ["LinearAlgebra", "Random"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + +[[deps.SpecialFunctions]] +deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "d75bda01f8c31ebb72df80a46c88b25d1c79c56d" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.1.7" + +[[deps.SplittablesBase]] +deps = ["Setfield", "Test"] +git-tree-sha1 = "39c9f91521de844bad65049efd4f9223e7ed43f9" +uuid = "171d559e-b47b-412a-8079-5efa626c420e" +version = "0.1.14" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "Random", "StaticArraysCore", "Statistics"] +git-tree-sha1 = "2d4e51cfad63d2d34acde558027acbc66700349b" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.5.3" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "d7021266223876ca197deb1897ceeda0e29e7dfd" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.2.0" + +[[deps.StatisticalTraits]] +deps = ["ScientificTypesBase"] +git-tree-sha1 = "30b9236691858e13f167ce829490a68e1a597782" +uuid = "64bff920-2084-43da-a3e6-9bb72801c0c9" +version = "3.2.0" + +[[deps.Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.StatsAPI]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "f9af7f195fb13589dd2e2d57fdb401717d2eb1f6" +uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +version = "1.5.0" + +[[deps.StatsBase]] +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "d1bf48bfcc554a3761a133fe3a9bb01488e06916" +uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +version = "0.33.21" + +[[deps.StatsFuns]] +deps = ["ChainRulesCore", "HypergeometricFunctions", "InverseFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] +git-tree-sha1 = "5783b877201a82fc0014cbf381e7e6eb130473a4" +uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" +version = "1.0.1" + +[[deps.StatsModels]] +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "Printf", "REPL", "ShiftedArrays", "SparseArrays", "StatsBase", "StatsFuns", "Tables"] +git-tree-sha1 = "f8ba54b202c77622a713e25e7616d618308b34d3" +uuid = "3eaba693-59b7-5ba5-a881-562e759f1c8d" +version = "0.6.31" + +[[deps.StatsPlots]] +deps = ["AbstractFFTs", "Clustering", "DataStructures", "DataValues", "Distributions", "Interpolations", "KernelDensity", "LinearAlgebra", "MultivariateStats", "Observables", "Plots", "RecipesBase", "RecipesPipeline", "Reexport", "StatsBase", "TableOperations", "Tables", "Widgets"] +git-tree-sha1 = "2b35ba790f1f823872dcf378a6d3c3b520092eac" +uuid = "f3b207a7-027a-5e70-b257-86293d7955fd" +version = "0.15.1" + +[[deps.StructArrays]] +deps = ["Adapt", "DataAPI", "StaticArraysCore", "Tables"] +git-tree-sha1 = "8c6ac65ec9ab781af05b08ff305ddc727c25f680" +uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +version = "0.6.12" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.0" + +[[deps.TableOperations]] +deps = ["SentinelArrays", "Tables", "Test"] +git-tree-sha1 = "e383c87cf2a1dc41fa30c093b2a19877c83e1bc1" +uuid = "ab02a1b2-a7df-11e8-156e-fb1833f50b87" +version = "1.2.0" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits", "Test"] +git-tree-sha1 = "5ce79ce186cc678bbb5c5681ca3379d1ddae11a1" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.7.0" + +[[deps.Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" +version = "1.10.0" + +[[deps.TensorCore]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" +uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" +version = "0.1.1" + +[[deps.TerminalLoggers]] +deps = ["LeftChildRightSiblingTrees", "Logging", "Markdown", "Printf", "ProgressLogging", "UUIDs"] +git-tree-sha1 = "62846a48a6cd70e63aa29944b8c4ef704360d72f" +uuid = "5d786b92-1e48-4d6f-9151-6b4477ca9bed" +version = "0.1.5" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.Tracker]] +deps = ["Adapt", "DiffRules", "ForwardDiff", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NNlib", "NaNMath", "Printf", "Random", "Requires", "SpecialFunctions", "Statistics"] +git-tree-sha1 = "0874c1b5de1b5529b776cfeca3ec0acfada97b1b" +uuid = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" +version = "0.2.20" + +[[deps.TranscodingStreams]] +deps = ["Random", "Test"] +git-tree-sha1 = "4ad90ab2bbfdddcae329cba59dab4a8cdfac3832" +uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +version = "0.9.7" + +[[deps.Transducers]] +deps = ["Adapt", "ArgCheck", "BangBang", "Baselet", "CompositionsBase", "DefineSingletons", "Distributed", "InitialValues", "Logging", "Markdown", "MicroCollections", "Requires", "Setfield", "SplittablesBase", "Tables"] +git-tree-sha1 = "c76399a3bbe6f5a88faa33c8f8a65aa631d95013" +uuid = "28d57a85-8fef-5791-bfe6-a80928e7c999" +version = "0.4.73" + +[[deps.Tricks]] +git-tree-sha1 = "6bac775f2d42a611cdfcd1fb217ee719630c4175" +uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" +version = "0.1.6" + +[[deps.Turing]] +deps = ["AbstractMCMC", "AdvancedHMC", "AdvancedMH", "AdvancedPS", "AdvancedVI", "BangBang", "Bijectors", "DataStructures", "DiffResults", "Distributions", "DistributionsAD", "DocStringExtensions", "DynamicPPL", "EllipticalSliceSampling", "ForwardDiff", "Libtask", "LinearAlgebra", "MCMCChains", "NamedArrays", "Printf", "Random", "Reexport", "Requires", "SciMLBase", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Tracker", "ZygoteRules"] +git-tree-sha1 = "c43c5b5e2c6dcebee8705c25dbf22f4411e992ab" +uuid = "fce5fe82-541a-59a6-adf8-730c64b5f9a0" +version = "0.21.10" + +[[deps.URIs]] +git-tree-sha1 = "e59ecc5a41b000fa94423a578d29290c7266fc10" +uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" +version = "1.4.0" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[deps.UnPack]] +git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" +uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" +version = "1.0.2" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[deps.UnicodeFun]] +deps = ["REPL"] +git-tree-sha1 = "53915e50200959667e78a92a418594b428dffddf" +uuid = "1cfade01-22cf-5700-b092-accc4b62d6e1" +version = "0.4.1" + +[[deps.Unzip]] +git-tree-sha1 = "34db80951901073501137bdbc3d5a8e7bbd06670" +uuid = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" +version = "0.1.2" + +[[deps.Wayland_jll]] +deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "3e61f0b86f90dacb0bc0e73a0c5a83f6a8636e23" +uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" +version = "1.19.0+0" + +[[deps.Wayland_protocols_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4528479aa01ee1b3b4cd0e6faef0e04cf16466da" +uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91" +version = "1.25.0+0" + +[[deps.WeakRefStrings]] +deps = ["DataAPI", "InlineStrings", "Parsers"] +git-tree-sha1 = "b1be2855ed9ed8eac54e5caff2afcdb442d52c23" +uuid = "ea10d353-3f73-51f8-a26c-33c1cb351aa5" +version = "1.4.2" + +[[deps.Widgets]] +deps = ["Colors", "Dates", "Observables", "OrderedCollections"] +git-tree-sha1 = "fcdae142c1cfc7d89de2d11e08721d0f2f86c98a" +uuid = "cc8bc4a8-27d6-5769-a93b-9d913e69aa62" +version = "0.6.6" + +[[deps.WoodburyMatrices]] +deps = ["LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "de67fa59e33ad156a590055375a30b23c40299d3" +uuid = "efce3f68-66dc-5838-9240-27a6d6f5f9b6" +version = "0.5.5" + +[[deps.XML2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "58443b63fb7e465a8a7210828c91c08b92132dff" +uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" +version = "2.9.14+0" + +[[deps.XSLT_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"] +git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" +uuid = "aed1982a-8fda-507f-9586-7b0439959a61" +version = "1.1.34+0" + +[[deps.Xorg_libX11_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] +git-tree-sha1 = "5be649d550f3f4b95308bf0183b82e2582876527" +uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" +version = "1.6.9+4" + +[[deps.Xorg_libXau_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4e490d5c960c314f33885790ed410ff3a94ce67e" +uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" +version = "1.0.9+4" + +[[deps.Xorg_libXcursor_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "12e0eb3bc634fa2080c1c37fccf56f7c22989afd" +uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" +version = "1.2.0+4" + +[[deps.Xorg_libXdmcp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4fe47bd2247248125c428978740e18a681372dd4" +uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" +version = "1.1.3+4" + +[[deps.Xorg_libXext_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "b7c0aa8c376b31e4852b360222848637f481f8c3" +uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" +version = "1.3.4+4" + +[[deps.Xorg_libXfixes_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "0e0dc7431e7a0587559f9294aeec269471c991a4" +uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" +version = "5.0.3+4" + +[[deps.Xorg_libXi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] +git-tree-sha1 = "89b52bc2160aadc84d707093930ef0bffa641246" +uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" +version = "1.7.10+4" + +[[deps.Xorg_libXinerama_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll"] +git-tree-sha1 = "26be8b1c342929259317d8b9f7b53bf2bb73b123" +uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" +version = "1.1.4+4" + +[[deps.Xorg_libXrandr_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "34cea83cb726fb58f325887bf0612c6b3fb17631" +uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" +version = "1.5.2+4" + +[[deps.Xorg_libXrender_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "19560f30fd49f4d4efbe7002a1037f8c43d43b96" +uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" +version = "0.9.10+4" + +[[deps.Xorg_libpthread_stubs_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "6783737e45d3c59a4a4c4091f5f88cdcf0908cbb" +uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" +version = "0.1.0+3" + +[[deps.Xorg_libxcb_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] +git-tree-sha1 = "daf17f441228e7a3833846cd048892861cff16d6" +uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" +version = "1.13.0+3" + +[[deps.Xorg_libxkbfile_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "926af861744212db0eb001d9e40b5d16292080b2" +uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" +version = "1.1.0+4" + +[[deps.Xorg_xcb_util_image_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "0fab0a40349ba1cba2c1da699243396ff8e94b97" +uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll"] +git-tree-sha1 = "e7fd7b2881fa2eaa72717420894d3938177862d1" +uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_keysyms_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "d1151e2c45a544f32441a567d1690e701ec89b00" +uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_renderutil_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "dfd7a8f38d4613b6a575253b3174dd991ca6183e" +uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e" +version = "0.3.9+1" + +[[deps.Xorg_xcb_util_wm_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "e78d10aab01a4a154142c5006ed44fd9e8e31b67" +uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361" +version = "0.4.1+1" + +[[deps.Xorg_xkbcomp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxkbfile_jll"] +git-tree-sha1 = "4bcbf660f6c2e714f87e960a171b119d06ee163b" +uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" +version = "1.4.2+4" + +[[deps.Xorg_xkeyboard_config_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xkbcomp_jll"] +git-tree-sha1 = "5c8424f8a67c3f2209646d4425f3d415fee5931d" +uuid = "33bec58e-1273-512f-9401-5d533626f822" +version = "2.27.0+4" + +[[deps.Xorg_xtrans_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "79c31e7844f6ecf779705fbc12146eb190b7d845" +uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" +version = "1.4.0+3" + +[[deps.Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.12+3" + +[[deps.Zstd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e45044cd873ded54b6a5bac0eb5c971392cf1927" +uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" +version = "1.5.2+0" + +[[deps.ZygoteRules]] +deps = ["MacroTools"] +git-tree-sha1 = "8c1a8e4dfacb1fd631745552c8db35d0deb09ea0" +uuid = "700de1a5-db45-46bc-99cf-38207098b444" +version = "0.2.2" + +[[deps.libaom_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3a2ea60308f0996d26f1e5354e10c24e9ef905d4" +uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" +version = "3.4.0+0" + +[[deps.libass_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "5982a94fcba20f02f42ace44b9894ee2b140fe47" +uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" +version = "0.15.1+0" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.1.1+0" + +[[deps.libfdk_aac_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "daacc84a041563f965be61859a36e17c4e4fcd55" +uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" +version = "2.0.2+0" + +[[deps.libpng_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "94d180a6d2b5e55e447e2d27a29ed04fe79eb30c" +uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" +version = "1.6.38+0" + +[[deps.libvorbis_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll", "Pkg"] +git-tree-sha1 = "b910cb81ef3fe6e78bf6acee440bda86fd6ae00c" +uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" +version = "1.3.7+1" + +[[deps.nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" +version = "1.48.0+0" + +[[deps.p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "17.4.0+0" + +[[deps.x264_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4fea590b89e6ec504593146bf8b988b2c00922b2" +uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a" +version = "2021.5.5+0" + +[[deps.x265_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "ee567a171cce03570d77ad3a43e90218e38937a9" +uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" +version = "3.5.0+0" + +[[deps.xkbcommon_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll", "Wayland_protocols_jll", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] +git-tree-sha1 = "9ebfc140cc56e8c2156a15ceac2f0302e327ac0a" +uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" +version = "1.4.1+0" +""" + +# ╔═╡ Cell order: +# ╟─88154488-233d-11ed-1072-3dc0dd25d3fd +# ╟─623efa9d-485d-4d9c-8e6d-aedb7dcbc00d +# ╟─0e52bc27-41e9-4361-a036-77eee3774e46 +# ╟─73c61d37-9c26-43b7-ae99-9a79c6fe9804 +# ╟─5d01251e-5ea2-4d2c-82c8-d9c576264887 +# ╟─8b8471cd-6a77-4d8a-bbd9-ee28e0aab1f6 +# ╟─ad45d197-0bae-4145-92b9-3b28064a692c +# ╠═52431ba0-762b-42d4-ab91-148998c90600 +# ╟─b2e26c07-43ad-47c1-a157-2368fbe5c707 +# ╟─e925ca4b-45c2-48fe-9d94-c34c15583a51 +# ╟─39f3b1c0-e8bd-4d11-99ea-af9d74c7d77e +# ╠═b2e54b06-91ad-4cb2-b398-fd7926f8c387 +# ╟─f39d0bab-3ce6-44c4-9fe0-77438884852a +# ╟─0475637e-d092-472d-82f4-fac65f34024e +# ╟─3b02812e-bd5f-47d2-89e2-3deb6f243562 +# ╠═89a55d82-d5a9-40cd-9247-9d5355d4fd7c +# ╟─a422af52-c350-45a0-a886-59a8e71b62ba +# ╠═ec93d30f-9d57-4598-8f64-ca706c4f0160 +# ╠═d4f7d14c-2710-4d6c-869f-3c0ab75d3d51 +# ╟─b6aa0ffe-c51f-4279-94b2-13c37797acf1 +# ╟─eac559ce-b05f-4b91-84b8-ed1f57a53c66 +# ╠═47cafa8d-6eb9-40c8-a9a7-56c9e7909c3d +# ╟─8af86af4-5144-4c36-b185-1c91189c9061 +# ╠═fbb41799-8ce2-4286-be48-b6977930b6be +# ╠═03064a4c-6445-446a-a4b5-f50d7d2332d5 +# ╠═44fa5546-4abb-4e0b-bde3-d444aa912377 +# ╟─7fe35625-4796-4240-bcdd-03aef6ade093 +# ╠═1a949d5a-2795-4974-8ae9-83a4e3c7fc90 +# ╠═fd583678-f289-4075-9dee-8bdd334ce17f +# ╟─6456936d-423e-4c56-931e-15e23fcbd82d +# ╠═6ea6d1a1-fde0-4eb8-aa4c-a99a4f6a22e2 +# ╟─7a7a5641-2462-46fb-8ab0-5a76788af289 +# ╟─79a32094-2dd4-484f-b91f-b5f9d99cc4bd +# ╟─b4227421-2b35-467f-b11f-f2425b12c9b9 +# ╠═4ab38b80-0bae-4ea5-a109-3a88556daac5 +# ╟─6ae3eb45-9577-4bfe-8363-0b3c47bd0421 +# ╠═9d2d1c39-6c64-4deb-a2ef-dbbfbfd88323 +# ╟─00000000-0000-0000-0000-000000000001 +# ╟─00000000-0000-0000-0000-000000000002