diff --git a/mlss/Bayesian Machine Learning.jl b/mlss/Bayesian Machine Learning.jl index 64ac61a..d97d50f 100644 --- a/mlss/Bayesian Machine Learning.jl +++ b/mlss/Bayesian Machine Learning.jl @@ -31,7 +31,7 @@ using BmlipTeachingTools using MarkdownLiteral: @mdx # ╔═╡ 3f8fd1c3-202e-45a6-ab03-5229863db297 -using Distributions, Random, ExponentialFamily, LinearAlgebra, LogExpFunctions, StatsFuns, BayesBase, Optim, SpecialFunctions +using Distributions, Random, ExponentialFamily, LinearAlgebra, LogExpFunctions, StatsFuns, BayesBase, Optim, SpecialFunctions, StableRNGs, Printf # ╔═╡ 3987d441-b9c8-4bb1-8b2d-0cc78d78819e using Plots, StatsPlots, LaTeXStrings, Plots.PlotMeasures @@ -51,7 +51,6 @@ md""" ##### Problem We observe the following sequence of heads (outcome ``=1``) and tails (outcome ``=0``) when tossing the same coin repeatedly. -Number of tosses: $(@bind intro_N Slider(1:20; default=7, show_value=true)) """ # ╔═╡ daa1df0e-4ec5-4fb1-a355-a42c35bd35b9 @@ -621,18 +620,10 @@ The above integral computes the mean of a beta distribution, which is given by ` """ -# ╔═╡ 5483148f-b385-4afa-ad85-70efe08ba299 -TODO("below should incorporate the slider again and execute the predictions for both models.") - -# ╔═╡ 6a2a0f18-d294-11ef-02c2-ef117377ca66 +# ╔═╡ 95a3e1f8-2ff5-4168-9988-b033fe35a751 md""" -Finally, we're ready to solve our challenge: for ``D=\{1011001\}`` and uniform prior (``\alpha=\beta=1``), we get - -```math - p(x_\bullet=1|D)=\frac{n+1}{N+2} = \frac{4+1}{7+2} = \frac{5}{9} -``` - -In other words, given the model assumptions (the Bernoulli data-generating distribution and Beta prior as specified above), and the observations ``D=\{1011001\}``, the probability for observing heads (outcome=``1``) on the next toss is ``\frac{5}{9}``. +#### Different priors +If, instead of a _uniform prior_, we use our priors ``m_1`` and ``m_2``, we get: """ @@ -769,6 +760,9 @@ md""" Below, we plot ``40`` candidate functions, where each candidate corresponds to a draw from the posterior distribution ``p(w|D)``. """ +# ╔═╡ 74640c85-8589-4121-8fdf-d71cb29532b8 +N_bond + # ╔═╡ 679ef9d1-cc1c-4fc1-bf82-caa967c196c2 example("Bayesian Logistic Regression (Classification)",header_level=2) @@ -835,15 +829,6 @@ md""" # ╔═╡ 9da43d0f-e605-41b7-9bc6-db5be95bc87f secret_distribution = Bernoulli(0.4); -# ╔═╡ b791e819-f5a0-4c44-983b-07d8497516fb -@mdx """ - -```math -D=\\{$(Int.(rand(MersenneTwister(234), secret_distribution, intro_N)))\\}\\,. -``` - -""" - # ╔═╡ e47b6eb6-2bb3-4c2d-bda6-f1535f2f94c4 priors = [ Beta(100., 500.), @@ -851,20 +836,10 @@ priors = [ ]; # ╔═╡ d1d2bb84-7083-435a-9c19-4c02074143e3 -n_tosses = 500; - -# ╔═╡ d484c41d-9834-4528-bf47-93ab4e35ebaa -md""" -Select iteration: $(@bind toss_index_1 Slider(0:n_tosses; show_value=true)) -""" -# ╔═╡ ebcfcd1b-7fc8-42b7-a35e-4530f798cfdf -md""" -Select iteration: $(@bind toss_index_2 Slider(1:n_tosses; show_value=true)) -""" # ╔═╡ 9c751f8e-f7ed-464f-b63c-41e318bbff2d -samples = rand(secret_distribution, n_tosses) +precomputed_tosses = rand(StableRNG(234), secret_distribution, 500) # ╔═╡ e99e7650-bb72-4576-8f2a-c3994533b644 function handle_coin_toss(prior::Beta, observation::Bool) @@ -898,7 +873,7 @@ begin # for every sample we want to update our posterior - for (N, sample) in enumerate(samples) + for (N, sample) in enumerate(precomputed_tosses) # at every sample we want to update all distributions for (i, prior) in enumerate(prior_distributions) @@ -907,9 +882,9 @@ begin # add posterior to vector of posterior distributions push!(posterior_distributions[i], posterior) - + # compute log evidence and add to vector - log_evidence = log_evidence_prior(posterior_distributions[i][N], N, sum(samples[1:N])) + log_evidence = log_evidence_prior(prior, N, sum(@view(precomputed_tosses[1:N]))) push!(log_evidences[i], log_evidence) # the prior for the next sample is the posterior from the current sample @@ -918,26 +893,6 @@ begin end end; -# ╔═╡ 6a2b1106-d294-11ef-0d64-dbc26ba3eb44 -# Animate posterior distributions over time in a gif - -let i = toss_index_1 - p = plot() - for (j,post) in enumerate(posterior_distributions) - plot!(post[i+1], xlims = (0, 1), fill=(0, .2,), label="Posterior model $j", linewidth=2, ylims=(0,28), xlabel="μ", legend=:topright) - end - vline!([mean(secret_distribution)]; style=:dash, color="purple", label="True parameter") -end - -# ╔═╡ 188b5bea-6765-4dcf-9369-3b1fdbe94494 -let i = toss_index_2 - evidences = map(model -> exp.(model), log_evidences) - - plot(ylims=(0, 1), legend=:topleft) - total = sum(e[i] for e in evidences) - bar!([(e[i] / total) for e in evidences], group=["Model $i" for i in eachindex(priors)]) -end - # ╔═╡ 3437b7a6-56f3-4cfa-bec1-d5b39612d9d0 md""" ### Bayesian Linear regression code @@ -956,10 +911,10 @@ const deterministic_randomness = MersenneTwister σ_w_prior² = σ_w_prior^2 # ╔═╡ b4ba2dfd-13af-4e2c-a3a6-e3b92756c03b -μ_basis = range(0.0, 1.0; length=10); +const μ_basis = range(0.0, 1.0; length=10); # ╔═╡ b8b5601b-72e3-431d-b23a-e91936205320 -σ_basis² = 0.01; +const σ_basis² = 0.01; # ╔═╡ 77c16302-e429-465f-80e7-6f9253c28607 D = let @@ -1045,6 +1000,150 @@ let plot_data!(D) end +# ╔═╡ d1521061-211f-49fc-9463-82f01c79e2f6 + + +# ╔═╡ 5ca4e81f-4a63-472e-bb9e-7b8200de579a +md""" +## 🪙 Coin toss sample controls +""" + +# ╔═╡ 8c91dcc3-32e2-4c09-aea1-af8ce5c805dc +N_tosses_bond = @bind N_tosses Slider([1:50..., 100:50:500...]; default=7, show_value=true); + +# ╔═╡ 6a2b1106-d294-11ef-0d64-dbc26ba3eb44 +# Animate posterior distributions over time in a gif + +let i = N_tosses + p = plot() + for (j,post) in enumerate(posterior_distributions) + plot!(post[i+1], xlims = (0, 1), fill=(0, .2,), label="Posterior model $j", linewidth=2, ylims=(0,28), xlabel="μ", legend=:topright) + end + vline!([mean(secret_distribution)]; style=:dash, color="purple", label="True parameter") +end + +# ╔═╡ 188b5bea-6765-4dcf-9369-3b1fdbe94494 +let i = N_tosses + evidences = map(model -> exp.(model), log_evidences) + + plot(ylims=(0, 1), legend=:topleft, title="Relative Bayesian Evidence") + total = sum(e[i] for e in evidences) + bar!([(e[i] / total) for e in evidences], group=["Model $i" for i in eachindex(priors)]) +end + +# ╔═╡ 11cd5f2e-d64b-440a-bf88-6f7e09e5377c +tosses = precomputed_tosses[1:N_tosses] + +# ╔═╡ 6a2a0f18-d294-11ef-02c2-ef117377ca66 +let + n = sum(tosses) + N = N_tosses + @mdx(""" + Finally, we're ready to solve our challenge: for the generated ``D`` and **uniform prior** (``\\alpha=\\beta=1``), we get + + ```math + p(x_\\bullet=1|D)=\\frac{n+1}{N+2} = \\frac{$n+1}{$N+2} = \\frac{$(n+1)}{$(N+2)} \\approx $(@sprintf("%.3f", (n+1)/(N+2))) + ``` + + In other words, given the model assumptions (the Bernoulli data-generating distribution and Beta prior as specified above), and the observations ``D``, the probability for observing heads (outcome=``1``) on the next toss is ``\\frac{$(n+1)}{$(N+2)}``. + + """) +end + +# ╔═╡ cb2d4c88-cc9c-4e56-8939-e0d2a4c9d1c3 +let + n = sum(tosses) + N = N_tosses + @mdx(""" + + ```math + \\begin{align} + p(x_\\bullet=1|D,m_1) &= \\frac{n+100}{N+100+500} &\\approx $(@sprintf("%.3f", (n+100)/(N+100+500))) \\\\[.6em] + + + p(x_\\bullet=1|D,m_2) &= \\frac{n+8}{N+8+13} &\\approx $(@sprintf("%.3f", (n+8)/(N+8+13))) + \\end{align} + ``` + + + """) +end + +# ╔═╡ 26369851-1d00-4f48-9e64-6b576af61066 +tosses_latex = @mdx """ + +```math +D=\\{$(Int.(tosses))\\}\\,. +``` + +"""; + +# ╔═╡ 280c69a5-b7a4-400f-a810-3b846ff27ec2 +# a simpler (less pretty) display that can automatically wrap when the line gets too long +tosses_html = """ +D = {$(join(Int.(tosses), " "))}. + +""" |> HTML; + +# ╔═╡ 0a81b382-b01b-459a-8955-9ec8640a57d1 +D_sample_controls = PlutoUI.ExperimentalLayout.Div( + [ + @htl("

🪙 Generate a sample

"), + PlutoUI.ExperimentalLayout.Div( + [ + PlutoUI.ExperimentalLayout.Div( + [ + N_tosses_bond, + + ]; + style=""" + flex: 0 0 auto; + """ + ), + PlutoUI.ExperimentalLayout.Div( + [ + N_tosses >= 50 ? tosses_html : tosses_latex + ]; + style="""" + display: flex; + width: 300px; + height: 50px; + overflow: hidden; + /* Make the font-size smaller when the number of tosses increases, to make sure everything is visible. */ + font-size: $(1.2 * 300 / clamp(N_tosses, 25, 100))px; + """) + + ]; + style=""" + display: flex; + flex-direction: row; + gap: 1em; + align-items: center; + justify-content: space-evenly; + """ + ) + ]; + style=""" + padding: 1em; + background: #efbaab33; + border-radius: 1em; + + + """ +) + +# ╔═╡ 49879bbf-ab9a-4bf0-b174-0a5be6eb0005 +D_sample_controls + +# ╔═╡ ab5a9411-972b-46b6-900e-839ba70a98b4 +D_sample_controls + +# ╔═╡ b596ea69-2b52-4755-9cbe-9062134b8c7e +D_sample_controls + +# ╔═╡ bd0058fe-3b38-49f5-af3c-c1e7678dd431 +D_sample_controls + # ╔═╡ 00000000-0000-0000-0000-000000000001 PLUTO_PROJECT_TOML_CONTENTS = """ [deps] @@ -1058,8 +1157,10 @@ LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688" MarkdownLiteral = "736d6165-7244-6769-4267-6b50796e6954" Optim = "429524aa-4258-5aef-a3af-852621145aeb" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" +Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" +StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" StatsFuns = "4c63d2b9-4356-54db-8cca-17b64c39e42c" StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd" @@ -1074,6 +1175,7 @@ MarkdownLiteral = "~0.1.2" Optim = "~1.13.2" Plots = "~1.40.20" SpecialFunctions = "~2.6.1" +StableRNGs = "~1.0.4" StatsFuns = "~1.5.0" StatsPlots = "~0.15.8" """ @@ -1082,9 +1184,9 @@ StatsPlots = "~0.15.8" PLUTO_MANIFEST_TOML_CONTENTS = """ # This file is machine-generated - editing it directly is not advised -julia_version = "1.12.1" +julia_version = "1.12.2" manifest_format = "2.0" -project_hash = "feb5a94a4ee0e9a6dd08087d77595a98fce8b9ae" +project_hash = "d6218eb2285bcc74f7281a3e9ef17dc9240f171b" [[deps.ADTypes]] git-tree-sha1 = "27cecae79e5cc9935255f90c53bb831cc3c870d7" @@ -1518,7 +1620,7 @@ version = "0.7.16" [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -version = "1.6.0" +version = "1.7.0" [[deps.EnumX]] git-tree-sha1 = "bddad79635af6aec424f53ed8aad5d7555dc6f00" @@ -1888,7 +1990,7 @@ version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.11.1+1" +version = "8.15.0+0" [[deps.LibGit2]] deps = ["LibGit2_jll", "NetworkOptions", "Printf", "SHA"] @@ -2107,7 +2209,7 @@ version = "1.5.0" [[deps.OpenSSL_jll]] deps = ["Artifacts", "Libdl"] uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "3.5.1+0" +version = "3.5.4+0" [[deps.OpenSpecFun_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] @@ -2424,9 +2526,9 @@ weakdeps = ["ChainRulesCore"] [[deps.StableRNGs]] deps = ["Random"] -git-tree-sha1 = "95af145932c2ed859b63329952ce8d633719f091" +git-tree-sha1 = "4f96c596b8c8258cc7d3b19797854d368f243ddc" uuid = "860ef19b-820b-49d6-a774-d7a799459cd3" -version = "1.0.3" +version = "1.0.4" [[deps.StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] @@ -2869,9 +2971,9 @@ uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e" version = "2022.0.0+1" [[deps.p7zip_jll]] -deps = ["Artifacts", "Libdl"] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.5.0+2" +version = "17.7.0+0" [[deps.x264_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -2897,7 +2999,7 @@ version = "1.9.2+0" # ╟─6be2e966-4048-44d0-a37e-95060e3fe30b # ╟─eca027f8-40c9-4e53-85b5-d08b8fe9dd97 # ╟─4f6a2d4f-bd89-4b0c-b544-397de2e34e72 -# ╟─b791e819-f5a0-4c44-983b-07d8497516fb +# ╟─49879bbf-ab9a-4bf0-b174-0a5be6eb0005 # ╟─daa1df0e-4ec5-4fb1-a355-a42c35bd35b9 # ╟─6a24b9e4-d294-11ef-3ead-9d272fbf89be # ╟─6a24c3e6-d294-11ef-3581-2755a9ba15ba @@ -2954,16 +3056,18 @@ version = "1.9.2+0" # ╟─b426df32-5629-4773-b862-101cfbd82d42 # ╟─181ade96-8e1e-4186-9227-c1561352529d # ╟─6a2af90a-d294-11ef-07bd-018326577791 -# ╟─d484c41d-9834-4528-bf47-93ab4e35ebaa +# ╟─ab5a9411-972b-46b6-900e-839ba70a98b4 # ╟─6a2b1106-d294-11ef-0d64-dbc26ba3eb44 # ╟─6a29d548-d294-11ef-1361-ad2230cad02b -# ╟─ebcfcd1b-7fc8-42b7-a35e-4530f798cfdf +# ╟─b596ea69-2b52-4755-9cbe-9062134b8c7e # ╟─188b5bea-6765-4dcf-9369-3b1fdbe94494 # ╟─6a29e25e-d294-11ef-15ce-5bf3d8cdb64c # ╟─6a29f1c2-d294-11ef-147f-877f99e5b57c # ╟─6a2a000e-d294-11ef-17d6-bdcddeedc65d -# ╠═5483148f-b385-4afa-ad85-70efe08ba299 +# ╟─bd0058fe-3b38-49f5-af3c-c1e7678dd431 # ╟─6a2a0f18-d294-11ef-02c2-ef117377ca66 +# ╟─95a3e1f8-2ff5-4168-9988-b033fe35a751 +# ╟─cb2d4c88-cc9c-4e56-8939-e0d2a4c9d1c3 # ╟─6a2a1daa-d294-11ef-2a67-9f2ac60a14c5 # ╟─6a2a2af2-d294-11ef-0072-bdc3c6f95bb3 # ╟─6a2a389e-d294-11ef-1b8c-b55de794b65c @@ -2983,6 +3087,7 @@ version = "1.9.2+0" # ╟─29d9d0e8-7af0-430f-9cce-3f83e9cccb7e # ╟─7ab2cbcd-55c1-480e-a611-10e783358d1d # ╟─1211336b-5fb0-415e-92a8-6ba2b061cb43 +# ╟─74640c85-8589-4121-8fdf-d71cb29532b8 # ╟─679ef9d1-cc1c-4fc1-bf82-caa967c196c2 # ╟─b5d0f64a-82bf-4fe3-a1c8-696d6ef29d11 # ╟─47842de0-d17e-460e-b3b7-b2e642569e25 @@ -3019,5 +3124,12 @@ version = "1.9.2+0" # ╠═cd1f1a99-0f28-4825-8e57-011550a3ae4b # ╠═a987582b-b4b3-4676-92ea-28ae4dc38f3f # ╠═e2b74ada-3dab-401f-aa44-a4ecda4d6496 +# ╟─d1521061-211f-49fc-9463-82f01c79e2f6 +# ╟─5ca4e81f-4a63-472e-bb9e-7b8200de579a +# ╠═8c91dcc3-32e2-4c09-aea1-af8ce5c805dc +# ╠═11cd5f2e-d64b-440a-bf88-6f7e09e5377c +# ╠═26369851-1d00-4f48-9e64-6b576af61066 +# ╠═280c69a5-b7a4-400f-a810-3b846ff27ec2 +# ╠═0a81b382-b01b-459a-8955-9ec8640a57d1 # ╟─00000000-0000-0000-0000-000000000001 # ╟─00000000-0000-0000-0000-000000000002 diff --git a/mlss/archive/Course Syllabus.jl b/mlss/archive/Course Syllabus.jl deleted file mode 100644 index 27aa976..0000000 --- a/mlss/archive/Course Syllabus.jl +++ /dev/null @@ -1,602 +0,0 @@ -### A Pluto.jl notebook ### -# v0.20.20 - -#> [frontmatter] -#> description = "Course Syllabus" -#> -#> [[frontmatter.author]] -#> name = "BMLIP" -#> url = "https://github.com/bmlip" - -using Markdown -using InteractiveUtils - -# ╔═╡ f96d047f-9efa-4889-8b4e-a8d96677d072 -using BmlipTeachingTools - -# ╔═╡ 0cfd4bc0-d294-11ef-3537-630954a9dd27 -title("5SSD0 Course Syllabus") - -# ╔═╡ 467c8189-b5d3-4eaf-8886-6ae53136dd8f -PlutoUI.TableOfContents() - -# ╔═╡ 0cffef7e-d294-11ef-3dd5-1fd862260b70 -md""" -## Learning Goals - -This course provides an introduction to Bayesian machine learning and information processing systems. The Bayesian approach affords a unified and consistent treatment of many useful information processing systems. - -Upon successful completion of the course, students should be able to: - - * understand the essence of the Bayesian approach to information processing. - * specify a solution to an information processing problem as a Bayesian inference task on a probabilistic model. - * design a probabilistic model by a specifying a likelihood function and prior distribution; - * Code the solution in a probabilistic programming package. - * execute the Bayesian inference task either analytically or approximately. - * evaluate the resulting solution by examination of Bayesian evidence. - * be aware of the properties of commonly used probability distribitions such as the Gaussian, Gamma and multinomial distribution; models such as hidden Markov models and Gaussian mixture models; and inference methods such as the Laplace approximation, variational Bayes and message passing in a factor graph. - -""" - -# ╔═╡ 0d013750-d294-11ef-333c-d9eb7578fab2 -md""" -## Entrance Requirements (pre-knowledge) - -Undergraduate courses in Linear Algebra and Probability Theory (or Statistics). - -Some scientific programming experience, eg in MATLAB or Python. In this class, we use the [Julia](https://julialang.org/) programming language, which has a similar syntax to MATLAB, but is (close to) as fast as C. - -""" - -# ╔═╡ 0d0142b6-d294-11ef-0297-e5bb923ad942 -md""" -## Important Links - -Please bookmark the following three websites: - -1. The course homepage [http://bmlip.nl](http://bmlip.nl) contains links to all materials, such as lecture notes and video lectures. -2. The [Piazza course site](https://piazza.com/tue.nl/winter2026/5ssd0/home) will be used for Q&A and communication. -3. The [Canvas course site](https://canvas.tue.nl/courses/33478) will be sparingly used for communication (mostly by ESA staff) - -""" - -# ╔═╡ 0d015ab4-d294-11ef-2e53-5339062c435c -md""" -## Materials - -All materials can be accessed from the [course homepage](http://bmlip.nl). The materials consist of the following resources: - -##### Mandatory materials for the exam - - * Lecture notes - * Probabilistic Programming (PP) notes - * The lecture notes and probabilistic programming notes contain the mandatory materials. Some lecture notes are extended by a reading assignment, see the first cell ("Preliminaries") in the lecture notes. These reading assignments are also part of the mandatory materials. - -##### Optional materials to help understand the lectures and PP notes - - * video recordings of the Q2-2023/24 lecture series - * Q&A at Piazza - * practice exams - * In the lecture notes, slides that are not required for the exam are moved to the end of the notes in the **Optional Slides** section. - - -Source materials are available at GitHub repo at [https://github.com/bmlip/course](https://github.com/bmlip/course). If you spot an error in the materials, please raise an issue at Piazza. - -""" - -# ╔═╡ ab61d2fe-312c-4aca-9029-e446aaf2bfa2 -keyconcept("", -md""" All study materials are accessible at the course homepage [`http://bmlip.nl`](http://bmlip.nl).""") - -# ╔═╡ 0d016cf8-d294-11ef-0c84-336979a02dd7 -md""" -## Study Guide - -1. **Please study the lecture notes BEFORE you come to class!!** - - Optionally, you can view the video recordings of the Q2-2023/24 lecture series for additional explanations. - -2. Then come to the class! - - During the scheduled classroom meetings, I will not cover all of the material from the lecture notes in detail. Instead, I will begin with a summary of the notes and then be available to address any additional questions you may have. - - Pose your questions in the classroom so others can also learn from the answers and/or discussion. - -3. If you still have questions after class, or later on when preparing for the exam, pose your question at the **Piazza site**! - - Your questions will be answered at the Piazza site by fellow students and accorded (or corrected) by the teaching staff. - -Each class is accompanied by a set of exercises (at bottom of lecture notes). These are often somewhat challenging and emphasize _quantitative skills beyond what will be required for the exam_. You may use this [**Formula Sheet**](https://github.com/bmlip/course/blob/main/assets/files/5SSD0_formula_sheet.pdf) when working on the exercises; the same sheet will also be provided during the written exam. - - -""" - -# ╔═╡ 646b8c08-bcd8-4c20-973a-b03583a7d472 -keyconcept("", -"Study the materials _before_ you come to the class.") - -# ╔═╡ 0d017b82-d294-11ef-2d11-df36557202c9 -md""" -## Piazza (Q&A) - -We will be using [Piazza](https://piazza.com/) for Q&A and course announcements. Piazza is designed to get you help quickly and efficiently, both from classmates and the teaching staff. - -👉 [Sign up for Piazza](http://piazza.com/tue.nl/winter2026/5ssd0) today if you haven’t already, and consider installing the Piazza app on your phone. - -The sooner you start asking questions on Piazza (instead of sending emails), the sooner you’ll benefit from the collective knowledge of your classmates and instructors. Don’t hesitate to ask questions when something is unclear—you can even post anonymously if you prefer. - -All **course-related announcements** will also be disseminated via Piazza. Unless it concerns a personal matter, please post your course-related questions there (in the appropriate folder). - -We also encourage you to contribute by answering questions on Piazza: - - - You may answer anonymously if you wish. - - Explaining material to others is an excellent way to deepen your own understanding. - - Each question has one “student answer,” which the class can edit collaboratively, and one “instructor answer” for the teaching staff. - -Piazza also supports **LaTeX**, please use it for math. And don’t forget to try the **search** function before posting a new question. - -""" - -# ╔═╡ 74dedaac-0a3e-4b83-a081-d76cdb301d56 -keyconcept("", -md""" Piazza is a great resource for continuing discussion outside the classroom, where you can both ask and answer questions.""") - -# ╔═╡ 8317254e-249d-49c8-acfb-1725c6349df8 -md""" -## Pluto - -All lectures were developed in executable [Julia](https://julialang.org/) code. Julia is an open-source programming language with a MATLAB-like syntax and performance comparable to C. - -We created interactive course notebooks using [Pluto](https://plutojl.org/), which allows students to modify simulation conditions and immediately observe the results. - -We look forward to receiving your feedback on your experiences with Pluto as an educational tool for playing with interactive learning materials. - -""" - -# ╔═╡ 0d018ee2-d294-11ef-3b3d-e34d0532a953 -md""" -## Exam Guide - -The course will be scored by two programming assignments and a final written exam. See the [course homepage](https://github.com/bmlip/course?tab=readme-ov-file#exams--assignments) for how the final score is computed. - -**The written exam is in multiple-choice format.** - -You are not allowed to use books, smartphones, calculators, or bring printed or handwritten formula sheets to the exam. All difficult-to-remember formulas are included on this [Formula Sheet](https://github.com/bmlip/course/blob/main/assets/files/5SSD0_formula_sheet.pdf), which will be provided together with the exam. - -The class homepage contains [two representative practice exams](https://github.com/bmlip/course?tab=readme-ov-file#exams--assignments) from previous terms. **It is highly recommended to practice with these previous exams when preparing for the exam.**. - - -""" - -# ╔═╡ 31f8669b-b547-4a11-acc6-64e02e6e9dc0 -keyconcept("","The written exam will be in multiple-choice format. Two previous exams, along with their answers, are available on the course homepage.") - -# ╔═╡ f46ccac8-e87c-4cbe-9d2c-fdb4723c639e -keyconcept("",md"""When working on exercises or preparing for the written exam, you may use this [Formula Sheet](https://github.com/bmlip/course/blob/main/assets/files/5SSD0_formula_sheet.pdf), which will also be provided during the exam.""" ) - -# ╔═╡ e56f489e-bd51-4499-aa80-1844c8651184 -md""" -## Results of Previous Exams -![](https://github.com/bmlip/course/blob/main/assets/figures/exam-results.png?raw=true) -""" - -# ╔═╡ 0d019cde-d294-11ef-0563-6b41bc2ca80f -TwoColumn( -md""" -## Preview -Check out [a recording from last year](https://youtu.be/k9DO26O6dIg?si=b8EiK12O_s76btPn) to understand what this class will be like. -""", -md""" -![](https://github.com/bmlip/course/blob/main/assets/figures/Professor-Terguson.png?raw=true) -""") - -# ╔═╡ f0a4b221-b4cd-425c-9a35-44c68c64e341 -md""" -# Summary -""" - -# ╔═╡ 9b1342f1-fcc9-469a-abfe-ed73a5b56d75 -keyconceptsummary() - -# ╔═╡ f3b97e01-f8d2-4865-ae81-2df412f7515a -md""" -# Code -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000001 -PLUTO_PROJECT_TOML_CONTENTS = """ -[deps] -BmlipTeachingTools = "656a7065-6f73-6c65-7465-6e646e617262" - -[compat] -BmlipTeachingTools = "~1.3.1" -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000002 -PLUTO_MANIFEST_TOML_CONTENTS = """ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.12.1" -manifest_format = "2.0" -project_hash = "3e0db0a10f1d7687b8c53fc91306ce22ead0cdba" - -[[deps.AbstractPlutoDingetjes]] -deps = ["Pkg"] -git-tree-sha1 = "6e1d2a35f2f90a4bc7c2ed98079b2ba09c35b83a" -uuid = "6e696c72-6542-2067-7265-42206c756150" -version = "1.3.2" - -[[deps.ArgTools]] -uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.2" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -version = "1.11.0" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -version = "1.11.0" - -[[deps.BmlipTeachingTools]] -deps = ["HypertextLiteral", "InteractiveUtils", "Markdown", "PlutoTeachingTools", "PlutoUI", "Reexport"] -git-tree-sha1 = "806eadb642467b05f9d930f0d127f1e6fa5130f0" -uuid = "656a7065-6f73-6c65-7465-6e646e617262" -version = "1.3.1" - -[[deps.ColorTypes]] -deps = ["FixedPointNumbers", "Random"] -git-tree-sha1 = "67e11ee83a43eb71ddc950302c53bf33f0690dfe" -uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -version = "0.12.1" -weakdeps = ["StyledStrings"] - - [deps.ColorTypes.extensions] - StyledStringsExt = "StyledStrings" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.3.0+1" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -version = "1.11.0" - -[[deps.Downloads]] -deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] -uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -version = "1.6.0" - -[[deps.FileWatching]] -uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" -version = "1.11.0" - -[[deps.FixedPointNumbers]] -deps = ["Statistics"] -git-tree-sha1 = "05882d6995ae5c12bb5f36dd2ed3f61c98cbb172" -uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" -version = "0.8.5" - -[[deps.Format]] -git-tree-sha1 = "9c68794ef81b08086aeb32eeaf33531668d5f5fc" -uuid = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8" -version = "1.3.7" - -[[deps.Ghostscript_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Zlib_jll"] -git-tree-sha1 = "38044a04637976140074d0b0621c1edf0eb531fd" -uuid = "61579ee1-b43e-5ca0-a5da-69d92c66a64b" -version = "9.55.1+0" - -[[deps.Hyperscript]] -deps = ["Test"] -git-tree-sha1 = "179267cfa5e712760cd43dcae385d7ea90cc25a4" -uuid = "47d2ed2b-36de-50cf-bf87-49c2cf4b8b91" -version = "0.0.5" - -[[deps.HypertextLiteral]] -deps = ["Tricks"] -git-tree-sha1 = "7134810b1afce04bbc1045ca1985fbe81ce17653" -uuid = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2" -version = "0.9.5" - -[[deps.IOCapture]] -deps = ["Logging", "Random"] -git-tree-sha1 = "b6d6bfdd7ce25b0f9b2f6b3dd56b2673a66c8770" -uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" -version = "0.2.5" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -version = "1.11.0" - -[[deps.JLLWrappers]] -deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "0533e564aae234aff59ab625543145446d8b6ec2" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.7.1" - -[[deps.JSON]] -deps = ["Dates", "Mmap", "Parsers", "Unicode"] -git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" -uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.21.4" - -[[deps.JpegTurbo_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "4255f0032eafd6451d707a51d5f0248b8a165e4d" -uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "3.1.3+0" - -[[deps.JuliaSyntaxHighlighting]] -deps = ["StyledStrings"] -uuid = "ac6e5ff7-fb65-4e79-a425-ec3bc9c03011" -version = "1.12.0" - -[[deps.LaTeXStrings]] -git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" -uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.4.0" - -[[deps.Latexify]] -deps = ["Format", "Ghostscript_jll", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Requires"] -git-tree-sha1 = "44f93c47f9cd6c7e431f2f2091fcba8f01cd7e8f" -uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" -version = "0.16.10" - - [deps.Latexify.extensions] - DataFramesExt = "DataFrames" - SparseArraysExt = "SparseArrays" - SymEngineExt = "SymEngine" - TectonicExt = "tectonic_jll" - - [deps.Latexify.weakdeps] - DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - SymEngine = "123dc426-2d89-5057-bbad-38513e3affd8" - tectonic_jll = "d7dd28d6-a5e6-559c-9131-7eb760cdacc5" - -[[deps.LibCURL]] -deps = ["LibCURL_jll", "MozillaCACerts_jll"] -uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.4" - -[[deps.LibCURL_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll", "Zlib_jll", "nghttp2_jll"] -uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.11.1+1" - -[[deps.LibGit2]] -deps = ["LibGit2_jll", "NetworkOptions", "Printf", "SHA"] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -version = "1.11.0" - -[[deps.LibGit2_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll"] -uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.9.0+0" - -[[deps.LibSSH2_jll]] -deps = ["Artifacts", "Libdl", "OpenSSL_jll"] -uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.11.3+1" - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -version = "1.11.0" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -version = "1.12.0" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -version = "1.11.0" - -[[deps.MIMEs]] -git-tree-sha1 = "c64d943587f7187e751162b3b84445bbbd79f691" -uuid = "6c6e2e6c-3030-632d-7369-2d6c69616d65" -version = "1.1.0" - -[[deps.MacroTools]] -git-tree-sha1 = "1e0228a030642014fe5cfe68c2c0a818f9e3f522" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.16" - -[[deps.Markdown]] -deps = ["Base64", "JuliaSyntaxHighlighting", "StyledStrings"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -version = "1.11.0" - -[[deps.Mmap]] -uuid = "a63ad114-7e13-5084-954f-fe012c677804" -version = "1.11.0" - -[[deps.MozillaCACerts_jll]] -uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2025.5.20" - -[[deps.NetworkOptions]] -uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -version = "1.3.0" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.29+0" - -[[deps.OpenSSL_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "3.5.1+0" - -[[deps.OrderedCollections]] -git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.8.1" - -[[deps.Parsers]] -deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "7d2f8f21da5db6a806faf7b9b292296da42b2810" -uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.8.3" - -[[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.12.0" - - [deps.Pkg.extensions] - REPLExt = "REPL" - - [deps.Pkg.weakdeps] - REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" - -[[deps.PlutoTeachingTools]] -deps = ["Downloads", "HypertextLiteral", "Latexify", "Markdown", "PlutoUI"] -git-tree-sha1 = "dacc8be63916b078b592806acd13bb5e5137d7e9" -uuid = "661c6b06-c737-4d37-b85c-46df65de6f69" -version = "0.4.6" - -[[deps.PlutoUI]] -deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "Downloads", "FixedPointNumbers", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "MIMEs", "Markdown", "Random", "Reexport", "URIs", "UUIDs"] -git-tree-sha1 = "3faff84e6f97a7f18e0dd24373daa229fd358db5" -uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" -version = "0.7.73" - -[[deps.PrecompileTools]] -deps = ["Preferences"] -git-tree-sha1 = "07a921781cab75691315adc645096ed5e370cb77" -uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.3.3" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "0f27480397253da18fe2c12a4ba4eb9eb208bf3d" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.5.0" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -version = "1.11.0" - -[[deps.Random]] -deps = ["SHA"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -version = "1.11.0" - -[[deps.Reexport]] -git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" -uuid = "189a3867-3050-52da-a836-e630ba90ab69" -version = "1.2.2" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.1" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -version = "1.11.0" - -[[deps.Statistics]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.11.1" - - [deps.Statistics.extensions] - SparseArraysExt = ["SparseArrays"] - - [deps.Statistics.weakdeps] - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - -[[deps.StyledStrings]] -uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b" -version = "1.11.0" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[deps.Tar]] -deps = ["ArgTools", "SHA"] -uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.0" - -[[deps.Test]] -deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] -uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -version = "1.11.0" - -[[deps.Tricks]] -git-tree-sha1 = "372b90fe551c019541fafc6ff034199dc19c8436" -uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" -version = "0.1.12" - -[[deps.URIs]] -git-tree-sha1 = "bef26fb046d031353ef97a82e3fdb6afe7f21b1a" -uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -version = "1.6.1" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -version = "1.11.0" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -version = "1.11.0" - -[[deps.Zlib_jll]] -deps = ["Libdl"] -uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.3.1+2" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.15.0+0" - -[[deps.nghttp2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.64.0+1" - -[[deps.p7zip_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.5.0+2" -""" - -# ╔═╡ Cell order: -# ╟─0cfd4bc0-d294-11ef-3537-630954a9dd27 -# ╟─467c8189-b5d3-4eaf-8886-6ae53136dd8f -# ╟─0cffef7e-d294-11ef-3dd5-1fd862260b70 -# ╟─0d013750-d294-11ef-333c-d9eb7578fab2 -# ╟─0d0142b6-d294-11ef-0297-e5bb923ad942 -# ╟─0d015ab4-d294-11ef-2e53-5339062c435c -# ╟─ab61d2fe-312c-4aca-9029-e446aaf2bfa2 -# ╟─0d016cf8-d294-11ef-0c84-336979a02dd7 -# ╟─646b8c08-bcd8-4c20-973a-b03583a7d472 -# ╟─0d017b82-d294-11ef-2d11-df36557202c9 -# ╟─74dedaac-0a3e-4b83-a081-d76cdb301d56 -# ╟─8317254e-249d-49c8-acfb-1725c6349df8 -# ╟─0d018ee2-d294-11ef-3b3d-e34d0532a953 -# ╟─31f8669b-b547-4a11-acc6-64e02e6e9dc0 -# ╟─f46ccac8-e87c-4cbe-9d2c-fdb4723c639e -# ╟─e56f489e-bd51-4499-aa80-1844c8651184 -# ╟─0d019cde-d294-11ef-0563-6b41bc2ca80f -# ╟─f0a4b221-b4cd-425c-9a35-44c68c64e341 -# ╟─9b1342f1-fcc9-469a-abfe-ed73a5b56d75 -# ╟─f3b97e01-f8d2-4865-ae81-2df412f7515a -# ╠═f96d047f-9efa-4889-8b4e-a8d96677d072 -# ╟─00000000-0000-0000-0000-000000000001 -# ╟─00000000-0000-0000-0000-000000000002 diff --git a/mlss/archive/Discriminative Classification.jl b/mlss/archive/Discriminative Classification.jl deleted file mode 100644 index 005119f..0000000 --- a/mlss/archive/Discriminative Classification.jl +++ /dev/null @@ -1,2560 +0,0 @@ -### A Pluto.jl notebook ### -# v0.20.21 - -#> [frontmatter] -#> image = "https://github.com/bmlip/course/blob/v2/assets/figures/Figure4.9.png?raw=true" -#> description = "Introduction to discriminative classification models and Bayesian logistic regression." -#> -#> [[frontmatter.author]] -#> name = "BMLIP" -#> url = "https://github.com/bmlip" - -using Markdown -using InteractiveUtils - -# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). -macro bind(def, element) - #! format: off - return quote - local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end - local el = $(esc(element)) - global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : iv(el) - el - end - #! format: on -end - -# ╔═╡ e379cc2a-43f8-432f-84fc-a88fd4f3ad0a -using BmlipTeachingTools - -# ╔═╡ a759653c-0da4-40b7-9e9e-1e3d2e4df4ea -using Random, Plots, LaTeXStrings - -# ╔═╡ ad196ae6-c65e-4aaa-b0cc-bd72daa41952 -using MarkdownLiteral: @mdx - -# ╔═╡ 616e84d7-063d-4d9d-99e4-56aecf3c7ee4 -using Distributions, ExponentialFamily, LinearAlgebra, LogExpFunctions, StatsFuns, BayesBase, Optim - -# ╔═╡ 25eefb10-d294-11ef-0734-2daf18636e8e -title("Discriminative Classification") - -# ╔═╡ e7c45ff8-9fa2-4ea3-a06f-5769d877540e -PlutoUI.TableOfContents() - -# ╔═╡ 25ef12bc-d294-11ef-1557-d98ba829a804 -md""" -## Preliminaries - -##### Goal - - * Introduction to discriminative classification models - -##### Materials - - * Mandatory - - * These lecture notes - * Optional - - * [Bishop PRML book](https://www.microsoft.com/en-us/research/wp-content/uploads/2006/01/Bishop-Pattern-Recognition-and-Machine-Learning-2006.pdf) (2006), pp. 213 - 217 (Laplace approximation) - * [Bishop PRML book](https://www.microsoft.com/en-us/research/wp-content/uploads/2006/01/Bishop-Pattern-Recognition-and-Machine-Learning-2006.pdf) (2006), pp. 217 - 220 (Bayesian logistic regression) - * [T. Minka (2005), Discriminative models, not discriminative training](https://github.com/bmlip/course/blob/main/assets/files/Minka-2005-Discriminative-models-not-discriminative-training.pdf) - -""" - -# ╔═╡ fe66a986-2f55-4417-a71d-b3b99f6369cc -challenge_statement("difficult class-conditional data distributions" , header_level=1, color= "red" ) - -# ╔═╡ 25ef2806-d294-11ef-3cb6-0f3e76b9177e -md""" -Our task will be the same as in the preceding class on (generative) classification. But this time, the class-conditional data distributions look very non-Gaussian, yet the linear discriminative boundary looks easy enough. - -""" - -# ╔═╡ 4ceede48-a4d5-446b-bb34-26cec4af357a -begin - N_bond = @bindname N Slider(9:200; default=120, show_value=true) -end - -# ╔═╡ 7e7cab21-09ab-4d06-9716-ab7864b229ab -md""" -See [data generation code](#Data-Generation). -""" - -# ╔═╡ aeee1072-5173-4eae-8027-3fbf2e338d95 -md""" -### Why Not Generative Classification? -Like in the [last lecture](https://bmlip.github.io/course/lectures/Generative%20Classification.html), let's try to fit a generative distribution to the data. This is what we get when fitting two Gaussians to the two classes: -""" - -# ╔═╡ 93083660-6a49-4147-b00c-d62a4453f222 -md""" -That's not a good fit! - -Now, we could continue down this road, and try to fit a more complex distribution to the ``y = 1`` class to make it fit. **But let's explore a different approach**, modeling the discrimative boundary directly. -""" - -# ╔═╡ d1bbdc6a-e5ff-4cd6-9175-860b5ec04f3c -md""" -# Bayesian Logistic Regression -""" - -# ╔═╡ 25ef6ece-d294-11ef-270a-999c8d457b24 -md""" -## Framework - -A data set is given by ``D = \{(x_1,y_1),\dotsc,(x_N,y_N)\}`` with ``x_n \in \mathbb{R}^M`` and ``y_n \in \mathcal{C}_k``, with ``k=1,\ldots,K``. - -""" - -# ╔═╡ 25ef7f54-d294-11ef-3f05-0d85fe6e7a17 -md""" -Sometimes, the precise assumptions of the (Gaussian-Categorical) generative model - -```math -p(x_n,y_n\in\mathcal{C}_k|\theta) = \pi_k \cdot \mathcal{N}(x_n|\mu_k,\Sigma) -``` - -clearly do not match the data distribution. - -""" - -# ╔═╡ 25efa2fe-d294-11ef-172f-9bb09277f59e -md""" -Here's an **IDEA**! Let's model the posterior - -```math -p(y_n\in\mathcal{C}_k|x_n) -``` - -*directly*, without any assumptions on the class densities. - -""" - -# ╔═╡ 25efbe42-d294-11ef-3e4e-cfea366757da -md""" -Similarly to regression, we will assume that the inputs ``x`` are given, so we wil not add a model ``p(x)`` for input uncertainties. - -""" - -# ╔═╡ 25efd6b6-d294-11ef-3b21-6363ef531eb5 -md""" -## Model Specification -We will work this idea out for a 2-class problem. Assume a data set is given by ``D = \{(x_1,y_1),\dotsc,(x_N,y_N)\}`` with ``x_n \in \mathbb{R}^M`` and ``y_n \in \{0,1\}``. - -""" - -# ╔═╡ 25f02ac6-d294-11ef-26c4-f142b8ac4b5f -md""" -What model should we use for the posterior distribution ``p(y_n \in \mathcal{C}_k|x_n)``? - -""" - -# ╔═╡ 25f0adde-d294-11ef-353e-4b4773df9ff5 -md""" -#### Data-generating distribution - -We will take inspiration from the [generative classification](https://bmlip.github.io/course/lectures/Generative%20Classification.html#softmax) approach, where we derived the class posterior - -```math -p(y_{nk} = 1\,|\,x_n,\beta_k,\gamma_k) = \sigma(\beta_k^T x_n + \gamma_k) -``` - -as a **softmax** function of a linear map of the input. - -Here, in logistic regression, we *choose* the 2-class softmax function (which is called the [**logistic** function](https://en.wikipedia.org/wiki/Logistic_function)) with linear discrimination bounderies for the posterior class probability: - -```math -p(y_n =1 \,|\, x_n, w) = \sigma(w^T x_n) \,. -``` - -where - -```math -\sigma(a) = \frac{1}{1+e^{-a}} -``` - -is the *logistic* function. - -Clearly, it follows from this assumption that ``p(y_n =0 \,|\, x_n, w) = 1- \sigma(w^T x_n)``. - -""" - -# ╔═╡ 22121f20-6b90-4782-8bed-25486cc23ae7 -NotebookCard("https://bmlip.github.io/course/minis/Softmax.html") - -# ╔═╡ 56cae988-2f51-4618-8676-f46fa2924ea3 -let - logistic_function(a) = 1 / (1 + exp(-a)) - - probit(p) = cdf(Normal(0, 1), p) - scaled_proibit(a; λ=sqrt(π/8)) = probit(a*λ) - - p = plot( - xlim=(-9, 9), - ylim=(0,1), - size=(600,250), - ) - - plot!(logistic_function; label="logistic", lw=2) - plot!(scaled_proibit; label="probit", lw=2) -end - -# ╔═╡ 66351c02-1921-44dc-b461-84a536c40fd5 -md""" -The logistic function ``\sigma(a) = 1/(1+e^{-a})`` (red), together with the $(HTML("scaled probit function")) ``\Phi(\lambda a)``, for ``\lambda^2=\pi/8`` (in blue). We will use this approximation later in the [Laplace approximation](https://bmlip.github.io/course/minis/Laplace%20Approximation.html#gaussian-cdf). _Based on Bishop fig.4.9._ -""" - -# ╔═╡ e3173267-bd90-47df-9d7f-bd9fd3f688ac - - -# ╔═╡ 25f12528-d294-11ef-0c65-97c61935e9c2 -md""" -Adding the other class (``y_n=0``) leads to the following posterior class distribution: - -```math -\begin{align*} -p(y_n \,|\, x_n, w) &= \mathrm{Bernoulli}\left(y_n \,|\, \sigma(w^T x_n) \right) \\ -&= \sigma(w^T x_n)^{y_n} \left(1 - \sigma(w^T x_n)\right)^{(1-y_n)} \tag{B-4.89} \\ - &= \sigma\left( (2y_n-1) w^T x_n\right) -\end{align*} -``` - -Note that for the 3rd equality, we have made use of the fact that ``\sigma(-a) = 1-\sigma(a)``. - -Each of these three models in B-4.89 are **equivalent**. We mention all three notational options since they all appear in the literature. - -""" - -# ╔═╡ 25f14226-d294-11ef-369f-e545d5fe2700 -md""" -This choice for the class posterior is called **logistic regression**, in analogy to [linear regression](https://bmlip.github.io/course/lectures/Regression.html#likelihood-function): - -```math -\begin{align} -p(y_n|x_n,w) &= \mathcal{N}(y_n|w^T x_n,\beta^{-1}) \tag{for linear regression} \\ -p(y_n|x_n,w) &= \mathrm{Bernoulli}\left(y_n \,|\, \sigma(w^T x_n) \right) \tag{for logistic regression} -\end{align} -``` - -""" - -# ╔═╡ 25f14f82-d294-11ef-02fb-2dc632b8f118 -md""" -In the discriminative approach, the parameters ``w`` are **not** structured into ``\{\mu,\Sigma,\pi \}``. In principle they are "free" parameters for which we can choose any value that seems appropriate. This provides discriminative approach with more flexibility than the generative approach. - -""" - -# ╔═╡ 25f15e0a-d294-11ef-3737-79a68c9b3c61 -md""" -#### Prior - -In *Bayesian* logistic regression, we often add a **Gaussian prior on the weights**: - -```math -\begin{align*} -p(w) = \mathcal{N}(w \,|\, m_0, S_0) \tag{B-4.140} -\end{align*} -``` -""" - -# ╔═╡ 22f4972e-0f6d-49a1-bd1f-10569b77a852 -keyconcept("", -md""" -Discriminative classification follows the approach we used for Regression, namely, a direct model - -```math -\begin{align} -p(y_n \,|\, x_n, w) &= \mathrm{Bernoulli}\left(y_n \,|\, \sigma(w^T x_n) \right) \\ -p(w) &= \mathcal{N}(w \,|\, m_0, S_0) -\end{align} -``` - -for outputs ``y_n``, given inputs ``x_n``. -""") - -# ╔═╡ 25f19ed8-d294-11ef-3298-efa16dda1dde -md""" -## Parameter Inference - -Note that for generative classification, for the sake of simplicity, we used maximum likelihood estimation for the model parameters. We could have used Bayesian parameter estimation for the generative classification model but the math is not suited for an introductory lesson. - -In this lesson on discriminative classification, we specify both a prior and likelihood function for the parameters ``w``, which allows us to compute a Bayesian posterior for the weights. - -As before, once the model is specified, everything else follows directly from the rules of probability theory. - - -""" - -# ╔═╡ 25f1390c-d294-11ef-364d-17e4c93b9a57 -md""" -For the data set ``D = \{(x_1,y_1),\dotsc,(x_N,y_N)\}``, the **likelihood function** for the parameters ``w`` is given by - -```math -p(D|w) = \prod_{n=1}^N p(y_n|x_n,w) = \prod_{n=1}^N \sigma\left( (2y_n-1) w^T x_n\right) -``` - -""" - -# ╔═╡ bda07a2e-3769-4ffe-9bc5-2b8a515247f6 -md""" - - -The posterior for the weights follows by Bayes rule, - -```math -\begin{align*} -\underbrace{p(w \,|\, D)}_{\text{posterior}} &= \frac{p(w) p(D|w)}{\int p(w) p(D|w) \mathrm{d}w} \\ &= \frac{\overbrace{\mathcal{N}(w \,|\, m_0, S_0)}^{\text{prior}} \cdot \overbrace{\prod_{n=1}^N \sigma\left( (2y_n-1) w^T x_n\right)}^{\text{likelihood}}}{\underbrace{\int \mathcal{N}(w \,|\, m_0, S_0) \prod_{n=1}^N \sigma\left( (2y_n-1) w^T x_n\right) \mathrm{d}w}_{\text{evidence}}} \tag{B-4.142} -\end{align*} -``` - -In principle, Bayesian learning of the parameters is done now! - -Unfortunately, the posterior ``p(w | D)`` is not Gaussian, and the evidence ``p(D)`` is also not analytically computable. (We will deal with this later). -""" - -# ╔═╡ 25f1ab08-d294-11ef-32ed-493792e121b7 -md""" -## Application: the predictive distribution - -For a new data point ``x_\bullet``, the predictive distribution for ``y_\bullet=1`` is given by - -```math -\begin{align*} -p(y_\bullet = 1 | x_\bullet, D) &= \int p(y_\bullet = 1 \,|\, x_\bullet, w) \, p(w| D) \,\mathrm{d}w \\ - &= \int \sigma(w^T x_\bullet) \, p(w| D) \,\mathrm{d}w \tag{B-4.145} -\end{align*} -``` - -""" - -# ╔═╡ 25f1b404-d294-11ef-1c3a-a5a8142bb202 -md""" -While Eq. B-4.145 gives the expression for the Bayesian predictive class distribution, the integral becomes analytically intractable when we substitute the posterior distribution over weights, ``p(w | D)`` (from Eq. B-4.142), into it :( - -""" - -# ╔═╡ 25f1c2a0-d294-11ef-009c-69b64e87e5fb -md""" -Many methods have been developed to approximate these types of Bayesian integrals. Here, we present the **Laplace approximation**, which is one of the simplest methods with broad applicability to Bayesian calculations. - -""" - -# ╔═╡ 3422dd29-6da9-4e0f-a4ab-646f223c2244 -md""" -## Working out Numerics with Laplace Approximation -""" - -# ╔═╡ 8b0bb225-bdc1-45ec-bd34-68d674d6f08d -md""" -The **Laplace Approximation** approximates a function by a Gaussian-shaped function. In this case, we will approximate the weight posterior ``p(w|D)`` by a Gaussian distribution - -```math -q(w) = \mathcal{N}\left(w\,|\, m_{N}, S_N\right) \tag{B-4.144} -``` - -with - -```math -\begin{align} -m_N &= \arg\max_w \log p(w|D) \\ -S_N^{-1} &= S_0^{-1} + \sum_n \sigma_n (1-\sigma_n) x_n x_n^T \tag{B-4.143} -\end{align} -``` -where we used short-hand ``\sigma_n = \sigma\left((2y_n-1) m_N^T x_n\right)``. - -If we substitute the Gaussian approximation from Eq. B-4.143 into the expression for the predictive class distribution (Eq. B-4.145), we obtain (after some additional approximations): - -```math -\begin{align*} -p(y_\bullet = 1 \mid x_\bullet, D) &= \int p(y_\bullet = 1 \,|\, x_\bullet, w) \cdot p(w\,|\, D) \,\mathrm{d}w \\ -&\approx \int p(y_\bullet = 1 \,|\, x_\bullet, w) \cdot q(w) \,\mathrm{d}w \\ - &= \int \sigma(w^T x_\bullet) \cdot \mathcal{N}\left(w \,|\, m_N, S_N\right) \,\mathrm{d}w \tag{B-4.145} \\ -&\approx \Phi\left( \frac{\mu_a}{\sqrt(\lambda^{-2} +\sigma_a^2)}\right) \tag{B-4.152} -\end{align*} -``` - -where - -```math -\begin{align} -\lambda^2 &= \pi / 8 \\ -\mu_a &= m^T_{N} x_\bullet \tag{B-4.149} \\ -\sigma_a^2 &= x^T_\bullet S_N x_\bullet \tag{B-4.150} -\end{align} -``` -and ``\Phi(x)= \frac{1}{\sqrt(2\pi)}\int_{-\infty}^{x}e^{-t^2/2}\mathrm{d}t`` is the Gaussian cumulative distribution function (CDF) . The Gaussian CDF closely approximates the logistic sigmoid function, with -``\Phi(\sqrt{\pi/8} a) \approx \sigma(a)``. - - -""" - -# ╔═╡ ae2b23f0-853e-4237-aab2-81c961f52cf6 -md""" -Although the intermediate equations may look intimidating, the final result for the predictive distribution Eq. B-4.152 has a simple closed-form expression. - -""" - -# ╔═╡ e4cc517b-d3b5-4517-a28b-efb8aba24496 -md""" -The numerical issues associated with the Laplace approximation and the evaluation of the predictive class distribution are discussed in detail in the following mini-lecture. -""" - -# ╔═╡ 33b859f2-9ea8-4f8b-b0f8-08a19c6a96fc -NotebookCard("https://bmlip.github.io/course/minis/Laplace%20Approximation.html") - -# ╔═╡ 9704ee6a-e233-49f1-8c66-d81543927342 -keyconcept("", -md""" -It is easy to write down the Bayesian equations for the weight posterior and the predictive distribution of ``y_\bullet``, but in practice these do not admit closed-form solutions. A traditional workaround is the **Laplace approximation**, which has long been used to approximate the marginalization integrals in Bayesian inference. -""") - -# ╔═╡ 4ab4bcca-da6e-4137-858d-257c04388277 -keyconcept("", -md""" -The Laplace approximation renders a closed-form and interpretable (approximate) solution for the predictive class distribution, -```math -p(y_\bullet = 1 | x_\bullet, D) \approx \Phi\left( \frac{m^T_{N} x_\bullet}{\sqrt{(8/\pi) +x^T_\bullet S_N x_\bullet)}}\right)\,. -``` - -""") - -# ╔═╡ 38b4854f-be02-4696-802f-2106481e3aea -md""" -## Bayesian Processing of Uncertainties - -We now make an important observation: According to Eq. B-4.143, the posterior covariance matrix ``S_N`` of the weight vector depends on both the prior variance ``S_0`` and the distribution of the training data ``\{(x_n, y_n)\}_{n=1}^N``. In regions with limited training data and/or an uninformative prior (i.e., large ``S_0``), the posterior uncertainty about the weights remains high. This increased uncertainty raises ``\sigma_a^2`` in Eq. B-4.150, **causing the posterior class probability in Eq. B-4.152 to approach ``0.5``** (since ``\Phi(0) = 0.5``, see [Gaussian CDF image](https://en.wikipedia.org/wiki/Normal_distribution#/media/File:Normal_Distribution_CDF.svg)), thereby reflecting greater uncertainty in the prediction. - -In other words, if you draw a new feature ``x_\bullet`` from a region with little training data, then the predictive class probability ``p(y_\bullet | x_\bullet, D)`` naturally tends toward ``0.5``, a built-in expression of uncertainty, courtesy of the Bayesian framework. - -In contrast, if you eliminate uncertainty by representing the weights as fixed-point estimates (i.e., as mere numbers), then the model becomes overconfident. It will still produce sharp predictions, even in regions where it has seen no data, exactly when it should be most uncertain. - -""" - -# ╔═╡ 7932fff4-0568-49de-b34c-711e51487ae3 -challenge_solution("Bayesian Logistic Regression" , color= "green", header_level=1 ) - -# ╔═╡ 25f3bef2-d294-11ef-1438-e9f7e469336f -md""" - -Let us perform Bayesian inference to estimate the posterior distribution of ``w`` given the data set from the introduction. To allow an offset in the discrimination boundary, we add a constant 1 to the feature vector ``x``. -""" - -# ╔═╡ aaf764da-cf1b-4bc7-83ea-6d25a80ca3ab -N_bond - -# ╔═╡ 69706576-0333-43bf-8523-e7838f373529 -md""" -Note that we get a full predictive posterior distribution over the assignment of class labels for every datapoint, so instead of assigning a point to a class, we get a measure of uncertainty over our class assignment! - -""" - -# ╔═╡ 98ef7093-f8ed-4a44-a153-0a64ab483f65 -md""" -## Implementation Issues -""" - -# ╔═╡ 0045e569-dc3c-4998-86da-9d96f599c599 -md""" -# Maximum Likelihood Estimation - -""" - -# ╔═╡ 25f365e2-d294-11ef-300e-9914333b1233 -md""" - -Rather than the computationally involved Laplace approximation, in practice, discriminative classification is often executed through maximum likelihood estimation. - -With the usual 1-of-K encoding scheme for classes, - -```math -y_{nk} = \begin{cases} 1 & \text{if } x_n \in \mathcal{C}_k \\ - 0 & \text{otherwise} \,,\end{cases} -``` - -the log-likelihood for a ``K``-dimensional discriminative classifier evaluates to - -```math -\begin{align*} - \mathrm{L}(w) &= \log \prod_n \prod_k {p(\mathcal{C}_k|x_n,w)}^{y_{nk}} \\ - &= \sum_n \sum_k y_{kn} \log \bigg( \underbrace{\frac{e^{w_k^T x_n}}{ \sum_j e^{w_j^T x_n}}}_{=\text{softmax}(w_k^T x_n)} \bigg) - \end{align*} -``` - -The gradient ``\nabla_{w_k} \mathrm{L}(w)`` to the weight ``w_k`` can be worked out to -```math -\nabla_{w_k} \mathrm{L}(w) = \sum_n \underbrace{\big( \underbrace{y_{nk}}_{\text{target}} - \underbrace{\frac{e^{w_k^T x_n}}{ \sum_j e^{w_j^T x_n}}}_{\text{prediction}} \big)}_{\text{prediction error}}\cdot x_n . -``` - -""" - -# ╔═╡ 3b24b142-2239-4951-9177-ff87b5da4b68 -hide_proof( - md""" -The Log-likelihood is - -```math -\mathrm{L}(w) = \log \prod_n \prod_k {\underbrace{p(y_{nk}=1|x_n,w)}_{p_{nk}}}^{y_{nk}} = \sum_{n,k} y_{nk} \log p_{nk} -``` - -Use the fact that the softmax ``\phi_k \equiv e^{a_k} / {\sum_j e^{a_j}}`` has analytical derivative, - -```math - \begin{align*} - \frac{\partial \phi_k}{\partial a_j} &= \frac{(\sum_j e^{a_j})e^{a_k}\delta_{kj}-e^{a_j}e^{a_k}}{(\sum_j e^{a_j})^2} = \frac{e^{a_k}}{\sum_j e^{a_j}}\delta_{kj} - \frac{e^{a_j}}{\sum_j e^{a_j}} \frac{e^{a_k}}{\sum_j e^{a_j}}\\ - &= \phi_k \cdot(\delta_{kj}-\phi_j) \,. - \end{align*} -``` - -Take the derivative of ``\mathrm{L}(w)`` (or: how to spend an hour ...) - -```math -\begin{align*} -\nabla_{w_j} \mathrm{L}(w) &= \sum_{n,k} \frac{\partial \mathrm{L}_{nk}}{\partial p_{nk}} \cdot\frac{\partial p_{nk}}{\partial a_{nj}}\cdot\frac{\partial a_{nj}}{\partial w_j} \\ - &= \sum_{n,k} \frac{y_{nk}}{p_{nk}} \cdot p_{nk} (\delta_{kj}-p_{nj}) \cdot x_n \\ - &= \sum_n \Big( y_{nj} (1-p_{nj}) -\sum_{k\neq j} y_{nk} p_{nj} \Big) \cdot x_n \\ - &= \sum_n \left( y_{nj} - p_{nj} \right)\cdot x_n \\ - &= \sum_n \Big( \underbrace{y_{nj}}_{\text{target}} - \underbrace{\frac{e^{w_j^T x_n}}{\sum_{j^\prime} e^{w_{j^\prime}^T x_n}}}_{\text{prediction}} \Big)\cdot x_n -\end{align*} -``` - - - """) - -# ╔═╡ ff31d8c1-db35-4c85-a609-67fc40e9e78d -md""" - -The parameter vector ``w`` for logistic regression can then be estimated through iterative gradient-based adaptation. For instance, start with a random weight ``\hat{w} = w_0``, and iterate through - -```math -\hat{w}^{(i+1)} = \hat{w}^{(i)} + \eta \cdot \left. \nabla_w \mathrm{L}(w) \right|_{w = \hat{w}^{(i)}} -``` -until convergence. - -""" - -# ╔═╡ 1f2bfcf4-fef4-4612-8683-d5c86a326eef -md""" -# Closing Thoughts -""" - -# ╔═╡ 25f3ff84-d294-11ef-0031-63b23d23324d -md""" -## Why be Bayesian? - -Why should you embrace the Bayesian approach to logistic regression? After all, Maximum Likelihood for logistic regression seems simpler. - -Still, consider the following: - - * Bayesian logistic regression with the Laplace approximation ultimately leads to very simple analytic rules. Moreover, modern probabilistic programming languages and packages are able to automate the above inference derivations. (We just do them here to gain insight into a difficult inference process.) - - * Bayesian logistic regression allows for the computation of model evidence, enabling principled comparison of model performance across alternative models. - - * Perhaps most importantly, Bayesian logistic regression processes uncertainties, e.g., in places where almost no data is observed, the posterior class probability will pull back to the prior class probability rather than predicting some arbitrary probability. - -""" - -# ╔═╡ 5d91a2ae-975c-4913-b8ff-3df043cb1f03 -md""" -## Recap Classification -""" - -# ╔═╡ 25f41118-d294-11ef-13a8-3fa6587c1bf3 -@mdx """ - -Let us recapitulate the differences between the generative and discriminative approaches to classification in a table: - - - - - - - - -
Generative Discriminative (ML)
1Like density estimation, model joint prob. - -```math -p(\\mathcal{C}_k) p(x|\\mathcal{C}_k) = \\pi_k \\mathcal{N}(\\mu_k,\\Sigma) -``` - - Like (linear) regression, model conditional - -```math -p(\\mathcal{C}_k|x,\\theta) -``` - -
2Leads to softmax posterior class probability - -```math - p(\\mathcal{C}_k|x,\\theta ) = e^{\\theta_k^T x}/Z -``` - -with structured ``\\theta`` Choose also softmax posterior class probability - -```math - p(\\mathcal{C}_k|x,\\theta ) = e^{\\theta_k^T x}/Z -``` - -but now with 'free' ``\\theta``
3 - -For Gaussian ``p(x|\\mathcal{C}_k)`` and multinomial priors, - -```math -\\hat \\theta_k = \\left[ {\\begin{array}{c} - { - \\frac{1}{2} \\mu_k^T \\sigma^{-1} \\mu_k + \\log \\pi_k} \\\\ - {\\sigma^{-1} \\mu_k } \\\\ -\\end{array}} \\right] -``` - -in one shot. Find ``\\hat\\theta_k`` through gradient-based adaptation - -```math -\\nabla_{\\theta_k}\\mathrm{L}(\\theta) = \\sum_n \\Big( y_{nk} - \\frac{e^{\\theta_k^T x_n}}{\\sum_{k^\\prime} e^{\\theta_{k^\\prime}^T x_n}} \\Big)\\, x_n -``` - -
- -""" - -# ╔═╡ 25f19230-d294-11ef-2dfd-6d4927e86f57 -md""" -## Discriminative Training or Discriminative Models? - -In this lecture series, we presented two approaches to classification, namely the generative and the discriminative approach. - -While the discriminative approach is intuitive and effective for many tasks, it sits somewhat uncomfortably with the [Bayesian modeling approach](https://bmlip.github.io/course/lectures/Bayesian%20Machine%20Learning.html#The-Bayesian-Modeling-Approach) outlined in the Bayesian Machine Learning lecture. Specifically, the discriminative approach does not define a full joint model over all variables in the system. Instead, it focuses only on modeling the conditional distribution ``p(y | x)``, effectively ignoring the input distribution ``p(x)`` that would normally be part of a fully generative Bayesian model. - -In a short paper by [T. Minka (2005)](https://github.com/bmlip/course/blob/main/assets/files/Minka-2005-Discriminative-models-not-discriminative-training.pdf), the model assumptions underlying discriminative classification are reinterpreted as arising from a special case of a generative model. This effectively restores discriminative approaches as fully compatible with the Bayesian modeling framework. (Note: the Minka paper is not required reading for the exam.) - -""" - -# ╔═╡ 173e545a-9125-4dc4-8df4-c3aa84a4b88a -md""" -# Summary -""" - -# ╔═╡ 557c4545-2208-43c9-9302-991e78202734 -keyconceptsummary() - -# ╔═╡ a00c545c-2274-4086-94ca-319d1436fa26 -exercises(header_level=1) - -# ╔═╡ b94644f8-725d-49bf-9641-3dad8b647f45 -md""" - -#### Discrimination boundaries (*) - -Show that for logistic regression with ``p(y_n =1 \,|\, x_n) = \sigma(w^T x_n)``, the discrimination boundary, which can be computed by - -```math -\frac{p(y_n =1|x_n)}{p(y_n =0|x_n)} \overset{!}{=} 1 -``` - -is a straight line. -""" - -# ╔═╡ 9554ed0b-69dd-443c-9538-03a4117eeb78 -hide_proof( -md""" - -```math -\begin{align} -\frac{ p(y_n =1 |x_n) }{ p(y_n =0|x_n) } &= \frac{ \sigma(w^T x_n)}{1 - \sigma(w^T x_n)} \\ -&= \frac{ \frac{1}{1+\exp(-w^T x_n)} }{ 1 -\frac{1}{1+\exp(-w^T x_n)} } \\ -&= \frac{1}{1+\exp(-w^T x_n) - 1} \\ -&= \exp(w^T x) -\end{align} -``` -Setting ``\exp(w^T x) \overset{!}{=} 1``, leads to -```math - w^T x = 0 -``` -for the discrimination boundary, which is a line. - """) - -# ╔═╡ 6eee35ee-fd55-498f-9441-f18c2508de19 -md""" -# Code -""" - -# ╔═╡ fcec3c3a-8b0b-4dfd-b010-66abbf330069 -function generate_dataset(N::Int64) - Random.seed!(1234) - # Generate dataset {(x1,y1),...,(xN,yN)} - # x is a 2d feature vector [x1;x2] - # y ∈ {false,true} is a binary class label - # p(x|y) is multi-modal (mixture of uniform and Gaussian distributions) - # srand(123) - X = Matrix{Float64}(undef,2,N); y = Vector{Bool}(undef,N) - for n=1:N - if (y[n]=(rand()>0.6)) # p(y=true) = 0.6 - # Sample class 1 conditional distribution - if rand()<0.5 - X[:,n] = [6.0; 0.5] .* rand(2) .+ [3.0; 6.0] - else - X[:,n] = sqrt(0.5) * randn(2) .+ [5.5, 0.0] - end - else - # Sample class 2 conditional distribution - X[:,n] = randn(2) .+ [1., 4.] - end - end - - return (X, y) -end - -# ╔═╡ b8790891-1546-48e0-9f96-e09eade31c12 -logσ(x) = -softplus(x) - -# ╔═╡ b48f8800-473d-48e4-ab78-eb07653db7a5 -function log_likelihood(w, X, y) - return sum(logσ.((2*y .- 1) .* (X' * w))) -end - - -# ╔═╡ 1bfac9c5-e5cf-4a70-b077-11bb00cb1482 -""" -This function computes the posterior distribution over regression weights using the Laplace Approximation. We use `logσ` as a numerically stable alternative to `logistic`, and we avoid matrix inversions by computing the precision matrix of the posterior distribution instead of the covariance. - -The math in this function corresponds to eq. B-4.143 -""" -function bayesian_discrimination_boundary(prior_w, X::Matrix, y::Vector{Bool}) - m_0 = mean(prior_w) - p_0 = precision(prior_w) - negative_unnormalized_posterior = w -> -log_likelihood(w, X, y) - logpdf(prior_w, w) - MAP_w = Optim.minimizer(optimize(negative_unnormalized_posterior, zeros(3))) - σ_n = logistic.((2y .- 1) .* (X' * MAP_w)) - inv_Σ = p_0 - for i in 1:length(y) - slice = view(X, :, i) - inv_Σ .+= σ_n[i] * (1.0 - σ_n[i]) .* (slice * slice') - end - - return MvNormalMeanPrecision(MAP_w, inv_Σ) -end - -# ╔═╡ fd908bf5-71a1-4ae8-8416-cc1fdf084dcb -""" -Computes the predictive posterior eq. B-4.152 using the given approximation to the sigmoid function. -""" -function predictive_posterior(x, weight_posterior) - λsq = π / 8 - wN = mean(weight_posterior) - μ = wN' * x - σ = x' * cov(weight_posterior) * x - query_point = μ / (sqrt(inv(λsq) + σ )) - return normcdf(0, 1, query_point) -end - -# ╔═╡ cf829697-6283-4d2f-b0dd-bbfbd689a145 -md""" -#### Data Generation -""" - -# ╔═╡ 5e4bb719-ea9b-4a30-8800-5d753f405fd1 -X, y = generate_dataset(N); # Generate data set, collect in matrix X and vector y - -# ╔═╡ 6b56ec96-4b9d-4281-bd63-061df324867f -X_c1 = X[:,findall(.!y)]' # Split X based on class label - -# ╔═╡ f8bb4fcd-9b20-44e5-8e22-e792e74b69df -X_c2 = X[:,findall(y)]' - -# ╔═╡ b5a19a34-b210-41ec-853d-c5df13ae17ce -X_test = [3.75; 1.0]; # Features of 'new' data point - -# ╔═╡ a65ca01a-0e9a-42cb-b1d7-648102a77eb5 -function plot_dataset() - result = scatter(X_c1[:,1], X_c1[:,2],markersize=4, label=L"y=0", xlabel=L"x_1", ylabel=L"x_2", xlims=(-1.6, 9), ylims=(-2, 7)) - scatter!(X_c2[:,1], X_c2[:,2],markersize=4, label=L"y=1") - scatter!([X_test[1]], [X_test[2]], markersize=7, marker=:star, label=L"y=?") - plot!(legend=:bottomright) - return result -end - -# ╔═╡ d29ccc9e-d4a6-46ae-b907-2bc68c8d99bc -plot_dataset() - -# ╔═╡ f37ac438-cd56-4a09-bc8e-a75469955a2f -let - d1 = fit_mle(MvNormal, X_c1') - d2 = fit_mle(MvNormal, X_c2') - - plot_dataset() - - xrange = range(-1.6, 9; length=20) - yrange = range(-2, 7; length=15) - - contour!( - xrange, yrange, - (x,y) -> pdf(d1, [x,y]); - opacity=.4, - color=:blues, - ) - - - contour!( - xrange, yrange, - (x,y) -> pdf(d2, [x,y]); - opacity=.4, - color=:red, - colorbar=nothing, - ) -end - -# ╔═╡ fce5d561-ea76-4bd8-9cce-6f707f72fc60 -bayesian_plot = let - X_ext = vcat(X, ones(1, length(y))) - - # Define a prior distribution over parameters, play with this to see the result change! - prior = MvNormalMeanCovariance(zeros(3), 100 .* diagm(ones(3))) - posterior = bayesian_discrimination_boundary(prior, X_ext, y) - - # Plot 50% boundary - θ = mean(posterior) - disc_boundary(x1) = -1 / θ[2] * (θ[1]*x1 + θ[3]) - plot_dataset() - plot!([-2., 10.], disc_boundary; label="Discr. boundary", linewidth=2) - - # Plot heatmap - xrange = range(-1.6, 9; length=50) - yrange = range(-2, 7; length=30) - heatmap!( - xrange, yrange, (x,y) -> predictive_posterior([x, y, 1], posterior); - alpha=0.5, color=:redblue, - ) -end; - -# ╔═╡ 75076ca1-7226-4229-8e70-06cc586507c3 -bayesian_plot - -# ╔═╡ 00000000-0000-0000-0000-000000000001 -PLUTO_PROJECT_TOML_CONTENTS = """ -[deps] -BayesBase = "b4ee3484-f114-42fe-b91c-797d54a0c67e" -BmlipTeachingTools = "656a7065-6f73-6c65-7465-6e646e617262" -Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" -ExponentialFamily = "62312e5e-252a-4322-ace9-a5f4bf9b357b" -LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -MarkdownLiteral = "736d6165-7244-6769-4267-6b50796e6954" -Optim = "429524aa-4258-5aef-a3af-852621145aeb" -Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -StatsFuns = "4c63d2b9-4356-54db-8cca-17b64c39e42c" - -[compat] -BayesBase = "~1.5.8" -BmlipTeachingTools = "~1.3.1" -Distributions = "~0.25.122" -ExponentialFamily = "~2.1.1" -LaTeXStrings = "~1.4.0" -LogExpFunctions = "~0.3.29" -MarkdownLiteral = "~0.1.2" -Optim = "~1.13.2" -Plots = "~1.40.17" -StatsFuns = "~1.5.0" -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000002 -PLUTO_MANIFEST_TOML_CONTENTS = """ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.12.1" -manifest_format = "2.0" -project_hash = "6c3dd68af2e626ed33e0c26a2dd1c4e83dc100b4" - -[[deps.ADTypes]] -git-tree-sha1 = "27cecae79e5cc9935255f90c53bb831cc3c870d7" -uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -version = "1.18.0" - - [deps.ADTypes.extensions] - ADTypesChainRulesCoreExt = "ChainRulesCore" - ADTypesConstructionBaseExt = "ConstructionBase" - ADTypesEnzymeCoreExt = "EnzymeCore" - - [deps.ADTypes.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" - EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" - -[[deps.AbstractPlutoDingetjes]] -deps = ["Pkg"] -git-tree-sha1 = "6e1d2a35f2f90a4bc7c2ed98079b2ba09c35b83a" -uuid = "6e696c72-6542-2067-7265-42206c756150" -version = "1.3.2" - -[[deps.Adapt]] -deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "7e35fca2bdfba44d797c53dfe63a51fabf39bfc0" -uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.4.0" -weakdeps = ["SparseArrays", "StaticArrays"] - - [deps.Adapt.extensions] - AdaptSparseArraysExt = "SparseArrays" - AdaptStaticArraysExt = "StaticArrays" - -[[deps.AliasTables]] -deps = ["PtrArrays", "Random"] -git-tree-sha1 = "9876e1e164b144ca45e9e3198d0b689cadfed9ff" -uuid = "66dad0bd-aa9a-41b7-9441-69ab47430ed8" -version = "1.1.3" - -[[deps.ArgTools]] -uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.2" - -[[deps.ArrayInterface]] -deps = ["Adapt", "LinearAlgebra"] -git-tree-sha1 = "d2cd034553ee6ca084edaaf8ed6c9d50fd01555d" -uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.21.0" - - [deps.ArrayInterface.extensions] - ArrayInterfaceBandedMatricesExt = "BandedMatrices" - ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" - ArrayInterfaceCUDAExt = "CUDA" - ArrayInterfaceCUDSSExt = ["CUDSS", "CUDA"] - ArrayInterfaceChainRulesCoreExt = "ChainRulesCore" - ArrayInterfaceChainRulesExt = "ChainRules" - ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" - ArrayInterfaceMetalExt = "Metal" - ArrayInterfaceReverseDiffExt = "ReverseDiff" - ArrayInterfaceSparseArraysExt = "SparseArrays" - ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" - ArrayInterfaceTrackerExt = "Tracker" - - [deps.ArrayInterface.weakdeps] - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" - ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" - Metal = "dde4c033-4e86-420c-a63e-0dd931031962" - ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - -[[deps.ArrayLayouts]] -deps = ["FillArrays", "LinearAlgebra", "StaticArrays"] -git-tree-sha1 = "355ab2d61069927d4247cd69ad0e1f140b31e30d" -uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.12.0" -weakdeps = ["SparseArrays"] - - [deps.ArrayLayouts.extensions] - ArrayLayoutsSparseArraysExt = "SparseArrays" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -version = "1.11.0" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -version = "1.11.0" - -[[deps.BayesBase]] -deps = ["Distributions", "DomainSets", "LinearAlgebra", "Random", "SpecialFunctions", "StaticArrays", "Statistics", "StatsAPI", "StatsBase", "StatsFuns", "TinyHugeNumbers"] -git-tree-sha1 = "5b723bf6b1081cab4d263e425be097224e0f434f" -uuid = "b4ee3484-f114-42fe-b91c-797d54a0c67e" -version = "1.5.8" -weakdeps = ["FastCholesky"] - - [deps.BayesBase.extensions] - FastCholeskyExt = "FastCholesky" - -[[deps.BitFlags]] -git-tree-sha1 = "0691e34b3bb8be9307330f88d1a3c3f25466c24d" -uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" -version = "0.1.9" - -[[deps.BlockArrays]] -deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] -git-tree-sha1 = "79e651aa489a7879107d66e3d1948e9aa1b4055e" -uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" -version = "1.7.2" - - [deps.BlockArrays.extensions] - BlockArraysAdaptExt = "Adapt" - BlockArraysBandedMatricesExt = "BandedMatrices" - - [deps.BlockArrays.weakdeps] - Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - -[[deps.BmlipTeachingTools]] -deps = ["HypertextLiteral", "InteractiveUtils", "Markdown", "PlutoTeachingTools", "PlutoUI", "Reexport"] -git-tree-sha1 = "806eadb642467b05f9d930f0d127f1e6fa5130f0" -uuid = "656a7065-6f73-6c65-7465-6e646e617262" -version = "1.3.1" - -[[deps.Bzip2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1b96ea4a01afe0ea4090c5c8039690672dd13f2e" -uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" -version = "1.0.9+0" - -[[deps.Cairo_jll]] -deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "fde3bf89aead2e723284a8ff9cdf5b551ed700e8" -uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" -version = "1.18.5+0" - -[[deps.CodecZlib]] -deps = ["TranscodingStreams", "Zlib_jll"] -git-tree-sha1 = "962834c22b66e32aa10f7611c08c8ca4e20749a9" -uuid = "944b1d66-785c-5afd-91f1-9de20f533193" -version = "0.7.8" - -[[deps.ColorSchemes]] -deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"] -git-tree-sha1 = "b0fd3f56fa442f81e0a47815c92245acfaaa4e34" -uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" -version = "3.31.0" - -[[deps.ColorTypes]] -deps = ["FixedPointNumbers", "Random"] -git-tree-sha1 = "67e11ee83a43eb71ddc950302c53bf33f0690dfe" -uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -version = "0.12.1" -weakdeps = ["StyledStrings"] - - [deps.ColorTypes.extensions] - StyledStringsExt = "StyledStrings" - -[[deps.ColorVectorSpace]] -deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "Requires", "Statistics", "TensorCore"] -git-tree-sha1 = "8b3b6f87ce8f65a2b4f857528fd8d70086cd72b1" -uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" -version = "0.11.0" -weakdeps = ["SpecialFunctions"] - - [deps.ColorVectorSpace.extensions] - SpecialFunctionsExt = "SpecialFunctions" - -[[deps.Colors]] -deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] -git-tree-sha1 = "37ea44092930b1811e666c3bc38065d7d87fcc74" -uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" -version = "0.13.1" - -[[deps.Combinatorics]] -git-tree-sha1 = "8010b6bb3388abe68d95743dcbea77650bb2eddf" -uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" -version = "1.0.3" - -[[deps.CommonMark]] -deps = ["PrecompileTools"] -git-tree-sha1 = "351d6f4eaf273b753001b2de4dffb8279b100769" -uuid = "a80b9123-70ca-4bc0-993e-6e3bcb318db6" -version = "0.9.1" - -[[deps.CommonSubexpressions]] -deps = ["MacroTools"] -git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" -uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.1" - -[[deps.Compat]] -deps = ["TOML", "UUIDs"] -git-tree-sha1 = "9d8a54ce4b17aa5bdce0ea5c34bc5e7c340d16ad" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.18.1" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.3.0+1" - -[[deps.CompositeTypes]] -git-tree-sha1 = "bce26c3dab336582805503bed209faab1c279768" -uuid = "b152e2b5-7a66-4b01-a709-34e65c35f657" -version = "0.1.4" - -[[deps.ConcurrentUtilities]] -deps = ["Serialization", "Sockets"] -git-tree-sha1 = "d9d26935a0bcffc87d2613ce14c527c99fc543fd" -uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" -version = "2.5.0" - -[[deps.ConstructionBase]] -git-tree-sha1 = "b4b092499347b18a015186eae3042f72267106cb" -uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.6.0" -weakdeps = ["IntervalSets", "LinearAlgebra", "StaticArrays"] - - [deps.ConstructionBase.extensions] - ConstructionBaseIntervalSetsExt = "IntervalSets" - ConstructionBaseLinearAlgebraExt = "LinearAlgebra" - ConstructionBaseStaticArraysExt = "StaticArrays" - -[[deps.Contour]] -git-tree-sha1 = "439e35b0b36e2e5881738abc8857bd92ad6ff9a8" -uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" -version = "0.6.3" - -[[deps.DataAPI]] -git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" -uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.16.0" - -[[deps.DataStructures]] -deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "4e1fe97fdaed23e9dc21d4d664bea76b65fc50a0" -uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.22" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -version = "1.11.0" - -[[deps.Dbus_jll]] -deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "473e9afc9cf30814eb67ffa5f2db7df82c3ad9fd" -uuid = "ee1fde0b-3d02-5ea6-8484-8dfef6360eab" -version = "1.16.2+0" - -[[deps.DelimitedFiles]] -deps = ["Mmap"] -git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" -uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" -version = "1.9.1" - -[[deps.DiffResults]] -deps = ["StaticArraysCore"] -git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" -uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" -version = "1.1.0" - -[[deps.DiffRules]] -deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] -git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" -uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" -version = "1.15.1" - -[[deps.DifferentiationInterface]] -deps = ["ADTypes", "LinearAlgebra"] -git-tree-sha1 = "529bebbc74b36a4cfea09dd2aecb1288cd713a6d" -uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" -version = "0.7.9" - - [deps.DifferentiationInterface.extensions] - DifferentiationInterfaceChainRulesCoreExt = "ChainRulesCore" - DifferentiationInterfaceDiffractorExt = "Diffractor" - DifferentiationInterfaceEnzymeExt = ["EnzymeCore", "Enzyme"] - DifferentiationInterfaceFastDifferentiationExt = "FastDifferentiation" - DifferentiationInterfaceFiniteDiffExt = "FiniteDiff" - DifferentiationInterfaceFiniteDifferencesExt = "FiniteDifferences" - DifferentiationInterfaceForwardDiffExt = ["ForwardDiff", "DiffResults"] - DifferentiationInterfaceGPUArraysCoreExt = "GPUArraysCore" - DifferentiationInterfaceGTPSAExt = "GTPSA" - DifferentiationInterfaceMooncakeExt = "Mooncake" - DifferentiationInterfacePolyesterForwardDiffExt = ["PolyesterForwardDiff", "ForwardDiff", "DiffResults"] - DifferentiationInterfaceReverseDiffExt = ["ReverseDiff", "DiffResults"] - DifferentiationInterfaceSparseArraysExt = "SparseArrays" - DifferentiationInterfaceSparseConnectivityTracerExt = "SparseConnectivityTracer" - DifferentiationInterfaceSparseMatrixColoringsExt = "SparseMatrixColorings" - DifferentiationInterfaceStaticArraysExt = "StaticArrays" - DifferentiationInterfaceSymbolicsExt = "Symbolics" - DifferentiationInterfaceTrackerExt = "Tracker" - DifferentiationInterfaceZygoteExt = ["Zygote", "ForwardDiff"] - - [deps.DifferentiationInterface.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - DiffResults = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" - Diffractor = "9f5e2b26-1114-432f-b630-d3fe2085c51c" - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" - FastDifferentiation = "eb9bf01b-bf85-4b60-bf87-ee5de06c00be" - FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" - FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000" - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" - GTPSA = "b27dd330-f138-47c5-815b-40db9dd9b6e8" - Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" - PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b" - ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5" - SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" - -[[deps.Distributed]] -deps = ["Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" -version = "1.11.0" - -[[deps.Distributions]] -deps = ["AliasTables", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] -git-tree-sha1 = "3bc002af51045ca3b47d2e1787d6ce02e68b943a" -uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.122" - - [deps.Distributions.extensions] - DistributionsChainRulesCoreExt = "ChainRulesCore" - DistributionsDensityInterfaceExt = "DensityInterface" - DistributionsTestExt = "Test" - - [deps.Distributions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - DensityInterface = "b429d917-457f-4dbc-8f4c-0cc954292b1d" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.DocStringExtensions]] -git-tree-sha1 = "7442a5dfe1ebb773c29cc2962a8980f47221d76c" -uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.5" - -[[deps.DomainSets]] -deps = ["CompositeTypes", "IntervalSets", "LinearAlgebra", "StaticArrays"] -git-tree-sha1 = "c249d86e97a7e8398ce2068dce4c078a1c3464de" -uuid = "5b8099bc-c8ec-5219-889f-1d9e522a28bf" -version = "0.7.16" - - [deps.DomainSets.extensions] - DomainSetsMakieExt = "Makie" - DomainSetsRandomExt = "Random" - - [deps.DomainSets.weakdeps] - Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" - Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - -[[deps.Downloads]] -deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] -uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -version = "1.6.0" - -[[deps.EnumX]] -git-tree-sha1 = "bddad79635af6aec424f53ed8aad5d7555dc6f00" -uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" -version = "1.0.5" - -[[deps.EpollShim_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "8a4be429317c42cfae6a7fc03c31bad1970c310d" -uuid = "2702e6a9-849d-5ed8-8c21-79e8b8f9ee43" -version = "0.0.20230411+1" - -[[deps.ExceptionUnwrapping]] -deps = ["Test"] -git-tree-sha1 = "d36f682e590a83d63d1c7dbd287573764682d12a" -uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" -version = "0.1.11" - -[[deps.Expat_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "27af30de8b5445644e8ffe3bcb0d72049c089cf1" -uuid = "2e619515-83b5-522b-bb60-26c02a35a201" -version = "2.7.3+0" - -[[deps.ExponentialFamily]] -deps = ["BayesBase", "BlockArrays", "Distributions", "DomainSets", "FastCholesky", "FillArrays", "ForwardDiff", "HCubature", "HypergeometricFunctions", "IntervalSets", "IrrationalConstants", "LinearAlgebra", "LogExpFunctions", "PositiveFactorizations", "Random", "SparseArrays", "SpecialFunctions", "StaticArrays", "StatsBase", "StatsFuns", "TinyHugeNumbers"] -git-tree-sha1 = "8351e116e111c97ad57718851da00ae5a5f92e0c" -uuid = "62312e5e-252a-4322-ace9-a5f4bf9b357b" -version = "2.1.1" - -[[deps.FFMPEG]] -deps = ["FFMPEG_jll"] -git-tree-sha1 = "83dc665d0312b41367b7263e8a4d172eac1897f4" -uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" -version = "0.4.4" - -[[deps.FFMPEG_jll]] -deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] -git-tree-sha1 = "3a948313e7a41eb1db7a1e733e6335f17b4ab3c4" -uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" -version = "7.1.1+0" - -[[deps.FastCholesky]] -deps = ["LinearAlgebra", "PositiveFactorizations"] -git-tree-sha1 = "1c0a81e006e40e9fcbd5f6f6cb42ac2700f86889" -uuid = "2d5283b6-8564-42b6-bb00-83ed8e915756" -version = "1.4.3" -weakdeps = ["StaticArraysCore"] - - [deps.FastCholesky.extensions] - StaticArraysCoreExt = "StaticArraysCore" - -[[deps.FileWatching]] -uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" -version = "1.11.0" - -[[deps.FillArrays]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "173e4d8f14230a7523ae11b9a3fa9edb3e0efd78" -uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.14.0" -weakdeps = ["PDMats", "SparseArrays", "Statistics"] - - [deps.FillArrays.extensions] - FillArraysPDMatsExt = "PDMats" - FillArraysSparseArraysExt = "SparseArrays" - FillArraysStatisticsExt = "Statistics" - -[[deps.FiniteDiff]] -deps = ["ArrayInterface", "LinearAlgebra", "Setfield"] -git-tree-sha1 = "9340ca07ca27093ff68418b7558ca37b05f8aeb1" -uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" -version = "2.29.0" - - [deps.FiniteDiff.extensions] - FiniteDiffBandedMatricesExt = "BandedMatrices" - FiniteDiffBlockBandedMatricesExt = "BlockBandedMatrices" - FiniteDiffSparseArraysExt = "SparseArrays" - FiniteDiffStaticArraysExt = "StaticArrays" - - [deps.FiniteDiff.weakdeps] - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.FixedPointNumbers]] -deps = ["Statistics"] -git-tree-sha1 = "05882d6995ae5c12bb5f36dd2ed3f61c98cbb172" -uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" -version = "0.8.5" - -[[deps.Fontconfig_jll]] -deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Zlib_jll"] -git-tree-sha1 = "f85dac9a96a01087df6e3a749840015a0ca3817d" -uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" -version = "2.17.1+0" - -[[deps.Format]] -git-tree-sha1 = "9c68794ef81b08086aeb32eeaf33531668d5f5fc" -uuid = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8" -version = "1.3.7" - -[[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] -git-tree-sha1 = "ba6ce081425d0afb2bedd00d9884464f764a9225" -uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "1.2.2" -weakdeps = ["StaticArrays"] - - [deps.ForwardDiff.extensions] - ForwardDiffStaticArraysExt = "StaticArrays" - -[[deps.FreeType2_jll]] -deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "2c5512e11c791d1baed2049c5652441b28fc6a31" -uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" -version = "2.13.4+0" - -[[deps.FriBidi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "7a214fdac5ed5f59a22c2d9a885a16da1c74bbc7" -uuid = "559328eb-81f9-559d-9380-de523a88c83c" -version = "1.0.17+0" - -[[deps.Future]] -deps = ["Random"] -uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" -version = "1.11.0" - -[[deps.GLFW_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll", "libdecor_jll", "xkbcommon_jll"] -git-tree-sha1 = "fcb0584ff34e25155876418979d4c8971243bb89" -uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" -version = "3.4.0+2" - -[[deps.GR]] -deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Preferences", "Printf", "Qt6Wayland_jll", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "p7zip_jll"] -git-tree-sha1 = "1828eb7275491981fa5f1752a5e126e8f26f8741" -uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" -version = "0.73.17" - -[[deps.GR_jll]] -deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "FreeType2_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "27299071cc29e409488ada41ec7643e0ab19091f" -uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" -version = "0.73.17+0" - -[[deps.GettextRuntime_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll"] -git-tree-sha1 = "45288942190db7c5f760f59c04495064eedf9340" -uuid = "b0724c58-0f36-5564-988d-3bb0596ebc4a" -version = "0.22.4+0" - -[[deps.Ghostscript_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Zlib_jll"] -git-tree-sha1 = "38044a04637976140074d0b0621c1edf0eb531fd" -uuid = "61579ee1-b43e-5ca0-a5da-69d92c66a64b" -version = "9.55.1+0" - -[[deps.Glib_jll]] -deps = ["Artifacts", "GettextRuntime_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "50c11ffab2a3d50192a228c313f05b5b5dc5acb2" -uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" -version = "2.86.0+0" - -[[deps.Graphite2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "8a6dbda1fd736d60cc477d99f2e7a042acfa46e8" -uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" -version = "1.3.15+0" - -[[deps.Grisu]] -git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" -uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" -version = "1.0.2" - -[[deps.HCubature]] -deps = ["Combinatorics", "DataStructures", "LinearAlgebra", "QuadGK", "StaticArrays"] -git-tree-sha1 = "19ef9f0cb324eed957b7fe7257ac84e8ed8a48ec" -uuid = "19dc6840-f33b-545b-b366-655c7e3ffd49" -version = "1.7.0" - -[[deps.HTTP]] -deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "PrecompileTools", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "5e6fe50ae7f23d171f44e311c2960294aaa0beb5" -uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.10.19" - -[[deps.HarfBuzz_jll]] -deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll"] -git-tree-sha1 = "f923f9a774fcf3f5cb761bfa43aeadd689714813" -uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" -version = "8.5.1+0" - -[[deps.HypergeometricFunctions]] -deps = ["LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] -git-tree-sha1 = "68c173f4f449de5b438ee67ed0c9c748dc31a2ec" -uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" -version = "0.3.28" - -[[deps.Hyperscript]] -deps = ["Test"] -git-tree-sha1 = "179267cfa5e712760cd43dcae385d7ea90cc25a4" -uuid = "47d2ed2b-36de-50cf-bf87-49c2cf4b8b91" -version = "0.0.5" - -[[deps.HypertextLiteral]] -deps = ["Tricks"] -git-tree-sha1 = "7134810b1afce04bbc1045ca1985fbe81ce17653" -uuid = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2" -version = "0.9.5" - -[[deps.IOCapture]] -deps = ["Logging", "Random"] -git-tree-sha1 = "b6d6bfdd7ce25b0f9b2f6b3dd56b2673a66c8770" -uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" -version = "0.2.5" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -version = "1.11.0" - -[[deps.IntervalSets]] -git-tree-sha1 = "5fbb102dcb8b1a858111ae81d56682376130517d" -uuid = "8197267c-284f-5f27-9208-e0e47529a953" -version = "0.7.11" -weakdeps = ["Random", "RecipesBase", "Statistics"] - - [deps.IntervalSets.extensions] - IntervalSetsRandomExt = "Random" - IntervalSetsRecipesBaseExt = "RecipesBase" - IntervalSetsStatisticsExt = "Statistics" - -[[deps.IrrationalConstants]] -git-tree-sha1 = "b2d91fe939cae05960e760110b328288867b5758" -uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.6" - -[[deps.JLFzf]] -deps = ["REPL", "Random", "fzf_jll"] -git-tree-sha1 = "82f7acdc599b65e0f8ccd270ffa1467c21cb647b" -uuid = "1019f520-868f-41f5-a6de-eb00f4b6a39c" -version = "0.1.11" - -[[deps.JLLWrappers]] -deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "0533e564aae234aff59ab625543145446d8b6ec2" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.7.1" - -[[deps.JSON]] -deps = ["Dates", "Mmap", "Parsers", "Unicode"] -git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" -uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.21.4" - -[[deps.JpegTurbo_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "4255f0032eafd6451d707a51d5f0248b8a165e4d" -uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "3.1.3+0" - -[[deps.JuliaSyntaxHighlighting]] -deps = ["StyledStrings"] -uuid = "ac6e5ff7-fb65-4e79-a425-ec3bc9c03011" -version = "1.12.0" - -[[deps.LAME_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "059aabebaa7c82ccb853dd4a0ee9d17796f7e1bc" -uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" -version = "3.100.3+0" - -[[deps.LERC_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "aaafe88dccbd957a8d82f7d05be9b69172e0cee3" -uuid = "88015f11-f218-50d7-93a8-a6af411a945d" -version = "4.0.1+0" - -[[deps.LLVMOpenMP_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "eb62a3deb62fc6d8822c0c4bef73e4412419c5d8" -uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" -version = "18.1.8+0" - -[[deps.LZO_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1c602b1127f4751facb671441ca72715cc95938a" -uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" -version = "2.10.3+0" - -[[deps.LaTeXStrings]] -git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" -uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.4.0" - -[[deps.Latexify]] -deps = ["Format", "Ghostscript_jll", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Requires"] -git-tree-sha1 = "44f93c47f9cd6c7e431f2f2091fcba8f01cd7e8f" -uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" -version = "0.16.10" - - [deps.Latexify.extensions] - DataFramesExt = "DataFrames" - SparseArraysExt = "SparseArrays" - SymEngineExt = "SymEngine" - TectonicExt = "tectonic_jll" - - [deps.Latexify.weakdeps] - DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - SymEngine = "123dc426-2d89-5057-bbad-38513e3affd8" - tectonic_jll = "d7dd28d6-a5e6-559c-9131-7eb760cdacc5" - -[[deps.LibCURL]] -deps = ["LibCURL_jll", "MozillaCACerts_jll"] -uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.4" - -[[deps.LibCURL_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll", "Zlib_jll", "nghttp2_jll"] -uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.11.1+1" - -[[deps.LibGit2]] -deps = ["LibGit2_jll", "NetworkOptions", "Printf", "SHA"] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -version = "1.11.0" - -[[deps.LibGit2_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll"] -uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.9.0+0" - -[[deps.LibSSH2_jll]] -deps = ["Artifacts", "Libdl", "OpenSSL_jll"] -uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.11.3+1" - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -version = "1.11.0" - -[[deps.Libffi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c8da7e6a91781c41a863611c7e966098d783c57a" -uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" -version = "3.4.7+0" - -[[deps.Libglvnd_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll", "Xorg_libXext_jll"] -git-tree-sha1 = "d36c21b9e7c172a44a10484125024495e2625ac0" -uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" -version = "1.7.1+1" - -[[deps.Libiconv_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "be484f5c92fad0bd8acfef35fe017900b0b73809" -uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" -version = "1.18.0+0" - -[[deps.Libmount_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "3acf07f130a76f87c041cfb2ff7d7284ca67b072" -uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" -version = "2.41.2+0" - -[[deps.Libtiff_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] -git-tree-sha1 = "f04133fe05eff1667d2054c53d59f9122383fe05" -uuid = "89763e89-9b03-5906-acba-b20f662cd828" -version = "4.7.2+0" - -[[deps.Libuuid_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "2a7a12fc0a4e7fb773450d17975322aa77142106" -uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" -version = "2.41.2+0" - -[[deps.LineSearches]] -deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"] -git-tree-sha1 = "4adee99b7262ad2a1a4bbbc59d993d24e55ea96f" -uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" -version = "7.4.0" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -version = "1.12.0" - -[[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" -uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.29" - - [deps.LogExpFunctions.extensions] - LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" - LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" - LogExpFunctionsInverseFunctionsExt = "InverseFunctions" - - [deps.LogExpFunctions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -version = "1.11.0" - -[[deps.LoggingExtras]] -deps = ["Dates", "Logging"] -git-tree-sha1 = "f00544d95982ea270145636c181ceda21c4e2575" -uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.2.0" - -[[deps.MIMEs]] -git-tree-sha1 = "c64d943587f7187e751162b3b84445bbbd79f691" -uuid = "6c6e2e6c-3030-632d-7369-2d6c69616d65" -version = "1.1.0" - -[[deps.MacroTools]] -git-tree-sha1 = "1e0228a030642014fe5cfe68c2c0a818f9e3f522" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.16" - -[[deps.Markdown]] -deps = ["Base64", "JuliaSyntaxHighlighting", "StyledStrings"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -version = "1.11.0" - -[[deps.MarkdownLiteral]] -deps = ["CommonMark", "HypertextLiteral"] -git-tree-sha1 = "f7d73634acd573bf3489df1ee0d270a5d6d3a7a3" -uuid = "736d6165-7244-6769-4267-6b50796e6954" -version = "0.1.2" - -[[deps.MbedTLS]] -deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] -git-tree-sha1 = "c067a280ddc25f196b5e7df3877c6b226d390aaf" -uuid = "739be429-bea8-5141-9913-cc70e7f3736d" -version = "1.1.9" - -[[deps.MbedTLS_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "3cce3511ca2c6f87b19c34ffc623417ed2798cbd" -uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.10+0" - -[[deps.Measures]] -git-tree-sha1 = "c13304c81eec1ed3af7fc20e75fb6b26092a1102" -uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" -version = "0.3.2" - -[[deps.Missings]] -deps = ["DataAPI"] -git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d" -uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" -version = "1.2.0" - -[[deps.Mmap]] -uuid = "a63ad114-7e13-5084-954f-fe012c677804" -version = "1.11.0" - -[[deps.MozillaCACerts_jll]] -uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2025.5.20" - -[[deps.NLSolversBase]] -deps = ["ADTypes", "DifferentiationInterface", "Distributed", "FiniteDiff", "ForwardDiff"] -git-tree-sha1 = "25a6638571a902ecfb1ae2a18fc1575f86b1d4df" -uuid = "d41bc354-129a-5804-8e4c-c37616107c6c" -version = "7.10.0" - -[[deps.NaNMath]] -deps = ["OpenLibm_jll"] -git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" -uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.1.3" - -[[deps.NetworkOptions]] -uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -version = "1.3.0" - -[[deps.Ogg_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "b6aa4566bb7ae78498a5e68943863fa8b5231b59" -uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" -version = "1.3.6+0" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.29+0" - -[[deps.OpenLibm_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.7+0" - -[[deps.OpenSSL]] -deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] -git-tree-sha1 = "f1a7e086c677df53e064e0fdd2c9d0b0833e3f6e" -uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" -version = "1.5.0" - -[[deps.OpenSSL_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "3.5.1+0" - -[[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" -uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.6+0" - -[[deps.Optim]] -deps = ["Compat", "EnumX", "FillArrays", "ForwardDiff", "LineSearches", "LinearAlgebra", "NLSolversBase", "NaNMath", "PositiveFactorizations", "Printf", "SparseArrays", "StatsBase"] -git-tree-sha1 = "61942645c38dd2b5b78e2082c9b51ab315315d10" -uuid = "429524aa-4258-5aef-a3af-852621145aeb" -version = "1.13.2" - - [deps.Optim.extensions] - OptimMOIExt = "MathOptInterface" - - [deps.Optim.weakdeps] - MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" - -[[deps.Opus_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c392fc5dd032381919e3b22dd32d6443760ce7ea" -uuid = "91d4177d-7536-5919-b921-800302f37372" -version = "1.5.2+0" - -[[deps.OrderedCollections]] -git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.8.1" - -[[deps.PCRE2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" -version = "10.44.0+1" - -[[deps.PDMats]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "d922b4d80d1e12c658da7785e754f4796cc1d60d" -uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" -version = "0.11.36" -weakdeps = ["StatsBase"] - - [deps.PDMats.extensions] - StatsBaseExt = "StatsBase" - -[[deps.Pango_jll]] -deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1f7f9bbd5f7a2e5a9f7d96e51c9754454ea7f60b" -uuid = "36c8627f-9965-5494-a995-c6b170f724f3" -version = "1.56.4+0" - -[[deps.Parameters]] -deps = ["OrderedCollections", "UnPack"] -git-tree-sha1 = "34c0e9ad262e5f7fc75b10a9952ca7692cfc5fbe" -uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a" -version = "0.12.3" - -[[deps.Parsers]] -deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "7d2f8f21da5db6a806faf7b9b292296da42b2810" -uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.8.3" - -[[deps.Pixman_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl"] -git-tree-sha1 = "db76b1ecd5e9715f3d043cec13b2ec93ce015d53" -uuid = "30392449-352a-5448-841d-b1acce4e97dc" -version = "0.44.2+0" - -[[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.12.0" -weakdeps = ["REPL"] - - [deps.Pkg.extensions] - REPLExt = "REPL" - -[[deps.PlotThemes]] -deps = ["PlotUtils", "Statistics"] -git-tree-sha1 = "41031ef3a1be6f5bbbf3e8073f210556daeae5ca" -uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a" -version = "3.3.0" - -[[deps.PlotUtils]] -deps = ["ColorSchemes", "Colors", "Dates", "PrecompileTools", "Printf", "Random", "Reexport", "StableRNGs", "Statistics"] -git-tree-sha1 = "3ca9a356cd2e113c420f2c13bea19f8d3fb1cb18" -uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" -version = "1.4.3" - -[[deps.Plots]] -deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "TOML", "UUIDs", "UnicodeFun", "UnitfulLatexify", "Unzip"] -git-tree-sha1 = "bfe839e9668f0c58367fb62d8757315c0eac8777" -uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -version = "1.40.20" - - [deps.Plots.extensions] - FileIOExt = "FileIO" - GeometryBasicsExt = "GeometryBasics" - IJuliaExt = "IJulia" - ImageInTerminalExt = "ImageInTerminal" - UnitfulExt = "Unitful" - - [deps.Plots.weakdeps] - FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" - GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326" - IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a" - ImageInTerminal = "d8c32880-2388-543b-8c61-d9f865259254" - Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - -[[deps.PlutoTeachingTools]] -deps = ["Downloads", "HypertextLiteral", "Latexify", "Markdown", "PlutoUI"] -git-tree-sha1 = "dacc8be63916b078b592806acd13bb5e5137d7e9" -uuid = "661c6b06-c737-4d37-b85c-46df65de6f69" -version = "0.4.6" - -[[deps.PlutoUI]] -deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "Downloads", "FixedPointNumbers", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "MIMEs", "Markdown", "Random", "Reexport", "URIs", "UUIDs"] -git-tree-sha1 = "3faff84e6f97a7f18e0dd24373daa229fd358db5" -uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" -version = "0.7.73" - -[[deps.PositiveFactorizations]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "17275485f373e6673f7e7f97051f703ed5b15b20" -uuid = "85a6dd25-e78a-55b7-8502-1745935b8125" -version = "0.2.4" - -[[deps.PrecompileTools]] -deps = ["Preferences"] -git-tree-sha1 = "07a921781cab75691315adc645096ed5e370cb77" -uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.3.3" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "0f27480397253da18fe2c12a4ba4eb9eb208bf3d" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.5.0" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -version = "1.11.0" - -[[deps.PtrArrays]] -git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" -uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" -version = "1.3.0" - -[[deps.Qt6Base_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Vulkan_Loader_jll", "Xorg_libSM_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_cursor_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "libinput_jll", "xkbcommon_jll"] -git-tree-sha1 = "34f7e5d2861083ec7596af8b8c092531facf2192" -uuid = "c0090381-4147-56d7-9ebc-da0b1113ec56" -version = "6.8.2+2" - -[[deps.Qt6Declarative_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6ShaderTools_jll"] -git-tree-sha1 = "da7adf145cce0d44e892626e647f9dcbe9cb3e10" -uuid = "629bc702-f1f5-5709-abd5-49b8460ea067" -version = "6.8.2+1" - -[[deps.Qt6ShaderTools_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll"] -git-tree-sha1 = "9eca9fc3fe515d619ce004c83c31ffd3f85c7ccf" -uuid = "ce943373-25bb-56aa-8eca-768745ed7b5a" -version = "6.8.2+1" - -[[deps.Qt6Wayland_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6Declarative_jll"] -git-tree-sha1 = "8f528b0851b5b7025032818eb5abbeb8a736f853" -uuid = "e99dba38-086e-5de3-a5b1-6e4c66e897c3" -version = "6.8.2+2" - -[[deps.QuadGK]] -deps = ["DataStructures", "LinearAlgebra"] -git-tree-sha1 = "9da16da70037ba9d701192e27befedefb91ec284" -uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" -version = "2.11.2" - - [deps.QuadGK.extensions] - QuadGKEnzymeExt = "Enzyme" - - [deps.QuadGK.weakdeps] - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - -[[deps.REPL]] -deps = ["InteractiveUtils", "JuliaSyntaxHighlighting", "Markdown", "Sockets", "StyledStrings", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" -version = "1.11.0" - -[[deps.Random]] -deps = ["SHA"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -version = "1.11.0" - -[[deps.RecipesBase]] -deps = ["PrecompileTools"] -git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" -uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "1.3.4" - -[[deps.RecipesPipeline]] -deps = ["Dates", "NaNMath", "PlotUtils", "PrecompileTools", "RecipesBase"] -git-tree-sha1 = "45cf9fd0ca5839d06ef333c8201714e888486342" -uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" -version = "0.6.12" - -[[deps.Reexport]] -git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" -uuid = "189a3867-3050-52da-a836-e630ba90ab69" -version = "1.2.2" - -[[deps.RelocatableFolders]] -deps = ["SHA", "Scratch"] -git-tree-sha1 = "ffdaf70d81cf6ff22c2b6e733c900c3321cab864" -uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" -version = "1.0.1" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.1" - -[[deps.Rmath]] -deps = ["Random", "Rmath_jll"] -git-tree-sha1 = "4395a4cad612f95c1d08352f8c53811d6af3060b" -uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" -version = "0.8.1" - -[[deps.Rmath_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "58cdd8fb2201a6267e1db87ff148dd6c1dbd8ad8" -uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" -version = "0.5.1+0" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.Scratch]] -deps = ["Dates"] -git-tree-sha1 = "9b81b8393e50b7d4e6d0a9f14e192294d3b7c109" -uuid = "6c6a2e73-6563-6170-7368-637461726353" -version = "1.3.0" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -version = "1.11.0" - -[[deps.Setfield]] -deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] -git-tree-sha1 = "c5391c6ace3bc430ca630251d02ea9687169ca68" -uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" -version = "1.1.2" - -[[deps.Showoff]] -deps = ["Dates", "Grisu"] -git-tree-sha1 = "91eddf657aca81df9ae6ceb20b959ae5653ad1de" -uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f" -version = "1.0.3" - -[[deps.SimpleBufferStream]] -git-tree-sha1 = "f305871d2f381d21527c770d4788c06c097c9bc1" -uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" -version = "1.2.0" - -[[deps.Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -version = "1.11.0" - -[[deps.SortingAlgorithms]] -deps = ["DataStructures"] -git-tree-sha1 = "64d974c2e6fdf07f8155b5b2ca2ffa9069b608d9" -uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" -version = "1.2.2" - -[[deps.SparseArrays]] -deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.12.0" - -[[deps.SpecialFunctions]] -deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "f2685b435df2613e25fc10ad8c26dddb8640f547" -uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.6.1" - - [deps.SpecialFunctions.extensions] - SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" - - [deps.SpecialFunctions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - -[[deps.StableRNGs]] -deps = ["Random"] -git-tree-sha1 = "95af145932c2ed859b63329952ce8d633719f091" -uuid = "860ef19b-820b-49d6-a774-d7a799459cd3" -version = "1.0.3" - -[[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "b8693004b385c842357406e3af647701fe783f98" -uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.15" - - [deps.StaticArrays.extensions] - StaticArraysChainRulesCoreExt = "ChainRulesCore" - StaticArraysStatisticsExt = "Statistics" - - [deps.StaticArrays.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - -[[deps.StaticArraysCore]] -git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" -uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.3" - -[[deps.Statistics]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.Statistics.extensions] - SparseArraysExt = ["SparseArrays"] - -[[deps.StatsAPI]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9d72a13a3f4dd3795a195ac5a44d7d6ff5f552ff" -uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" -version = "1.7.1" - -[[deps.StatsBase]] -deps = ["AliasTables", "DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "2c962245732371acd51700dbb268af311bddd719" -uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.34.6" - -[[deps.StatsFuns]] -deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] -git-tree-sha1 = "8e45cecc66f3b42633b8ce14d431e8e57a3e242e" -uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" -version = "1.5.0" - - [deps.StatsFuns.extensions] - StatsFunsChainRulesCoreExt = "ChainRulesCore" - StatsFunsInverseFunctionsExt = "InverseFunctions" - - [deps.StatsFuns.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.StyledStrings]] -uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b" -version = "1.11.0" - -[[deps.SuiteSparse]] -deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] -uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" - -[[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] -uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.8.3+2" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[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" -version = "1.11.0" - -[[deps.TinyHugeNumbers]] -git-tree-sha1 = "83c6abf376718345a85c071b249ef6692a8936d4" -uuid = "783c9a47-75a3-44ac-a16b-f1ab7b3acf04" -version = "1.0.3" - -[[deps.TranscodingStreams]] -git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742" -uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" -version = "0.11.3" - -[[deps.Tricks]] -git-tree-sha1 = "372b90fe551c019541fafc6ff034199dc19c8436" -uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" -version = "0.1.12" - -[[deps.URIs]] -git-tree-sha1 = "bef26fb046d031353ef97a82e3fdb6afe7f21b1a" -uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -version = "1.6.1" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -version = "1.11.0" - -[[deps.UnPack]] -git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" -uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" -version = "1.0.2" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -version = "1.11.0" - -[[deps.UnicodeFun]] -deps = ["REPL"] -git-tree-sha1 = "53915e50200959667e78a92a418594b428dffddf" -uuid = "1cfade01-22cf-5700-b092-accc4b62d6e1" -version = "0.4.1" - -[[deps.Unitful]] -deps = ["Dates", "LinearAlgebra", "Random"] -git-tree-sha1 = "6258d453843c466d84c17a58732dda5deeb8d3af" -uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" -version = "1.24.0" - - [deps.Unitful.extensions] - ConstructionBaseUnitfulExt = "ConstructionBase" - ForwardDiffExt = "ForwardDiff" - InverseFunctionsUnitfulExt = "InverseFunctions" - PrintfExt = "Printf" - - [deps.Unitful.weakdeps] - ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[deps.UnitfulLatexify]] -deps = ["LaTeXStrings", "Latexify", "Unitful"] -git-tree-sha1 = "af305cc62419f9bd61b6644d19170a4d258c7967" -uuid = "45397f5d-5981-4c77-b2b3-fc36d6e9b728" -version = "1.7.0" - -[[deps.Unzip]] -git-tree-sha1 = "ca0969166a028236229f63514992fc073799bb78" -uuid = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" -version = "0.2.0" - -[[deps.Vulkan_Loader_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Wayland_jll", "Xorg_libX11_jll", "Xorg_libXrandr_jll", "xkbcommon_jll"] -git-tree-sha1 = "2f0486047a07670caad3a81a075d2e518acc5c59" -uuid = "a44049a8-05dd-5a78-86c9-5fde0876e88c" -version = "1.3.243+0" - -[[deps.Wayland_jll]] -deps = ["Artifacts", "EpollShim_jll", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll"] -git-tree-sha1 = "96478df35bbc2f3e1e791bc7a3d0eeee559e60e9" -uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" -version = "1.24.0+0" - -[[deps.XZ_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "fee71455b0aaa3440dfdd54a9a36ccef829be7d4" -uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" -version = "5.8.1+0" - -[[deps.Xorg_libICE_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a3ea76ee3f4facd7a64684f9af25310825ee3668" -uuid = "f67eecfb-183a-506d-b269-f58e52b52d7c" -version = "1.1.2+0" - -[[deps.Xorg_libSM_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libICE_jll"] -git-tree-sha1 = "9c7ad99c629a44f81e7799eb05ec2746abb5d588" -uuid = "c834827a-8449-5923-a945-d239c165b7dd" -version = "1.2.6+0" - -[[deps.Xorg_libX11_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] -git-tree-sha1 = "b5899b25d17bf1889d25906fb9deed5da0c15b3b" -uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" -version = "1.8.12+0" - -[[deps.Xorg_libXau_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "aa1261ebbac3ccc8d16558ae6799524c450ed16b" -uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" -version = "1.0.13+0" - -[[deps.Xorg_libXcursor_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] -git-tree-sha1 = "6c74ca84bbabc18c4547014765d194ff0b4dc9da" -uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" -version = "1.2.4+0" - -[[deps.Xorg_libXdmcp_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "52858d64353db33a56e13c341d7bf44cd0d7b309" -uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" -version = "1.1.6+0" - -[[deps.Xorg_libXext_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "a4c0ee07ad36bf8bbce1c3bb52d21fb1e0b987fb" -uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" -version = "1.3.7+0" - -[[deps.Xorg_libXfixes_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "75e00946e43621e09d431d9b95818ee751e6b2ef" -uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" -version = "6.0.2+0" - -[[deps.Xorg_libXi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] -git-tree-sha1 = "a376af5c7ae60d29825164db40787f15c80c7c54" -uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" -version = "1.8.3+0" - -[[deps.Xorg_libXinerama_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll"] -git-tree-sha1 = "a5bc75478d323358a90dc36766f3c99ba7feb024" -uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" -version = "1.1.6+0" - -[[deps.Xorg_libXrandr_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXrender_jll"] -git-tree-sha1 = "aff463c82a773cb86061bce8d53a0d976854923e" -uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" -version = "1.5.5+0" - -[[deps.Xorg_libXrender_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "7ed9347888fac59a618302ee38216dd0379c480d" -uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" -version = "0.9.12+0" - -[[deps.Xorg_libxcb_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXau_jll", "Xorg_libXdmcp_jll"] -git-tree-sha1 = "bfcaf7ec088eaba362093393fe11aa141fa15422" -uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" -version = "1.17.1+0" - -[[deps.Xorg_libxkbfile_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "e3150c7400c41e207012b41659591f083f3ef795" -uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" -version = "1.1.3+0" - -[[deps.Xorg_xcb_util_cursor_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_jll", "Xorg_xcb_util_renderutil_jll"] -git-tree-sha1 = "9750dc53819eba4e9a20be42349a6d3b86c7cdf8" -uuid = "e920d4aa-a673-5f3a-b3d7-f755a4d47c43" -version = "0.1.6+0" - -[[deps.Xorg_xcb_util_image_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] -git-tree-sha1 = "f4fc02e384b74418679983a97385644b67e1263b" -uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b" -version = "0.4.1+0" - -[[deps.Xorg_xcb_util_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll"] -git-tree-sha1 = "68da27247e7d8d8dafd1fcf0c3654ad6506f5f97" -uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5" -version = "0.4.1+0" - -[[deps.Xorg_xcb_util_keysyms_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] -git-tree-sha1 = "44ec54b0e2acd408b0fb361e1e9244c60c9c3dd4" -uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7" -version = "0.4.1+0" - -[[deps.Xorg_xcb_util_renderutil_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] -git-tree-sha1 = "5b0263b6d080716a02544c55fdff2c8d7f9a16a0" -uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e" -version = "0.3.10+0" - -[[deps.Xorg_xcb_util_wm_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] -git-tree-sha1 = "f233c83cad1fa0e70b7771e0e21b061a116f2763" -uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361" -version = "0.4.2+0" - -[[deps.Xorg_xkbcomp_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxkbfile_jll"] -git-tree-sha1 = "801a858fc9fb90c11ffddee1801bb06a738bda9b" -uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" -version = "1.4.7+0" - -[[deps.Xorg_xkeyboard_config_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xkbcomp_jll"] -git-tree-sha1 = "00af7ebdc563c9217ecc67776d1bbf037dbcebf4" -uuid = "33bec58e-1273-512f-9401-5d533626f822" -version = "2.44.0+0" - -[[deps.Xorg_xtrans_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a63799ff68005991f9d9491b6e95bd3478d783cb" -uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" -version = "1.6.0+0" - -[[deps.Zlib_jll]] -deps = ["Libdl"] -uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.3.1+2" - -[[deps.Zstd_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "446b23e73536f84e8037f5dce465e92275f6a308" -uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" -version = "1.5.7+1" - -[[deps.eudev_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c3b0e6196d50eab0c5ed34021aaa0bb463489510" -uuid = "35ca27e7-8b34-5b7f-bca9-bdc33f59eb06" -version = "3.2.14+0" - -[[deps.fzf_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "b6a34e0e0960190ac2a4363a1bd003504772d631" -uuid = "214eeab7-80f7-51ab-84ad-2988db7cef09" -version = "0.61.1+0" - -[[deps.libaom_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "371cc681c00a3ccc3fbc5c0fb91f58ba9bec1ecf" -uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" -version = "3.13.1+0" - -[[deps.libass_jll]] -deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "125eedcb0a4a0bba65b657251ce1d27c8714e9d6" -uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" -version = "0.17.4+0" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.15.0+0" - -[[deps.libdecor_jll]] -deps = ["Artifacts", "Dbus_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pango_jll", "Wayland_jll", "xkbcommon_jll"] -git-tree-sha1 = "9bf7903af251d2050b467f76bdbe57ce541f7f4f" -uuid = "1183f4f0-6f2a-5f1a-908b-139f9cdfea6f" -version = "0.2.2+0" - -[[deps.libevdev_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "56d643b57b188d30cccc25e331d416d3d358e557" -uuid = "2db6ffa8-e38f-5e21-84af-90c45d0032cc" -version = "1.13.4+0" - -[[deps.libfdk_aac_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "646634dd19587a56ee2f1199563ec056c5f228df" -uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" -version = "2.0.4+0" - -[[deps.libinput_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "eudev_jll", "libevdev_jll", "mtdev_jll"] -git-tree-sha1 = "91d05d7f4a9f67205bd6cf395e488009fe85b499" -uuid = "36db933b-70db-51c0-b978-0f229ee0e533" -version = "1.28.1+0" - -[[deps.libpng_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "07b6a107d926093898e82b3b1db657ebe33134ec" -uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -version = "1.6.50+0" - -[[deps.libvorbis_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll"] -git-tree-sha1 = "11e1772e7f3cc987e9d3de991dd4f6b2602663a5" -uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" -version = "1.3.8+0" - -[[deps.mtdev_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "b4d631fd51f2e9cdd93724ae25b2efc198b059b1" -uuid = "009596ad-96f7-51b1-9f1b-5ce2d5e8a71e" -version = "1.1.7+0" - -[[deps.nghttp2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.64.0+1" - -[[deps.p7zip_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.5.0+2" - -[[deps.x264_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "14cc7083fc6dff3cc44f2bc435ee96d06ed79aa7" -uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a" -version = "10164.0.1+0" - -[[deps.x265_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "e7b67590c14d487e734dcb925924c5dc43ec85f3" -uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" -version = "4.1.0+0" - -[[deps.xkbcommon_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] -git-tree-sha1 = "fbf139bce07a534df0e699dbb5f5cc9346f95cc1" -uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" -version = "1.9.2+0" -""" - -# ╔═╡ Cell order: -# ╟─25eefb10-d294-11ef-0734-2daf18636e8e -# ╟─e7c45ff8-9fa2-4ea3-a06f-5769d877540e -# ╟─25ef12bc-d294-11ef-1557-d98ba829a804 -# ╟─fe66a986-2f55-4417-a71d-b3b99f6369cc -# ╟─25ef2806-d294-11ef-3cb6-0f3e76b9177e -# ╟─4ceede48-a4d5-446b-bb34-26cec4af357a -# ╟─d29ccc9e-d4a6-46ae-b907-2bc68c8d99bc -# ╟─7e7cab21-09ab-4d06-9716-ab7864b229ab -# ╟─aeee1072-5173-4eae-8027-3fbf2e338d95 -# ╟─f37ac438-cd56-4a09-bc8e-a75469955a2f -# ╟─93083660-6a49-4147-b00c-d62a4453f222 -# ╟─d1bbdc6a-e5ff-4cd6-9175-860b5ec04f3c -# ╟─25ef6ece-d294-11ef-270a-999c8d457b24 -# ╟─25ef7f54-d294-11ef-3f05-0d85fe6e7a17 -# ╟─25efa2fe-d294-11ef-172f-9bb09277f59e -# ╟─25efbe42-d294-11ef-3e4e-cfea366757da -# ╟─25efd6b6-d294-11ef-3b21-6363ef531eb5 -# ╟─25f02ac6-d294-11ef-26c4-f142b8ac4b5f -# ╟─25f0adde-d294-11ef-353e-4b4773df9ff5 -# ╟─22121f20-6b90-4782-8bed-25486cc23ae7 -# ╟─56cae988-2f51-4618-8676-f46fa2924ea3 -# ╟─66351c02-1921-44dc-b461-84a536c40fd5 -# ╟─e3173267-bd90-47df-9d7f-bd9fd3f688ac -# ╟─25f12528-d294-11ef-0c65-97c61935e9c2 -# ╟─25f14226-d294-11ef-369f-e545d5fe2700 -# ╟─25f14f82-d294-11ef-02fb-2dc632b8f118 -# ╟─25f15e0a-d294-11ef-3737-79a68c9b3c61 -# ╟─22f4972e-0f6d-49a1-bd1f-10569b77a852 -# ╟─25f19ed8-d294-11ef-3298-efa16dda1dde -# ╟─25f1390c-d294-11ef-364d-17e4c93b9a57 -# ╟─bda07a2e-3769-4ffe-9bc5-2b8a515247f6 -# ╟─25f1ab08-d294-11ef-32ed-493792e121b7 -# ╟─25f1b404-d294-11ef-1c3a-a5a8142bb202 -# ╟─25f1c2a0-d294-11ef-009c-69b64e87e5fb -# ╟─3422dd29-6da9-4e0f-a4ab-646f223c2244 -# ╟─8b0bb225-bdc1-45ec-bd34-68d674d6f08d -# ╟─ae2b23f0-853e-4237-aab2-81c961f52cf6 -# ╟─e4cc517b-d3b5-4517-a28b-efb8aba24496 -# ╟─33b859f2-9ea8-4f8b-b0f8-08a19c6a96fc -# ╟─9704ee6a-e233-49f1-8c66-d81543927342 -# ╟─4ab4bcca-da6e-4137-858d-257c04388277 -# ╟─38b4854f-be02-4696-802f-2106481e3aea -# ╟─7932fff4-0568-49de-b34c-711e51487ae3 -# ╟─25f3bef2-d294-11ef-1438-e9f7e469336f -# ╟─aaf764da-cf1b-4bc7-83ea-6d25a80ca3ab -# ╟─75076ca1-7226-4229-8e70-06cc586507c3 -# ╟─69706576-0333-43bf-8523-e7838f373529 -# ╟─98ef7093-f8ed-4a44-a153-0a64ab483f65 -# ╠═fce5d561-ea76-4bd8-9cce-6f707f72fc60 -# ╟─0045e569-dc3c-4998-86da-9d96f599c599 -# ╟─25f365e2-d294-11ef-300e-9914333b1233 -# ╟─3b24b142-2239-4951-9177-ff87b5da4b68 -# ╟─ff31d8c1-db35-4c85-a609-67fc40e9e78d -# ╟─1f2bfcf4-fef4-4612-8683-d5c86a326eef -# ╟─25f3ff84-d294-11ef-0031-63b23d23324d -# ╟─5d91a2ae-975c-4913-b8ff-3df043cb1f03 -# ╟─25f41118-d294-11ef-13a8-3fa6587c1bf3 -# ╟─25f19230-d294-11ef-2dfd-6d4927e86f57 -# ╟─173e545a-9125-4dc4-8df4-c3aa84a4b88a -# ╟─557c4545-2208-43c9-9302-991e78202734 -# ╟─a00c545c-2274-4086-94ca-319d1436fa26 -# ╟─b94644f8-725d-49bf-9641-3dad8b647f45 -# ╟─9554ed0b-69dd-443c-9538-03a4117eeb78 -# ╟─6eee35ee-fd55-498f-9441-f18c2508de19 -# ╠═e379cc2a-43f8-432f-84fc-a88fd4f3ad0a -# ╠═a759653c-0da4-40b7-9e9e-1e3d2e4df4ea -# ╠═ad196ae6-c65e-4aaa-b0cc-bd72daa41952 -# ╠═616e84d7-063d-4d9d-99e4-56aecf3c7ee4 -# ╠═fcec3c3a-8b0b-4dfd-b010-66abbf330069 -# ╟─a65ca01a-0e9a-42cb-b1d7-648102a77eb5 -# ╟─b8790891-1546-48e0-9f96-e09eade31c12 -# ╟─b48f8800-473d-48e4-ab78-eb07653db7a5 -# ╠═1bfac9c5-e5cf-4a70-b077-11bb00cb1482 -# ╠═fd908bf5-71a1-4ae8-8416-cc1fdf084dcb -# ╟─cf829697-6283-4d2f-b0dd-bbfbd689a145 -# ╠═5e4bb719-ea9b-4a30-8800-5d753f405fd1 -# ╠═6b56ec96-4b9d-4281-bd63-061df324867f -# ╠═f8bb4fcd-9b20-44e5-8e22-e792e74b69df -# ╠═b5a19a34-b210-41ec-853d-c5df13ae17ce -# ╟─00000000-0000-0000-0000-000000000001 -# ╟─00000000-0000-0000-0000-000000000002 diff --git a/mlss/archive/Dynamic Models.jl b/mlss/archive/Dynamic Models.jl deleted file mode 100644 index eb3b897..0000000 --- a/mlss/archive/Dynamic Models.jl +++ /dev/null @@ -1,3591 +0,0 @@ -### A Pluto.jl notebook ### -# v0.20.19 - -#> [frontmatter] -#> image = "https://github.com/bmlip/course/blob/v2/assets/figures/Faragher-2012-cart-1.png?raw=true" -#> description = "Introduction to dynamic latent variable models, including HMMs and Kalman filters." -#> -#> [[frontmatter.author]] -#> name = "BMLIP" -#> url = "https://github.com/bmlip" - -using Markdown -using InteractiveUtils - -# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). -macro bind(def, element) - #! format: off - return quote - local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end - local el = $(esc(element)) - global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : iv(el) - el - end - #! format: on -end - -# ╔═╡ e66b2193-87c8-4645-bfcc-643ee006383a -using BmlipTeachingTools - -# ╔═╡ f2a42c4d-9607-4f50-bbda-9a9a4942faab -using RxInfer, LinearAlgebra - -# ╔═╡ 60201d93-64e8-42ce-85ab-8eb661223427 -using Plots, Distributions, Images, LaTeXStrings, StatsPlots - -# ╔═╡ 27289f68-d294-11ef-37d6-e399ed72a1d0 -title("Dynamic Models") - -# ╔═╡ 6107b57e-cda2-46fb-b6f8-bd0e3787516d -PlutoUI.TableOfContents() - -# ╔═╡ 2728adf0-d294-11ef-2467-f176bb42fb8b -md""" -## Preliminaries - -##### Goal - - * Introduction to dynamic (=temporal) Latent Variable Models, including the Hidden Markov Model and Kalman filter. - -##### Materials - - * Mandatory - - * These lecture notes - * Optional - - * [Bishop PRML](https://www.microsoft.com/en-us/research/wp-content/uploads/2006/01/Bishop-Pattern-Recognition-and-Machine-Learning-2006.pdf) (2006), pp.605-615 on Hidden Markov Models - * [Bishop PRML](https://www.microsoft.com/en-us/research/wp-content/uploads/2006/01/Bishop-Pattern-Recognition-and-Machine-Learning-2006.pdf) (2006), pp.635-641 on Kalman filters - * Faragher (2012), [Understanding the Basis of the Kalman Filter](https://github.com/bmlip/course/blob/main/assets/files/Faragher-2012-Understanding-the-Basis-of-the-Kalman-Filter.pdf) - * Minka (1999), [From Hidden Markov Models to Linear Dynamical Systems](https://github.com/bmlip/course/blob/main/assets/files/Minka-1999-from-HMM-to-LDS.pdf) - -""" - -# ╔═╡ 50c601c9-ec68-4155-932c-190bced1ac9a -challenge_statement("Tracking of Cart Position"; color="red", header_level=1) - -# ╔═╡ 2728b7c8-d294-11ef-06e6-5329a76c16be -md""" - -##### Problem - -We consider a one-dimensional cart position tracking problem, see [Faragher (2012)](https://github.com/bmlip/course/blob/main/assets/files/Faragher-2012-Understanding-the-Basis-of-the-Kalman-Filter.pdf). - -The equations of motion are given by - -```math -\begin{align*} -\begin{bmatrix} z_t \\ \dot{z_t}\end{bmatrix} &= \begin{bmatrix} 1 & \Delta t \\ 0 & 1\end{bmatrix} \begin{bmatrix} z_{t-1} \\ \dot z_{t-1}\end{bmatrix} + \begin{bmatrix} (\Delta t)^2/2 \\ \Delta t\end{bmatrix} u_t + \epsilon^{(z)}_t \,, \qquad \epsilon^{(z)}_t\sim \mathcal{N}(0,\Sigma_z) \\ -x_t &= \begin{bmatrix} z_t \\ \dot{z_t}\end{bmatrix} + \epsilon^{(x)}_t\,, \qquad \epsilon^{(x)}_t\sim \mathcal{N}(0,\Sigma_x) -\end{align*} -``` - -The hidden states are the position ``z_t`` and velocity ``\dot z_t`` of the cart. We can apply an external acceleration/breaking force ``u_t``. (Noisy) observations are represented by ``x_t``. - -![](https://github.com/bmlip/course/blob/v2/assets/figures/Faragher-2012-cart-1.png?raw=true) - -Task: Infer the position ``z_t`` after 10 time steps, i.e., infer ``p(z_{10}|x_{1:10})``. - - -""" - -# ╔═╡ 91fb40f2-8c2d-4e0e-8a8a-8d823ed869dc -md""" -Move the time step slider below to show the real cart position ``z_t`` (the vertical dashed line), and a (probabilistic) prediction for the measured position ``x_t``. -""" - -# ╔═╡ 6b7f6d3b-8ad6-434a-babe-2597e86299fa -md""" - - -##### Solution - -See later in this lecture. - - -""" - -# ╔═╡ fc919736-d9e3-4ca0-a53c-5fac18539ab5 -md""" -# Common Models for Ordered Sequences -""" - -# ╔═╡ 2728c344-d294-11ef-1c5e-8d601b7ac3f9 -md""" - - -In this lecture, we consider models where the sequence order of observations matters. - -We will use the notation ``x_t^T`` to denote the **ordered sequence** ``(x_t,x_{t+1},\ldots,x_T)`` and drop the subscript if ``t=1``, so ``x^T = x_1^T = \left(x_1,x_2,\ldots,x_T\right)``. - -""" - -# ╔═╡ 2728d136-d294-11ef-27bc-6de51ace159c -md""" - -## Autoregressive Model - -Assume that we wish to develop a generative model ``p( x^T )`` for the ordered time series ``x^T = \left(x_1,x_2,\ldots,x_T\right)``. - - -We cannot use the IID assumption ``p( x^T ) = \prod_t p(x_t )`` for a time series, since consecutive observations may have statistical dependencies. In general, we can *always* use the **chain rule** (a.k.a. **the general product rule**) - -```math -\begin{align*} -p(x^T) &= p(x_T|x^{T-1}) \,p(x^{T-1}) \\ - &= p(x_T|x^{T-1}) \,p(x_{T-1}|x^{T-2}) \cdots p(x_2|x_1)\,p(x_1) \\ - &= p(x_1)\prod_{t=2}^T p(x_t\,|\,x^{t-1}) -\end{align*} -``` - -which is true for any model ``p(x^T)``. - -In practice, we often wish to limit the depth of dependencies on past observations. A widely used approach is the ``K``-th order linear **Auto-Regressive** (AR) model, which restricts the dependency of ``x_t`` to the previous ``K`` samples. It is defined as - -```math -p(x_t \mid x^{t-1}) = \mathcal{N}\left(x_t \,\middle|\, \sum_{k=1}^K a_k x_{t-k},\, \sigma^2 \right), -``` - -where ``a_1, \ldots, a_K`` are the **autoregressive coefficients**, and ``\sigma^2`` is the noise variance. This model captures temporal structure by modeling each observation as a linear function of the preceding ``K`` values, plus Gaussian noise. - - -""" - -# ╔═╡ 73104616-8cb4-4665-b09b-1c771ecdf372 -keyconcept("", -"Dynamical systems do not obey the sample-by-sample independence assumption, but still can be specified, and state and parameter estimation equations can be solved by similar tools as for static models. -") - -# ╔═╡ 2728dece-d294-11ef-2dda-af89555d838f -md""" -## State-space Models - -A limitation of AR models is that they need a lot of parameters in order to create a flexible model. E.g., if ``x_t \in \mathbb{R}^M`` is an ``M``-dimensional time series, then the ``K``-th order AR model for ``x_t`` will have ``KM^2`` parameters. - -""" - -# ╔═╡ 2728e5c2-d294-11ef-1788-9b3699bb4ccd -md""" -Similar to our approach in Gaussian Mixture Models, we can introduce *additional structure* into temporal dependencies by incorporating latent (unobserved) variables ``z^{T} \triangleq (z_1, z_2, \dots, z_T)``, where each observation ``x_t`` is associated with a corresponding latent variable ``z_t``. - -In the context of dynamic systems, such observation-specific latent variables ``z_t`` are commonly referred to as **state variables**. - -A **state-space model** (SSM) is a probabilistic model used to describe time-evolving systems with latent (unobserved) state variables that generate observable data. It’s a general framework for modeling dynamical systems, widely used in signal processing, control theory, time series analysis, and machine learning. - -A state space model is defined by - -```math -\begin{align} - p(x^T,z^T) &= \underbrace{p(z_1)}_{\text{initial state}} \prod_{t=2}^T \underbrace{p(z_t\,|\,z_{t-1})}_{\text{state transitions}}\,\prod_{t=1}^T \underbrace{p(x_t\,|\,z_t)}_{\text{observations}} -\end{align} -``` - -The condition ``p(z_t\,|\,z^{t-1}) = p(z_t\,|\,z_{t-1})`` (``z_t`` only depends on the previous state ``z_{t-1}``) is called a ``1``-st order Markov condition. - - -""" - -# ╔═╡ 2729087c-d294-11ef-3f71-51112552f7b9 -md""" -The Forney-style factor graph for a state-space model looks as follows: - -""" - -# ╔═╡ 5d9d2972-0507-47a1-a726-26bb129f62f9 -@htl """ - - - -""" - -# ╔═╡ 63f422ca-ba15-41ad-b36b-7a6aa4cc5e2a -html""" - -""" - -# ╔═╡ 27290f78-d294-11ef-2ac4-b179be83b812 -md""" -## Hidden Markov Models - -A **Hidden Markov Model** (HMM) is a specific state-space model with *discrete-valued* state variables ``z_t``. - -Typically, ``z_t = (z_{t1},z_{t2},\ldots,z_{tK})`` is a ``K``-dimensional one-hot coded latent "class indicator" vector with transition probabilities ``a_{jk} \triangleq p(z_{tk}=1\,|\,z_{t-1,j}=1)``, or equivalently, - -```math -p(z_t|z_{t-1}) = \prod_{k=1}^K \prod_{j=1}^K a_{jk}^{z_{t-1,j}\cdot z_{tk}} \,, \tag{state transition} -``` - -which is usually accompanied by an initial state distribution ``p(z_{1k}=1) = \pi_k``. - -While the classical HMM assumes discrete observations, the general framework allows for arbitrary probabilistic observation models ``p(x_t | z_t)``. This flexibility enables coupling the discrete hidden state dynamics with rich observation models, including Gaussian, exponential family, or even neural network-based likelihoods. - - -""" - -# ╔═╡ 27295340-d294-11ef-3a56-131df0415315 -md""" -## Linear Dynamical Systems - -Another well-known state-space model with *continuous* state variables ``z_t \in \mathbb{R}`` is the **(Linear) Gaussian Dynamical System** (LGDS), which is defined as - -```math -\begin{align*} -p(z_t\,|\,z_{t-1}) &= \mathcal{N}\left(z_t \,|\, A z_{t-1},\,\Sigma_z\right) \tag{state transition}\\ -p(x_t\,|\,z_t) &= \mathcal{N}\left(x_t\,|\, C z_t,\,\Sigma_x\right) \tag{data generation}\\ -p(z_1) &= \mathcal{N}\left(z_1\,|\, \mu_1,\,\Sigma_1\right) \tag{initial state} -\end{align*} -``` - - - -""" - -# ╔═╡ 27296132-d294-11ef-0d39-9da05d6c20b7 -md""" -Note that the joint distribution over all states and observations ``\{(x_1,z_1),\ldots,(x_t,z_t)\}`` is a (large-dimensional) Gaussian distribution. This means that, in principle, every inference problem on the LGDS model also leads to a Gaussian distribution. - -""" - -# ╔═╡ 6bcabd28-f72b-47d9-b846-b1528f3758bb -keyconcept("", -md""" -A very common and flexible probabilistic dynamical model is the **state-space model**, -```math -\begin{align} - p(x^T,z^T) &= \underbrace{p(z_1)}_{\text{initial state}} \prod_{t=2}^T \underbrace{p(z_t\,|\,z_{t-1})}_{\text{state transitions}}\,\prod_{t=1}^T \underbrace{p(x_t\,|\,z_t)}_{\text{observations}}\,, -\end{align} -``` -with observations ``x_t`` and latent states ``z_t``. -""") - -# ╔═╡ 27298004-d294-11ef-06db-490237bf9408 -md""" -## Message Passing-based Inference in State-space models - -HMMs and LGDSs, including their many extensions, serve as fundamental building blocks in diverse information processing domains, ranging from speech and language modeling, robotic control, and autonomous navigation, to bioinformatics tasks such as DNA sequence analysis. - -Inference in probabilistic dynamic systems with temporal dependencies can quickly become cumbersome and error-prone when approached manually. A practical and scalable solution is to represent the generative model as a factor graph and perform automated message passing to infer the posterior distribution over the hidden variables. - -Here are some examples of message passing-based inference in dynamic models. - -##### Filtering - -Filtering (also known as state estimation) refers to the estimation of the latent state at time step ``t``, based on all observations up to and including time ``t``. The FFG below shows the needed messages to compute ``p(z_t|x_{1:t})``. - - -""" - -# ╔═╡ d51bd37b-a12f-426a-87ca-6d4e6701fdb4 -@htl """ - - - -""" - -# ╔═╡ 030d6de1-1f63-47d3-bea0-abe3ddf24be4 -md""" - - -##### Smoothing - -In contrast to filtering, which uses only past and current observations, smoothing aims to estimate a latent state by incorporating information from both past and future observations. This is achieved by passing backward messages through the factor graph, typically from later time steps toward earlier ones. - - -""" - -# ╔═╡ 99ef8d0f-679a-43d1-9bbb-91bd8ad725ec -@htl """ - - - -""" - -# ╔═╡ 69446a18-bb7d-45e2-b480-dcaa76fa66c0 -md""" -##### Prediction - -Prediction involves the estimation of a future state or observation based only on past (and possibly current) observations, without incorporating any future information. - -""" - -# ╔═╡ 620a77a8-50c4-4005-a41b-6a6221391434 -@htl """ - - - -""" - -# ╔═╡ 2f439fb0-012c-4318-bb8b-90c37d2ff43c -md""" -# Kalman Filtering -""" - -# ╔═╡ a24760e2-055a-4902-a78e-65aa59b80f68 -md""" - - -In the filtering setting, the posterior distribution ``p(z_t | x^t)`` is typically computed recursively, using the previous posterior ``p(z_{t-1} | x^{t-1})`` as a prior and incorporating the new observation ``x_t`` in a likelihood function. - -Generally, this recursive inference update can be efficiently processed by message passing on an FFG. For instance, the posterior ``p(z_2 | x_{1:2})`` can be computed from the previously inferred ``p(z_1 | x_1)`` (represented by "prior" message ``4``) and by incorporating the new observation ``x_2``, which is processed through messages ``5`` through ``8``. - -Technically, the solution to the recursive estimation (inference) of the hidden state ``z_t`` based on past observations in an LGDS is called a [**Kalman filter**](https://en.wikipedia.org/wiki/Kalman_filter). - -In a toolbox like RxInfer, Kalman filtering can be performed automatically and efficiently. For comparison, we manually derive the Kalman filter below. - -""" - -# ╔═╡ 27298d26-d294-11ef-080e-dbe7270d9191 -md""" -## An Analytical Derivation of the $(HTML("Kalman Filter")) - -""" - -# ╔═╡ 27299a12-d294-11ef-1026-ddb5ffc81543 -md""" - -##### Problem - - -Consider the following model specification (a scalar linear Gaussian dynamical system): - -```math -\begin{align} - p(z_t\,|\,z_{t-1}) &= \mathcal{N}(z_t\,|\,a z_{t-1},\sigma_z^2) \tag{state transition} \\ - p(x_t\,|\,z_t) &= \mathcal{N}(x_t\,|\,c z_t,\sigma_x^2) \tag{observation} -\end{align} -``` - -We are interested in computing ``p(z_t\,|\,x^t)`` from a given (previous) estimate - -```math -\begin{align} -p(z_{t-1}\,|\,x^{t-1}) = \mathcal{N}(z_{t-1} \,|\, \mu_{t-1}, \sigma_{t-1}^2) -\end{align} -``` -and a new observation ``x_t``. -""" - -# ╔═╡ 2729b6dc-d294-11ef-390f-6fa53c0b04f1 -md""" - -##### Solution - -Let's follow Bayes rule, - - -```math -\begin{align} -\overbrace{p(z_t\,|\,x^t)}^{\text{posterior}}& \cdot \overbrace{p(x_t\,|\,x^{t-1})}^{\text{evidence}} = p(x_t\,|\,z_t) \cdot p(z_t\,|\,x^{t-1}) \\ - &= p(x_t\,|\,z_t) \, \int p(z_t,z_{t-1}\,|\,x^{t-1}) \mathrm{d}z_{t-1} \\ - &= \underbrace{p(x_t\,|\,z_t)}_{\text{likelihood}} \, \int \underbrace{p(z_t\,|\,z_{t-1})}_{\text{state transition}} \, \underbrace{p(z_{t-1}\,|\,x^{t-1})}_{\text{prior}} \mathrm{d}z_{t-1} \\ - &= \mathcal{N}(x_t|c z_t, \sigma_x^2) \, \int \mathcal{N}(z_t\,|\,a z_{t-1},\sigma_z^2) \, \mathcal{N}(z_{t-1} \,|\, \mu_{t-1}, \sigma_{t-1}^2) \mathrm{d}z_{t-1} \quad \text{(KF-1)} - \end{align} -``` -This result (KF-1) comprises only Gaussians and can be further worked out to closed-form expressions for the posterior and evidence, resulting in - -```math -\begin{align} -p(z_{t}\,|\,x^{t}) &= \mathcal{N}(z_{t} \,|\, \mu_{t}, \sigma_{t}^2) \tag{posterior}\\ - p(x_t|x^{t-1}) &= \mathcal{N}\left(x_t \,|\, ca \mu_{t-1}, \sigma_x^2 + c^2(\sigma_z^2+a^2\sigma_{t-1}^2) \right) \tag{evidence} -\end{align} -``` - -where ``\mu_{t}`` and ``\sigma_{t}^2`` in the posterior Gaussian are recursively computed from ``\mu_{t-1}``, ``\sigma_{t-1}^2`` and new observation ``x_t`` by -```math -\begin{align*} - \rho_t^2 &= a^2 \sigma_{t-1}^2 + \sigma_z^2 \quad &&\text{(predicted variance)} \tag{KF-2a}\\ - K_t &= \frac{c \rho_t^2}{c^2 \rho_t^2 + \sigma_x^2} \quad &&\text{(Kalman gain)} \tag{KF-2b} \\ - \mu_t &= a \mu_{t-1} + K_t \cdot \left( x_t - c a \mu_{t-1}\right) \quad &&\text{(posterior mean)} \tag{KF-2c} \\ - \sigma_t^2 &= \left( 1 - c\cdot K_t \right) \rho_t^2 \quad &&\text{(posterior variance)} \tag{KF-2d} -\end{align*} -``` - -These last four equations (KF-2, the "Kalman filter update equations") correspond to messages 5–8 in the filtering FFG presented above. - -""" - -# ╔═╡ 2729c4ba-d294-11ef-1ccc-df1f4ef5f3d4 -Foldable("Proof of KF-2", -md""" -In the following, we often run into Gaussians of the form ``\mathcal{N}(x\,|\,cz,\sigma^2)`` that we need to rewrite as an argument of ``z``. We will use the following "mean-transformation" identity: - -```math -\mathcal{N}(x\,|\,cz,\sigma^2) = \frac{1}{c}\mathcal{N}\left(z \,\middle|\,\frac{x}{c},\left(\frac{\sigma}{c}\right)^2\right)\, \tag{1}. -``` - -Let's now further work out the Kalman filter, starting from Eq. KF-1: - -```math -\begin{align*} - \underbrace{\mathcal{N}(x_t|c z_t, \sigma_x^2)}_{\text{likelihood}} &\, \int \underbrace{\mathcal{N}(z_t\,|\,a z_{t-1},\sigma_z^2)}_{\substack{\text{state transition,} \\ \text{use (1)}} } \, \underbrace{\mathcal{N}(z_{t-1} \,|\, \mu_{t-1}, \sigma_{t-1}^2) }_{\text{prior}} \mathrm{d}z_{t-1} = \\ -&= \mathcal{N}(x_t|c z_t, \sigma_x^2) \, \int \frac{1}{a}\underbrace{\mathcal{N}\left(z_{t-1}\bigm| \frac{z_t}{a},\left(\frac{\sigma_z}{a}\right)^2 \right) \mathcal{N}(z_{t-1} \,|\, \mu_{t-1}, \sigma_{t-1}^2)}_{\text{use Gaussian multiplication formula SRG-6}} \mathrm{d}z_{t-1} \\ -&= \frac{1}{a} \mathcal{N}(x_t|c z_t, \sigma_x^2) \, \int \underbrace{\mathcal{N}\left(\mu_{t-1}\bigm| \frac{z_t}{a},\left(\frac{\sigma_z}{a}\right)^2 + \sigma_{t-1}^2 \right)}_{\text{not a function of }z_{t-1}} \underbrace{\mathcal{N}(z_{t-1} \,|\, \cdot, \cdot)}_{\text{integrates to }1} \mathrm{d}z_{t-1} \\ -&= \frac{1}{a} \underbrace{\mathcal{N}(x_t|c z_t, \sigma_x^2)}_{\text{use (1))}} \, \underbrace{\mathcal{N}\left(\mu_{t-1}\bigm| \frac{z_t}{a},\left(\frac{\sigma_z}{a}\right)^2 + \sigma_{t-1}^2 \right)}_{\text{use (1)}} \\ -&= \frac{1}{c} \underbrace{\mathcal{N}\left(z_t \bigm| \frac{x_t}{c}, \left( \frac{\sigma_x}{c}\right)^2 \right) \mathcal{N}\left(z_t\, \bigm|\,a \mu_{t-1},\sigma_z^2 + \left(a \sigma_{t-1}\right)^2 \right)}_{\text{use SRG-6 again}} \\ -&= \underbrace{\frac{1}{c} \mathcal{N}\left( \frac{x_t}{c} \bigm| a \mu_{t-1}, \left( \frac{\sigma_x}{c}\right)^2+ \sigma_z^2 + \left(a \sigma_{t-1}\right)^2\right)}_{\text{use (1)}} \, \mathcal{N}\left( z_t \,|\, \mu_t, \sigma_t^2\right)\\ - &= \underbrace{\mathcal{N}\left(x_t \,|\, ca \mu_{t-1}, \sigma_x^2 + c^2(\sigma_z^2+a^2\sigma_{t-1}^2) \right)}_{\text{evidence } p(x_t|x^{t-1})} \cdot \underbrace{\mathcal{N}\left( z_t \,|\, \mu_t, \sigma_t^2\right)}_{\text{posterior }p(z_t|x^t) } -\end{align*} -``` - -where the posterior mean ``\mu_t`` and posterior variance ``\sigma^2_t`` are given by the Kalman update equations (KF-2). -""") - - - - -# ╔═╡ 2729ec24-d294-11ef-2547-cbb5238bb18d -md""" - -Note that the above derivation includes updating the "instant" evidence - -```math -p(x_t|x^{t-1}) = \mathcal{N}\left(x_t \,|\, ca \mu_{t-1}, \sigma_x^2 + c^2(\sigma_z^2+a^2\sigma_{t-1}^2) \right) \,. -``` - -For an observed sequence ``x^t``, the evidence ``p(x_t|x^{t-1})`` is a scalar number that scores how well the model predicts ``x_t``, based on past observations ``x^{t-1}``. - -!!! info "Exam Guide" - The above manual derivation of the Kalman filter is too long and error-prone to be asked at an exam. You should be able to follow the derivation in detail, but you will not be requested to reproduce the full derivation without some guidance. The complexity of the derivation underlines why inference should be automated by a toolbox (like RxInfer). - -""" - -# ╔═╡ 272a00a6-d294-11ef-18ba-a3700f78b13f -md""" -## Multi-dimensional Kalman Filtering - -The Kalman filter equations can also be derived for multidimensional state-space models. In particular, for the model - -```math -\begin{align*} -z_t &= A z_{t-1} + \epsilon^{(z)}_t, \quad && \epsilon^{(z)}_t \sim \mathcal{N}(0,\Gamma) \\ -x_t &= C z_t + \epsilon^{(x)}_t \quad && \epsilon^{(x)}_t \sim \mathcal{N}(0,\Sigma) \,, -\end{align*} -``` - -the Kalman filter update equations for the posterior ``p(z_t |x^t) = \mathcal{N}(z_t | \mu_t, V_t )`` are given by (see Bishop, pg.639) - -```math -\begin{align*} -P_t &= A V_{t-1} A^T + \Gamma \tag{predicted variance}\\ -K_t &= P_t C^T \cdot \left(C P_t C^T + \Sigma \right)^{-1} \tag{Kalman gain} \\ -\mu_t &= A \mu_{t-1} + K_t\cdot\left(x_t - C A \mu_{t-1} \right) \tag{posterior state mean}\\ -V_t &= \left(I-K_t C \right) P_{t} \tag{posterior state variance} -\end{align*} -``` - -""" - -# ╔═╡ e44c6138-7f59-48f3-8f4d-7c5db8e1c016 -keyconcept("", -md""" -Two of the more famous and powerful models with latent states include the hidden Markov model (with discrete states) and the Linear Gaussian Dynamical system (with continuous states). The LDGS model is -```math -\begin{align*} -z_t &= A z_{t-1} + \epsilon^{(z)}_t, \quad && \epsilon^{(z)}_t \sim \mathcal{N}(0,\Gamma) \\ -x_t &= C z_t + \epsilon^{(x)}_t \quad && \epsilon^{(x)}_t \sim \mathcal{N}(0,\Sigma) \, -\end{align*} -``` -""") - -# ╔═╡ bbaa44b9-9bac-4fb8-8014-fbf400a93039 -challenge_solution("Tracking of Cart Position", color="green", header_level=1) - -# ╔═╡ 599e21c8-1141-4192-9dd7-46b83314a1ef -md""" -Let's use the Kalman filtering equations to solve the cart position tracking challenge. -""" - -# ╔═╡ 272a0d3a-d294-11ef-2537-39a6e410e56b -md""" - -## Inference by Explicit Kalman Filtering - -We can now solve the cart tracking problem of the introductory example by executing the Kalman filter equations KF-2. -""" - -# ╔═╡ f2e5dd92-b4bf-495a-8c11-2f34f2667041 -md""" -Center the graph around cart position? $(@bind closed_form_rolling CheckBox(default=false)) -""" - -# ╔═╡ ec3b781d-8b44-4bf4-9562-c5362eeb8913 -md""" -#### Model Specification -""" - -# ╔═╡ e3056eeb-777a-4323-9d2e-f376cae2e1ca -begin - n_steps = 20; - Δt = 1.0; - - z_start = [10.0; 0.0]; - u = 0.2 * ones(n_steps) # constant force - A = [1.0 Δt; - 0.0 1.0] - b = [0.5*Δt^2; Δt] - Σz = collect(Diagonal([0.2*Δt; 0.1*Δt])) - Σx = collect(Diagonal([1.0; 2.0])) -end; - -# ╔═╡ 49fd6d97-8ef1-49cd-8dcb-dafddb14814c -@bind intro_i Slider(2:n_steps; show_value=true) - -# ╔═╡ 83587586-8a88-4bbb-b2bf-1ca9a8cf6339 -md""" -Select a time step: $(@bind closed_form_i Slider(3:n_steps; show_value=true)) -""" - -# ╔═╡ 130edb3e-f5f9-40d2-970d-d0fc822fd82a -md""" -#### Noisy observations - -The measurements are organized per time step, with each element comprising a two-dimensional observation of `[position, velocity]`. -""" - -# ╔═╡ 272a4b2e-d294-11ef-2762-47a3479186ad -md""" -## Inference by Message Passing - -Let's now solve the cart tracking problem by sum-product message passing in a factor graph. All we have to do is create factor nodes for the state-transition model ``p(z_t|z_{t-1})`` and the observation model ``p(x_t|z_t)``. Then we let [RxInfer](https://rxinfer.com) execute the message passing schedule. - -#### Model Specification in RxInfer - -We only need to specify a single time step (and the initial values): -""" - -# ╔═╡ 6e8e7cea-7f97-418e-9453-c25a5896bc71 -@model function cart_tracking_filter(x, A, B, Σz, Σx, z_prev_m_0, z_prev_v_0, u) - - z_prev ~ MvNormalMeanCovariance(z_prev_m_0, z_prev_v_0) - - z ~ MvNormalMeanCovariance(A*z_prev + B*u, Σz) - x ~ MvNormalMeanCovariance(z, Σx) - - return z -end - -# ╔═╡ 557b0052-b1a4-489e-be53-2327033954f2 -md""" -Select a time step: $(@bind rxinfer_i Slider(1:n_steps; show_value=true)) -""" - -# ╔═╡ b7d0c2e7-418b-417d-992a-c93ae3598f9e -md""" -Center the graph around cart position? $(@bind rxinfer_rolling CheckBox(default=false)) -""" - -# ╔═╡ 272ab9b2-d294-11ef-0510-c3b68d2f1099 -md""" -Note that both the analytical Kalman filtering solution and the message passing solution lead to the same results. The advantage of message passing-based inference with RxInfer is that we did not need to derive any inference equations. RxInfer took care of all that. - -""" - -# ╔═╡ d6d3b368-8be5-4201-989f-44617d0cb34e -md""" - -#### Inference by RxInfer - -""" - -# ╔═╡ 331415dc-70fd-4b58-8536-8ed47b071e25 -# By default, RxInfer applies smoothing when it receives a static dataset. Since we want to do filtering, we will enable the option `autoupdates` when doing inference . -autoupdates = @autoupdates begin - z_prev_m_0, z_prev_v_0 = mean_cov(q(z)) -end - -# ╔═╡ 272afaec-d294-11ef-3953-5f868ec73cb8 -keyconcept("", -md""" -Generally, we will want to automate inference processes in dynamic models. We showed how Kalman filtering *emerged naturally* by automated message passing. - - -""") - - -# ╔═╡ 95ca53f8-d60a-4262-911b-b1010e0c7752 -md""" -# Summary -""" - -# ╔═╡ 27a6880c-b007-4d39-9e21-e7e24fc9d059 -keyconceptsummary() - -# ╔═╡ 7505d957-0c4d-41ba-a662-45ba4dfe4d05 -exercises(header_level=1) - -# ╔═╡ 3a188b49-919d-4168-b789-ce6a5cebf509 -md""" - -#### Markov Blankets (***) - -Given the Markov property - -```math -p(x_n|x_{n-1},x_{n-2},\ldots,x_1) = p(x_n|x_{n-1}) \tag{A1} -``` - -Prove that, for any ``n``, - -```math -\begin{align} -p(x_n,&x_{n-1},\ldots,x_{k+1},x_{k-1},\ldots,x_1|x_k) \\ -&= p(x_n,x_{n-1},\ldots,x_{k+1}|x_k) \cdot p(x_{k-1},x_{k-2},\ldots,x_1|x_k) \tag{A2} -\end{align} -``` - -In statistics and machine learning, the **Markov blanket** of a set of random variables ``S`` is the minimal set of other variables that renders ``S`` conditionally independent of all remaining variables in the system. Hence, if (A1) holds, the present state ``x_k`` serves as a Markov blanket for the future ``(x_n,x_{n-1},\ldots,x_{k+1})``, since conditioning on ``x_k`` makes the future independent of the past ``(x_{k-1},x_{k-2},\ldots,x_1)``. - -""" - -# ╔═╡ e8cab5ea-4906-4c64-b1bb-f33e267762a1 -hide_proof( -md""" -First, we rewrite (A2) as - - -```math -\begin{flalign} -p(&x_n,x_{n-1},\ldots,x_{k+1},x_{k-1},\ldots,x_1|x_k) \\ -&= \frac{p(x_n,x_{n-1},\ldots,x_1)}{p(x_k)} \\ -&= \frac{p(x_n,x_{n-1},\ldots,x_{k+1}|x_k,\ldots,x_1) \cdot p(x_k,x_{k-1},\ldots,x_1)}{p(x_k)} \\ -&= \frac{p(x_n,x_{n-1},\ldots,x_{k+1}|x_k,\ldots,x_1) \cdot p(x_{k-1},\ldots,x_1|x_k) p(x_k)}{p(x_k)} \\ -&= p(x_n,x_{n-1},\ldots,x_{k+1}|x_k,\ldots,x_1) \cdot p(x_{k-1},\ldots,x_1|x_k) \tag{A3} -\end{flalign} -``` - -If (A1) holds, then the first factor in (A3) can be simplified to - -```math -\begin{align} -p(&x_n,x_{n-1},\ldots,x_{k+1}|x_k,x_{k-1},\ldots,x_1) \\ -&= p(x_n|x_{n-1},\ldots,x_1) \cdot p(x_{n-1}|x_{n-2},\ldots,x_1) \cdots p(x_{k+1}|x_{k},\ldots,x_1) \\ -&= p(x_n|x_{n-1},\ldots,x_k) \cdot p(x_{n-1}|x_{n-2},\ldots,x_k) \cdots p(x_{k+1}|x_{k}) \\ -&= p(x_n,x_{n-1},\ldots,x_{k+1}|x_k) \tag{A4} -\end{align} -``` - -Substitution of (A4) into (A3) leads to A2. -""") - -# ╔═╡ d5d13c2e-3e8d-454e-b0d7-cb224aed063c -md""" -#### Rehearsal (*) - -- (a) What's the difference between a hidden Markov model and a linear Dynamical system? - -- (b) For the same number of state variables, which of these two models has a larger memory capacity, and why? - -- (c) What is the 1st-order Markov assumption? - -- (d) Derive the joint probability distribution ``p(x_{1:T},z_{0:T})`` (where ``x_t`` and ``z_t`` are observed and latent variables respectively) for the state-space model with transition and observation models ``p(z_t|z_{t-1})`` and ``p(x_t|z_t)``. - -- (e) What is a Hidden Markov Model (HMM)? - -- (f) What is a Linear Dynamical System (LDS)? - -- (g) What is a Kalman Filter? - -- (h) How does the Kalman Filter relate to the LDS? - -- (i) Explain the popularity of Kalman filtering and HMMs? - -- (j) How does a HMM relate to a GMM? - -""" - -# ╔═╡ 0c65804b-bd3f-40b7-9752-96f730dbdc96 -details("Click for answers", -md""" - -#### Rehearsal (*) - -- (a) What's the difference between a hidden Markov model and a linear Dynamical system? - -HMM has binary-valued (on-off) states, where the LDS has continuously valued states. - -- (b) For the same number of state variables, which of these two models has a larger memory capacity, and why? - -The latter holds more capacity because, eg, a 16-bit representation of a continuously-valued variable holds ``2^{16}`` different states. - -- (c) What is the 1st-order Markov assumption? - -An auto-regressive model is first-order Markov if - -```math -p(x_t|x_{t-1},x_{t-2},\ldots,x_1) = p(x_t|x_{t-1})\,. -``` - -- (d) Derive the joint probability distribution ``p(x_{1:T},z_{0:T})`` (where ``x_t`` and ``z_t`` are observed and latent variables respectively) for the state-space model with transition and observation models ``p(z_t|z_{t-1})`` and ``p(x_t|z_t)``. - -```math -p(x_{1:T},z_{0:T}) = p(z_0)\prod_{t=1}^Tp(z_t|z_{t-1}) \prod_{t=1}^T p(x_t|z_t) -``` - -- (e) What is a Hidden Markov Model (HMM)? - -An HMM is a state-space model where the latent variable ``z_t`` is discretely valued. I.o.w., the HMM has hidden clusters. - - -- (f) What is a Linear Dynamical System (LDS)? - -An LDS is a state-space model, but now the latent variable ``z_t`` is continuously valued. - -- (g) What is a Kalman Filter? - -A Kalman filter is a recursive solution to the inference problem ``p(z_t|x_t,x_{t-1},\dots,x_1)``, based on a state estimate at the previous time step ``p(z_{t-1}|x_{t-1},x_{t-2},\dots,x_1)`` and a new observation ``x_t``. Basically, it's a recursive filter that updates the optimal Bayesian estimate of the current state ``z_t`` based on all past observations ``x_t,x_{t-1},\dots,x_1``. - -- (h) How does the Kalman Filter relate to the LDS? - -The LDS describes a (generative) *model*. The Kalman filter does not describe a model, but rather describes an *inference process* on the LDS model. - -- (i) Explain the popularity of Kalman filtering and HMMs? - -The LDS and HMM models are both quite general and flexible generative probabilistic models for time series. There exist very efficient algorithms for executing the latent state inference tasks (Kalman filter for LDS, and there is a similar algorithm for the HMM). That makes these models flexible and practical. Hence, the popularity of these models. - - -- (j) How does an HMM relate to a GMM? -An HMM can be interpreted as a Gaussian-Mixture-model-over-time. - - -""") - -# ╔═╡ 272b07f8-d294-11ef-3bfe-bffd9e3623aa -md""" -# Optional Slides - -""" - -# ╔═╡ 272b17b6-d294-11ef-1e58-a75484ab56d9 -md""" -## Extensions of Generative Gaussian Models - -Using the methods of the previous lessons, it is possible to create your own new models based on stacking Gaussian and categorical distributions in new ways: - -![](https://github.com/bmlip/course/blob/v2/assets/figures/fig-generative-Gaussian-models.png?raw=true) - -""" - -# ╔═╡ f44e0303-dd28-48ad-9de2-7f7882f3923d -md""" -# Code -""" - -# ╔═╡ dab295ff-5a02-4e4f-8f46-b0842b6bf1ff -import RxInfer.ReactiveMP: messageout, getinterface, materialize! - -# ╔═╡ 07fe12dc-501c-407b-ab39-ba9a4845762c -import RxInfer.Rocket: getrecent - -# ╔═╡ ae8c57ce-b74d-4543-b25b-eee57ad2e415 -function plotCartPrediction( - ; - predictive::Union{Nothing,Normal}=nothing, - measurement::Union{Nothing,Normal}=nothing, - corrected::Union{Nothing,Normal}=nothing, - real::Union{Nothing,Float64}=nothing, - rolling::Bool=false, - kwargs... -) - result = plot( - ; - xlim=rolling ? (real - 4, real + 4) : (10,50), - ylim=(-.5, 1), - xlabel="Position", legend=:bottomright, - kwargs... - ) - - isnothing(predictive) || plot!(predictive; - label="Prediction "*L"p(z[n]|z[n-1],u[n])", fill=(0, .1), - ) - - isnothing(measurement) || plot!(measurement; - label="Noisy measurement "*L"p(z[n]|x[n])", fill=(0, .1), - ) - - isnothing(corrected) || plot!(corrected; - label="Corrected prediction "*L"p(z[n]|z[n-1],u[n],x[n])", fill=(0, .1), - ) - - isnothing(real) || vline!([real]; - label="Real cart position", color=:purple, style=:dash, - ) - return result -end - -# ╔═╡ 84018669-bff5-4d06-a8f1-df515910c4d9 -function generateNoisyMeasurements( z_start::Vector{Float64}, - u::Vector{Float64}, - A::Matrix{Float64}, - b::Vector{Float64}, - Σz::Matrix{Float64}, - Σx::Matrix{Float64}) - # Simulate linear state-space model - # z[t] = A*z[t-1] + b*u[t] + N(0,Σz) - # x[t] = N(z[t],Σx) - - # Return noisy observations [x[1],...,x[n]] - - n = length(u) - d = length(z_start) - - # Sanity checks - @assert(n>0, "u should contain at least one value") - @assert(d>0, "z_start has an invalid dimensionality") - @assert(size(A) == (d,d), "Transition matrix A does not have correct dimensions") - @assert(length(b) == d, "b does not have the correct dimensionality") - @assert(size(Σz) == (d,d), "Covariance matrix Σz does not have correct dimensions") - @assert(size(Σx) == (d,d), "Covariance matrix Σx does not have correct dimensions") - - result = Vector[] # result will be a list of n vectors of size d - z = copy(z_start) - - for i=1:n - # the new position is calculated from the old one, with process noise - z = rand(MvNormal(A*z + b*u[i], Σz)) - # we observe this position, with measurement noise - output = rand(MvNormal(z, Σx)) - push!(result, output) - end - - return accumulate(1:n; init=(z_start, z_start)) do (z, z_observed), i - z = rand(MvNormal(A*z + b*u[i], Σz)) - z_observed = rand(MvNormal(z, Σx)) - return z, z_observed - end - - return result -end - -# ╔═╡ 24f6c005-173d-4831-8c93-c54a9ba0334e -begin - gen_measurements_output = generateNoisyMeasurements(z_start, u, A, b, Σz, Σx); - xs_real = first.(gen_measurements_output) - xs_measurement = last.(gen_measurements_output) -end; - -# ╔═╡ 4940b72d-182d-47bb-a446-51ce42724beb -plotCartPrediction( - measurement=Normal(xs_measurement[intro_i][1], Σx[1,1]), - real=xs_real[intro_i][1], -) - -# ╔═╡ ad05de22-40db-413e-85bd-24e6ef448656 -let - local m_pred_z, V_pred_z # (these will be defined later) - - ## Kalman filter code - m_z = xs_measurement[1] # initial predictive mean - V_z = A * (1e8*Diagonal(I,2) * A') + Σz # initial predictive covariance - - for t = 2:closed_form_i - ## predict - m_pred_z = A * m_z + b * u[t] # predictive mean - V_pred_z = A * V_z * A' + Σz # predictive covariance - - ## update - gain = V_pred_z * inv(V_pred_z + Σx) # Kalman gain - m_z = m_pred_z + gain * (xs_measurement[t]-m_pred_z) # posterior mean update - V_z = (Diagonal(I,2)-gain)*V_pred_z # posterior covariance update - end - - ## Make the plot - plotCartPrediction( - predictive=Normal(m_pred_z[1], V_pred_z[1]), - corrected=Normal(m_z[1], V_z[1]), - measurement=Normal(xs_measurement[closed_form_i][1], Σx[1,1]), - real=xs_real[closed_form_i][1], - rolling=closed_form_rolling, - ) -end - -# ╔═╡ 2618d09b-4fd6-4cdc-9d80-45f7d0b262db -xs_measurement # see code in Appendix how measurements are generated - -# ╔═╡ 25b3697e-6171-402c-97a5-201ca6bbe3a7 -begin - z_prev_m_0 = xs_measurement[1] - z_prev_v_0 = A * (1e8*diageye(2) * A') + Σz - init = @initialization begin - q(z) = MvNormalMeanCovariance(z_prev_m_0, z_prev_v_0) - end -end; - -# ╔═╡ 32f7bc6a-cf3d-44f3-9603-8c4fe5c1a32d -engine = infer( - model=cart_tracking_filter(A=A, B=b, Σz=Σz, Σx=Σx, u=u[1]), - data=(x = xs_measurement,), - autoupdates = autoupdates, - initialization = init, - keephistory = n_steps, - free_energy = true, - autostart = true, -) - -# ╔═╡ 272aaaf6-d294-11ef-0162-c76ba8ba7232 -let - if rxinfer_i == 1 - z_prev_m, z_prev_v = (z_prev_m_0, z_prev_v_0) - else - z_prev_m, z_prev_v = mean_cov(engine.history[:z][rxinfer_i-1]) - end - - μz_prediction, Σz_prediction = (A*z_prev_m + b*u[rxinfer_i], A*z_prev_v*A' + Σz) - μz_posterior, Σz_posterior = mean_cov(engine.history[:z][rxinfer_i]) - - plotCartPrediction( - predictive=Normal(μz_prediction[1], Σz_prediction[1]), - corrected=Normal(μz_posterior[1], Σz_posterior[1]), - measurement=Normal(xs_measurement[rxinfer_i][1], Σx[1,1]), - real=xs_real[rxinfer_i][1], - rolling=rxinfer_rolling, - ) -end - -# ╔═╡ 00000000-0000-0000-0000-000000000001 -PLUTO_PROJECT_TOML_CONTENTS = """ -[deps] -BmlipTeachingTools = "656a7065-6f73-6c65-7465-6e646e617262" -Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" -Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0" -LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -RxInfer = "86711068-29c9-4ff7-b620-ae75d7495b3d" -StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd" - -[compat] -BmlipTeachingTools = "~1.3.1" -Distributions = "~0.25.122" -Images = "~0.26.2" -LaTeXStrings = "~1.4.0" -Plots = "~1.40.17" -RxInfer = "~4.6.2" -StatsPlots = "~0.15.8" -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000002 -PLUTO_MANIFEST_TOML_CONTENTS = """ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.12.1" -manifest_format = "2.0" -project_hash = "0657f8a5b01cdc7168325fefc2ac7e081ab09f15" - -[[deps.ADTypes]] -git-tree-sha1 = "27cecae79e5cc9935255f90c53bb831cc3c870d7" -uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -version = "1.18.0" - - [deps.ADTypes.extensions] - ADTypesChainRulesCoreExt = "ChainRulesCore" - ADTypesConstructionBaseExt = "ConstructionBase" - ADTypesEnzymeCoreExt = "EnzymeCore" - - [deps.ADTypes.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" - EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" - -[[deps.AbstractFFTs]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" -uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" -version = "1.5.0" -weakdeps = ["ChainRulesCore", "Test"] - - [deps.AbstractFFTs.extensions] - AbstractFFTsChainRulesCoreExt = "ChainRulesCore" - AbstractFFTsTestExt = "Test" - -[[deps.AbstractPlutoDingetjes]] -deps = ["Pkg"] -git-tree-sha1 = "6e1d2a35f2f90a4bc7c2ed98079b2ba09c35b83a" -uuid = "6e696c72-6542-2067-7265-42206c756150" -version = "1.3.2" - -[[deps.Adapt]] -deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "7e35fca2bdfba44d797c53dfe63a51fabf39bfc0" -uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.4.0" -weakdeps = ["SparseArrays", "StaticArrays"] - - [deps.Adapt.extensions] - AdaptSparseArraysExt = "SparseArrays" - AdaptStaticArraysExt = "StaticArrays" - -[[deps.AliasTables]] -deps = ["PtrArrays", "Random"] -git-tree-sha1 = "9876e1e164b144ca45e9e3198d0b689cadfed9ff" -uuid = "66dad0bd-aa9a-41b7-9441-69ab47430ed8" -version = "1.1.3" - -[[deps.ArgTools]] -uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.2" - -[[deps.ArnoldiMethod]] -deps = ["LinearAlgebra", "Random", "StaticArrays"] -git-tree-sha1 = "d57bd3762d308bded22c3b82d033bff85f6195c6" -uuid = "ec485272-7323-5ecc-a04f-4719b315124d" -version = "0.4.0" - -[[deps.Arpack]] -deps = ["Arpack_jll", "Libdl", "LinearAlgebra", "Logging"] -git-tree-sha1 = "9b9b347613394885fd1c8c7729bfc60528faa436" -uuid = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97" -version = "0.5.4" - -[[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.ArrayInterface]] -deps = ["Adapt", "LinearAlgebra"] -git-tree-sha1 = "d2cd034553ee6ca084edaaf8ed6c9d50fd01555d" -uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.21.0" - - [deps.ArrayInterface.extensions] - ArrayInterfaceBandedMatricesExt = "BandedMatrices" - ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" - ArrayInterfaceCUDAExt = "CUDA" - ArrayInterfaceCUDSSExt = ["CUDSS", "CUDA"] - ArrayInterfaceChainRulesCoreExt = "ChainRulesCore" - ArrayInterfaceChainRulesExt = "ChainRules" - ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" - ArrayInterfaceMetalExt = "Metal" - ArrayInterfaceReverseDiffExt = "ReverseDiff" - ArrayInterfaceSparseArraysExt = "SparseArrays" - ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" - ArrayInterfaceTrackerExt = "Tracker" - - [deps.ArrayInterface.weakdeps] - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" - ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" - Metal = "dde4c033-4e86-420c-a63e-0dd931031962" - ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - -[[deps.ArrayLayouts]] -deps = ["FillArrays", "LinearAlgebra", "StaticArrays"] -git-tree-sha1 = "355ab2d61069927d4247cd69ad0e1f140b31e30d" -uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.12.0" -weakdeps = ["SparseArrays"] - - [deps.ArrayLayouts.extensions] - ArrayLayoutsSparseArraysExt = "SparseArrays" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -version = "1.11.0" - -[[deps.AxisAlgorithms]] -deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"] -git-tree-sha1 = "01b8ccb13d68535d73d2b0c23e39bd23155fb712" -uuid = "13072b0f-2c55-5437-9ae7-d433b7a33950" -version = "1.1.0" - -[[deps.AxisArrays]] -deps = ["Dates", "IntervalSets", "IterTools", "RangeArrays"] -git-tree-sha1 = "4126b08903b777c88edf1754288144a0492c05ad" -uuid = "39de3d68-74b9-583c-8d2d-e117c070f3a9" -version = "0.4.8" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -version = "1.11.0" - -[[deps.BayesBase]] -deps = ["Distributions", "DomainSets", "LinearAlgebra", "Random", "SpecialFunctions", "StaticArrays", "Statistics", "StatsAPI", "StatsBase", "StatsFuns", "TinyHugeNumbers"] -git-tree-sha1 = "5b723bf6b1081cab4d263e425be097224e0f434f" -uuid = "b4ee3484-f114-42fe-b91c-797d54a0c67e" -version = "1.5.8" -weakdeps = ["FastCholesky"] - - [deps.BayesBase.extensions] - FastCholeskyExt = "FastCholesky" - -[[deps.BitFlags]] -git-tree-sha1 = "0691e34b3bb8be9307330f88d1a3c3f25466c24d" -uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" -version = "0.1.9" - -[[deps.BitSetTuples]] -deps = ["TupleTools"] -git-tree-sha1 = "aa19428fb6ad21db22f8568f068de4f443d3bacc" -uuid = "0f2f92aa-23a3-4d05-b791-88071d064721" -version = "1.1.5" - -[[deps.BitTwiddlingConvenienceFunctions]] -deps = ["Static"] -git-tree-sha1 = "f21cfd4950cb9f0587d5067e69405ad2acd27b87" -uuid = "62783981-4cbd-42fc-bca8-16325de8dc4b" -version = "0.1.6" - -[[deps.BlockArrays]] -deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] -git-tree-sha1 = "79e651aa489a7879107d66e3d1948e9aa1b4055e" -uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" -version = "1.7.2" - - [deps.BlockArrays.extensions] - BlockArraysAdaptExt = "Adapt" - BlockArraysBandedMatricesExt = "BandedMatrices" - - [deps.BlockArrays.weakdeps] - Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - -[[deps.BmlipTeachingTools]] -deps = ["HypertextLiteral", "InteractiveUtils", "Markdown", "PlutoTeachingTools", "PlutoUI", "Reexport"] -git-tree-sha1 = "806eadb642467b05f9d930f0d127f1e6fa5130f0" -uuid = "656a7065-6f73-6c65-7465-6e646e617262" -version = "1.3.1" - -[[deps.Bzip2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1b96ea4a01afe0ea4090c5c8039690672dd13f2e" -uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" -version = "1.0.9+0" - -[[deps.CEnum]] -git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc" -uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" -version = "0.5.0" - -[[deps.CPUSummary]] -deps = ["CpuId", "IfElse", "PrecompileTools", "Preferences", "Static"] -git-tree-sha1 = "f3a21d7fc84ba618a779d1ed2fcca2e682865bab" -uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9" -version = "0.2.7" - -[[deps.Cairo_jll]] -deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "fde3bf89aead2e723284a8ff9cdf5b551ed700e8" -uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" -version = "1.18.5+0" - -[[deps.CatIndices]] -deps = ["CustomUnitRanges", "OffsetArrays"] -git-tree-sha1 = "a0f80a09780eed9b1d106a1bf62041c2efc995bc" -uuid = "aafaddc9-749c-510e-ac4f-586e18779b91" -version = "0.2.2" - -[[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra"] -git-tree-sha1 = "e4c6a16e77171a5f5e25e9646617ab1c276c5607" -uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.26.0" -weakdeps = ["SparseArrays"] - - [deps.ChainRulesCore.extensions] - ChainRulesCoreSparseArraysExt = "SparseArrays" - -[[deps.ChunkCodecCore]] -git-tree-sha1 = "51f4c10ee01bda57371e977931de39ee0f0cdb3e" -uuid = "0b6fb165-00bc-4d37-ab8b-79f91016dbe1" -version = "1.0.0" - -[[deps.ChunkCodecLibZlib]] -deps = ["ChunkCodecCore", "Zlib_jll"] -git-tree-sha1 = "cee8104904c53d39eb94fd06cbe60cb5acde7177" -uuid = "4c0bbee4-addc-4d73-81a0-b6caacae83c8" -version = "1.0.0" - -[[deps.ChunkCodecLibZstd]] -deps = ["ChunkCodecCore", "Zstd_jll"] -git-tree-sha1 = "34d9873079e4cb3d0c62926a225136824677073f" -uuid = "55437552-ac27-4d47-9aa3-63184e8fd398" -version = "1.0.0" - -[[deps.CloseOpenIntervals]] -deps = ["Static", "StaticArrayInterface"] -git-tree-sha1 = "05ba0d07cd4fd8b7a39541e31a7b0254704ea581" -uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9" -version = "0.1.13" - -[[deps.Clustering]] -deps = ["Distances", "LinearAlgebra", "NearestNeighbors", "Printf", "Random", "SparseArrays", "Statistics", "StatsBase"] -git-tree-sha1 = "3e22db924e2945282e70c33b75d4dde8bfa44c94" -uuid = "aaaa29a8-35af-508c-8bc3-b662a17a0fe5" -version = "0.15.8" - -[[deps.CodecZlib]] -deps = ["TranscodingStreams", "Zlib_jll"] -git-tree-sha1 = "962834c22b66e32aa10f7611c08c8ca4e20749a9" -uuid = "944b1d66-785c-5afd-91f1-9de20f533193" -version = "0.7.8" - -[[deps.ColorSchemes]] -deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"] -git-tree-sha1 = "b0fd3f56fa442f81e0a47815c92245acfaaa4e34" -uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" -version = "3.31.0" - -[[deps.ColorTypes]] -deps = ["FixedPointNumbers", "Random"] -git-tree-sha1 = "67e11ee83a43eb71ddc950302c53bf33f0690dfe" -uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -version = "0.12.1" -weakdeps = ["StyledStrings"] - - [deps.ColorTypes.extensions] - StyledStringsExt = "StyledStrings" - -[[deps.ColorVectorSpace]] -deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "Requires", "Statistics", "TensorCore"] -git-tree-sha1 = "8b3b6f87ce8f65a2b4f857528fd8d70086cd72b1" -uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" -version = "0.11.0" -weakdeps = ["SpecialFunctions"] - - [deps.ColorVectorSpace.extensions] - SpecialFunctionsExt = "SpecialFunctions" - -[[deps.Colors]] -deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] -git-tree-sha1 = "37ea44092930b1811e666c3bc38065d7d87fcc74" -uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" -version = "0.13.1" - -[[deps.Combinatorics]] -git-tree-sha1 = "8010b6bb3388abe68d95743dcbea77650bb2eddf" -uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" -version = "1.0.3" - -[[deps.CommonSubexpressions]] -deps = ["MacroTools"] -git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" -uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.1" - -[[deps.CommonWorldInvalidations]] -git-tree-sha1 = "ae52d1c52048455e85a387fbee9be553ec2b68d0" -uuid = "f70d9fcc-98c5-4d4a-abd7-e4cdeebd8ca8" -version = "1.0.0" - -[[deps.Compat]] -deps = ["TOML", "UUIDs"] -git-tree-sha1 = "9d8a54ce4b17aa5bdce0ea5c34bc5e7c340d16ad" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.18.1" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.3.0+1" - -[[deps.CompositeTypes]] -git-tree-sha1 = "bce26c3dab336582805503bed209faab1c279768" -uuid = "b152e2b5-7a66-4b01-a709-34e65c35f657" -version = "0.1.4" - -[[deps.ComputationalResources]] -git-tree-sha1 = "52cb3ec90e8a8bea0e62e275ba577ad0f74821f7" -uuid = "ed09eef8-17a6-5b46-8889-db040fac31e3" -version = "0.3.2" - -[[deps.ConcurrentUtilities]] -deps = ["Serialization", "Sockets"] -git-tree-sha1 = "d9d26935a0bcffc87d2613ce14c527c99fc543fd" -uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" -version = "2.5.0" - -[[deps.ConstructionBase]] -git-tree-sha1 = "b4b092499347b18a015186eae3042f72267106cb" -uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.6.0" -weakdeps = ["IntervalSets", "LinearAlgebra", "StaticArrays"] - - [deps.ConstructionBase.extensions] - ConstructionBaseIntervalSetsExt = "IntervalSets" - ConstructionBaseLinearAlgebraExt = "LinearAlgebra" - ConstructionBaseStaticArraysExt = "StaticArrays" - -[[deps.Contour]] -git-tree-sha1 = "439e35b0b36e2e5881738abc8857bd92ad6ff9a8" -uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" -version = "0.6.3" - -[[deps.CoordinateTransformations]] -deps = ["LinearAlgebra", "StaticArrays"] -git-tree-sha1 = "a692f5e257d332de1e554e4566a4e5a8a72de2b2" -uuid = "150eb455-5306-5404-9cee-2592286d6298" -version = "0.6.4" - -[[deps.CpuId]] -deps = ["Markdown"] -git-tree-sha1 = "fcbb72b032692610bfbdb15018ac16a36cf2e406" -uuid = "adafc99b-e345-5852-983c-f28acb93d879" -version = "0.3.1" - -[[deps.CustomUnitRanges]] -git-tree-sha1 = "1a3f97f907e6dd8983b744d2642651bb162a3f7a" -uuid = "dc8bdbbb-1ca9-579f-8c36-e416f6a65cce" -version = "1.0.2" - -[[deps.DataAPI]] -git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" -uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.16.0" - -[[deps.DataStructures]] -deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "4e1fe97fdaed23e9dc21d4d664bea76b65fc50a0" -uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.22" - -[[deps.DataValueInterfaces]] -git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" -uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" -version = "1.0.0" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -version = "1.11.0" - -[[deps.Dbus_jll]] -deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "473e9afc9cf30814eb67ffa5f2db7df82c3ad9fd" -uuid = "ee1fde0b-3d02-5ea6-8484-8dfef6360eab" -version = "1.16.2+0" - -[[deps.DelimitedFiles]] -deps = ["Mmap"] -git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" -uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" -version = "1.9.1" - -[[deps.Dictionaries]] -deps = ["Indexing", "Random", "Serialization"] -git-tree-sha1 = "a86af9c4c4f33e16a2b2ff43c2113b2f390081fa" -uuid = "85a47980-9c8c-11e8-2b9f-f7ca1fa99fb4" -version = "0.4.5" - -[[deps.DiffResults]] -deps = ["StaticArraysCore"] -git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" -uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" -version = "1.1.0" - -[[deps.DiffRules]] -deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] -git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" -uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" -version = "1.15.1" - -[[deps.DifferentiationInterface]] -deps = ["ADTypes", "LinearAlgebra"] -git-tree-sha1 = "529bebbc74b36a4cfea09dd2aecb1288cd713a6d" -uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" -version = "0.7.9" - - [deps.DifferentiationInterface.extensions] - DifferentiationInterfaceChainRulesCoreExt = "ChainRulesCore" - DifferentiationInterfaceDiffractorExt = "Diffractor" - DifferentiationInterfaceEnzymeExt = ["EnzymeCore", "Enzyme"] - DifferentiationInterfaceFastDifferentiationExt = "FastDifferentiation" - DifferentiationInterfaceFiniteDiffExt = "FiniteDiff" - DifferentiationInterfaceFiniteDifferencesExt = "FiniteDifferences" - DifferentiationInterfaceForwardDiffExt = ["ForwardDiff", "DiffResults"] - DifferentiationInterfaceGPUArraysCoreExt = "GPUArraysCore" - DifferentiationInterfaceGTPSAExt = "GTPSA" - DifferentiationInterfaceMooncakeExt = "Mooncake" - DifferentiationInterfacePolyesterForwardDiffExt = ["PolyesterForwardDiff", "ForwardDiff", "DiffResults"] - DifferentiationInterfaceReverseDiffExt = ["ReverseDiff", "DiffResults"] - DifferentiationInterfaceSparseArraysExt = "SparseArrays" - DifferentiationInterfaceSparseConnectivityTracerExt = "SparseConnectivityTracer" - DifferentiationInterfaceSparseMatrixColoringsExt = "SparseMatrixColorings" - DifferentiationInterfaceStaticArraysExt = "StaticArrays" - DifferentiationInterfaceSymbolicsExt = "Symbolics" - DifferentiationInterfaceTrackerExt = "Tracker" - DifferentiationInterfaceZygoteExt = ["Zygote", "ForwardDiff"] - - [deps.DifferentiationInterface.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - DiffResults = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" - Diffractor = "9f5e2b26-1114-432f-b630-d3fe2085c51c" - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" - FastDifferentiation = "eb9bf01b-bf85-4b60-bf87-ee5de06c00be" - FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" - FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000" - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" - GTPSA = "b27dd330-f138-47c5-815b-40db9dd9b6e8" - Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" - PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b" - ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5" - SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" - -[[deps.Distances]] -deps = ["LinearAlgebra", "Statistics", "StatsAPI"] -git-tree-sha1 = "c7e3a542b999843086e2f29dac96a618c105be1d" -uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" -version = "0.10.12" -weakdeps = ["ChainRulesCore", "SparseArrays"] - - [deps.Distances.extensions] - DistancesChainRulesCoreExt = "ChainRulesCore" - DistancesSparseArraysExt = "SparseArrays" - -[[deps.Distributed]] -deps = ["Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" -version = "1.11.0" - -[[deps.Distributions]] -deps = ["AliasTables", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] -git-tree-sha1 = "3bc002af51045ca3b47d2e1787d6ce02e68b943a" -uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.122" - - [deps.Distributions.extensions] - DistributionsChainRulesCoreExt = "ChainRulesCore" - DistributionsDensityInterfaceExt = "DensityInterface" - DistributionsTestExt = "Test" - - [deps.Distributions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - DensityInterface = "b429d917-457f-4dbc-8f4c-0cc954292b1d" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.DocStringExtensions]] -git-tree-sha1 = "7442a5dfe1ebb773c29cc2962a8980f47221d76c" -uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.5" - -[[deps.DomainIntegrals]] -deps = ["CompositeTypes", "DomainSets", "FastGaussQuadrature", "GaussQuadrature", "HCubature", "IntervalSets", "LinearAlgebra", "QuadGK", "SpecialFunctions", "StaticArrays"] -git-tree-sha1 = "934bf806ef2948114243f25e84a3ddf775d0f1a6" -uuid = "cc6bae93-f070-4015-88fd-838f9505a86c" -version = "0.5.2" - -[[deps.DomainSets]] -deps = ["CompositeTypes", "IntervalSets", "LinearAlgebra", "StaticArrays"] -git-tree-sha1 = "c249d86e97a7e8398ce2068dce4c078a1c3464de" -uuid = "5b8099bc-c8ec-5219-889f-1d9e522a28bf" -version = "0.7.16" - - [deps.DomainSets.extensions] - DomainSetsMakieExt = "Makie" - DomainSetsRandomExt = "Random" - - [deps.DomainSets.weakdeps] - Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" - Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - -[[deps.Downloads]] -deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] -uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -version = "1.6.0" - -[[deps.EnumX]] -git-tree-sha1 = "bddad79635af6aec424f53ed8aad5d7555dc6f00" -uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" -version = "1.0.5" - -[[deps.EpollShim_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "8a4be429317c42cfae6a7fc03c31bad1970c310d" -uuid = "2702e6a9-849d-5ed8-8c21-79e8b8f9ee43" -version = "0.0.20230411+1" - -[[deps.ExceptionUnwrapping]] -deps = ["Test"] -git-tree-sha1 = "d36f682e590a83d63d1c7dbd287573764682d12a" -uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" -version = "0.1.11" - -[[deps.Expat_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "27af30de8b5445644e8ffe3bcb0d72049c089cf1" -uuid = "2e619515-83b5-522b-bb60-26c02a35a201" -version = "2.7.3+0" - -[[deps.ExponentialFamily]] -deps = ["BayesBase", "BlockArrays", "Distributions", "DomainSets", "FastCholesky", "FillArrays", "ForwardDiff", "HCubature", "HypergeometricFunctions", "IntervalSets", "IrrationalConstants", "LinearAlgebra", "LogExpFunctions", "PositiveFactorizations", "Random", "SparseArrays", "SpecialFunctions", "StaticArrays", "StatsBase", "StatsFuns", "TinyHugeNumbers"] -git-tree-sha1 = "8351e116e111c97ad57718851da00ae5a5f92e0c" -uuid = "62312e5e-252a-4322-ace9-a5f4bf9b357b" -version = "2.1.1" - -[[deps.FFMPEG]] -deps = ["FFMPEG_jll"] -git-tree-sha1 = "83dc665d0312b41367b7263e8a4d172eac1897f4" -uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" -version = "0.4.4" - -[[deps.FFMPEG_jll]] -deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] -git-tree-sha1 = "3a948313e7a41eb1db7a1e733e6335f17b4ab3c4" -uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" -version = "7.1.1+0" - -[[deps.FFTViews]] -deps = ["CustomUnitRanges", "FFTW"] -git-tree-sha1 = "cbdf14d1e8c7c8aacbe8b19862e0179fd08321c2" -uuid = "4f61f5a4-77b1-5117-aa51-3ab5ef4ef0cd" -version = "0.3.2" - -[[deps.FFTW]] -deps = ["AbstractFFTs", "FFTW_jll", "Libdl", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] -git-tree-sha1 = "97f08406df914023af55ade2f843c39e99c5d969" -uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" -version = "1.10.0" - -[[deps.FFTW_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "6d6219a004b8cf1e0b4dbe27a2860b8e04eba0be" -uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" -version = "3.3.11+0" - -[[deps.FastCholesky]] -deps = ["LinearAlgebra", "PositiveFactorizations"] -git-tree-sha1 = "1c0a81e006e40e9fcbd5f6f6cb42ac2700f86889" -uuid = "2d5283b6-8564-42b6-bb00-83ed8e915756" -version = "1.4.3" -weakdeps = ["StaticArraysCore"] - - [deps.FastCholesky.extensions] - StaticArraysCoreExt = "StaticArraysCore" - -[[deps.FastGaussQuadrature]] -deps = ["LinearAlgebra", "SpecialFunctions", "StaticArrays"] -git-tree-sha1 = "0044e9f5e49a57e88205e8f30ab73928b05fe5b6" -uuid = "442a2c76-b920-505d-bb47-c5924d526838" -version = "1.1.0" - -[[deps.FileIO]] -deps = ["Pkg", "Requires", "UUIDs"] -git-tree-sha1 = "d60eb76f37d7e5a40cc2e7c36974d864b82dc802" -uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" -version = "1.17.1" -weakdeps = ["HTTP"] - - [deps.FileIO.extensions] - HTTPExt = "HTTP" - -[[deps.FileWatching]] -uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" -version = "1.11.0" - -[[deps.FillArrays]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "173e4d8f14230a7523ae11b9a3fa9edb3e0efd78" -uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.14.0" -weakdeps = ["PDMats", "SparseArrays", "Statistics"] - - [deps.FillArrays.extensions] - FillArraysPDMatsExt = "PDMats" - FillArraysSparseArraysExt = "SparseArrays" - FillArraysStatisticsExt = "Statistics" - -[[deps.FiniteDiff]] -deps = ["ArrayInterface", "LinearAlgebra", "Setfield"] -git-tree-sha1 = "9340ca07ca27093ff68418b7558ca37b05f8aeb1" -uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" -version = "2.29.0" - - [deps.FiniteDiff.extensions] - FiniteDiffBandedMatricesExt = "BandedMatrices" - FiniteDiffBlockBandedMatricesExt = "BlockBandedMatrices" - FiniteDiffSparseArraysExt = "SparseArrays" - FiniteDiffStaticArraysExt = "StaticArrays" - - [deps.FiniteDiff.weakdeps] - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.FixedArguments]] -deps = ["TupleTools"] -git-tree-sha1 = "befa1ad59c77643dec6fc20d71fd6f5c3afcdadd" -uuid = "4130a065-6d82-41fe-881e-7a5c65156f7d" -version = "0.1.1" - -[[deps.FixedPointNumbers]] -deps = ["Statistics"] -git-tree-sha1 = "05882d6995ae5c12bb5f36dd2ed3f61c98cbb172" -uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" -version = "0.8.5" - -[[deps.Fontconfig_jll]] -deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Zlib_jll"] -git-tree-sha1 = "f85dac9a96a01087df6e3a749840015a0ca3817d" -uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" -version = "2.17.1+0" - -[[deps.Format]] -git-tree-sha1 = "9c68794ef81b08086aeb32eeaf33531668d5f5fc" -uuid = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8" -version = "1.3.7" - -[[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] -git-tree-sha1 = "ba6ce081425d0afb2bedd00d9884464f764a9225" -uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "1.2.2" -weakdeps = ["StaticArrays"] - - [deps.ForwardDiff.extensions] - ForwardDiffStaticArraysExt = "StaticArrays" - -[[deps.FreeType2_jll]] -deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "2c5512e11c791d1baed2049c5652441b28fc6a31" -uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" -version = "2.13.4+0" - -[[deps.FriBidi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "7a214fdac5ed5f59a22c2d9a885a16da1c74bbc7" -uuid = "559328eb-81f9-559d-9380-de523a88c83c" -version = "1.0.17+0" - -[[deps.Future]] -deps = ["Random"] -uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" -version = "1.11.0" - -[[deps.GLFW_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll", "libdecor_jll", "xkbcommon_jll"] -git-tree-sha1 = "fcb0584ff34e25155876418979d4c8971243bb89" -uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" -version = "3.4.0+2" - -[[deps.GR]] -deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Preferences", "Printf", "Qt6Wayland_jll", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "p7zip_jll"] -git-tree-sha1 = "1828eb7275491981fa5f1752a5e126e8f26f8741" -uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" -version = "0.73.17" - -[[deps.GR_jll]] -deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "FreeType2_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "27299071cc29e409488ada41ec7643e0ab19091f" -uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" -version = "0.73.17+0" - -[[deps.GaussQuadrature]] -deps = ["SpecialFunctions"] -git-tree-sha1 = "eb6f1f48aa994f3018cbd029a17863c6535a266d" -uuid = "d54b0c1a-921d-58e0-8e36-89d8069c0969" -version = "0.5.8" - -[[deps.GettextRuntime_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll"] -git-tree-sha1 = "45288942190db7c5f760f59c04495064eedf9340" -uuid = "b0724c58-0f36-5564-988d-3bb0596ebc4a" -version = "0.22.4+0" - -[[deps.Ghostscript_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Zlib_jll"] -git-tree-sha1 = "38044a04637976140074d0b0621c1edf0eb531fd" -uuid = "61579ee1-b43e-5ca0-a5da-69d92c66a64b" -version = "9.55.1+0" - -[[deps.Giflib_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "6570366d757b50fabae9f4315ad74d2e40c0560a" -uuid = "59f7168a-df46-5410-90c8-f2779963d0ec" -version = "5.2.3+0" - -[[deps.Glib_jll]] -deps = ["Artifacts", "GettextRuntime_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "50c11ffab2a3d50192a228c313f05b5b5dc5acb2" -uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" -version = "2.86.0+0" - -[[deps.GraphPPL]] -deps = ["BitSetTuples", "DataStructures", "Dictionaries", "MacroTools", "MetaGraphsNext", "NamedTupleTools", "Static", "StaticArrays", "TupleTools", "Unrolled"] -git-tree-sha1 = "db4aece54ddddaa9e8d2880eb7cfc6f29bd1a650" -uuid = "b3f8163a-e979-4e85-b43e-1f63d8c8b42c" -version = "4.6.5" - - [deps.GraphPPL.extensions] - GraphPPLDistributionsExt = "Distributions" - GraphPPLGraphVizExt = "GraphViz" - GraphPPLPlottingExt = ["Cairo", "GraphPlot"] - - [deps.GraphPPL.weakdeps] - Cairo = "159f3aea-2a34-519c-b102-8c37f9878175" - Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" - GraphPlot = "a2cc645c-3eea-5389-862e-a155d0052231" - GraphViz = "f526b714-d49f-11e8-06ff-31ed36ee7ee0" - -[[deps.Graphics]] -deps = ["Colors", "LinearAlgebra", "NaNMath"] -git-tree-sha1 = "a641238db938fff9b2f60d08ed9030387daf428c" -uuid = "a2bd30eb-e257-5431-a919-1863eab51364" -version = "1.1.3" - -[[deps.Graphite2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "8a6dbda1fd736d60cc477d99f2e7a042acfa46e8" -uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" -version = "1.3.15+0" - -[[deps.Graphs]] -deps = ["ArnoldiMethod", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] -git-tree-sha1 = "7a98c6502f4632dbe9fb1973a4244eaa3324e84d" -uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" -version = "1.13.1" - -[[deps.Grisu]] -git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" -uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" -version = "1.0.2" - -[[deps.HCubature]] -deps = ["Combinatorics", "DataStructures", "LinearAlgebra", "QuadGK", "StaticArrays"] -git-tree-sha1 = "19ef9f0cb324eed957b7fe7257ac84e8ed8a48ec" -uuid = "19dc6840-f33b-545b-b366-655c7e3ffd49" -version = "1.7.0" - -[[deps.HTTP]] -deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "PrecompileTools", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "5e6fe50ae7f23d171f44e311c2960294aaa0beb5" -uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.10.19" - -[[deps.HarfBuzz_jll]] -deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll"] -git-tree-sha1 = "f923f9a774fcf3f5cb761bfa43aeadd689714813" -uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" -version = "8.5.1+0" - -[[deps.HashArrayMappedTries]] -git-tree-sha1 = "2eaa69a7cab70a52b9687c8bf950a5a93ec895ae" -uuid = "076d061b-32b6-4027-95e0-9a2c6f6d7e74" -version = "0.2.0" - -[[deps.HistogramThresholding]] -deps = ["ImageBase", "LinearAlgebra", "MappedArrays"] -git-tree-sha1 = "7194dfbb2f8d945abdaf68fa9480a965d6661e69" -uuid = "2c695a8d-9458-5d45-9878-1b8a99cf7853" -version = "0.3.1" - -[[deps.HostCPUFeatures]] -deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] -git-tree-sha1 = "8e070b599339d622e9a081d17230d74a5c473293" -uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" -version = "0.1.17" - -[[deps.HypergeometricFunctions]] -deps = ["LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] -git-tree-sha1 = "68c173f4f449de5b438ee67ed0c9c748dc31a2ec" -uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" -version = "0.3.28" - -[[deps.Hyperscript]] -deps = ["Test"] -git-tree-sha1 = "179267cfa5e712760cd43dcae385d7ea90cc25a4" -uuid = "47d2ed2b-36de-50cf-bf87-49c2cf4b8b91" -version = "0.0.5" - -[[deps.HypertextLiteral]] -deps = ["Tricks"] -git-tree-sha1 = "7134810b1afce04bbc1045ca1985fbe81ce17653" -uuid = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2" -version = "0.9.5" - -[[deps.IOCapture]] -deps = ["Logging", "Random"] -git-tree-sha1 = "b6d6bfdd7ce25b0f9b2f6b3dd56b2673a66c8770" -uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" -version = "0.2.5" - -[[deps.IfElse]] -git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" -uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" -version = "0.1.1" - -[[deps.ImageAxes]] -deps = ["AxisArrays", "ImageBase", "ImageCore", "Reexport", "SimpleTraits"] -git-tree-sha1 = "e12629406c6c4442539436581041d372d69c55ba" -uuid = "2803e5a7-5153-5ecf-9a86-9b4c37f5f5ac" -version = "0.6.12" - -[[deps.ImageBase]] -deps = ["ImageCore", "Reexport"] -git-tree-sha1 = "eb49b82c172811fd2c86759fa0553a2221feb909" -uuid = "c817782e-172a-44cc-b673-b171935fbb9e" -version = "0.1.7" - -[[deps.ImageBinarization]] -deps = ["HistogramThresholding", "ImageCore", "LinearAlgebra", "Polynomials", "Reexport", "Statistics"] -git-tree-sha1 = "33485b4e40d1df46c806498c73ea32dc17475c59" -uuid = "cbc4b850-ae4b-5111-9e64-df94c024a13d" -version = "0.3.1" - -[[deps.ImageContrastAdjustment]] -deps = ["ImageBase", "ImageCore", "ImageTransformations", "Parameters"] -git-tree-sha1 = "eb3d4365a10e3f3ecb3b115e9d12db131d28a386" -uuid = "f332f351-ec65-5f6a-b3d1-319c6670881a" -version = "0.3.12" - -[[deps.ImageCore]] -deps = ["ColorVectorSpace", "Colors", "FixedPointNumbers", "MappedArrays", "MosaicViews", "OffsetArrays", "PaddedViews", "PrecompileTools", "Reexport"] -git-tree-sha1 = "8c193230235bbcee22c8066b0374f63b5683c2d3" -uuid = "a09fc81d-aa75-5fe9-8630-4744c3626534" -version = "0.10.5" - -[[deps.ImageCorners]] -deps = ["ImageCore", "ImageFiltering", "PrecompileTools", "StaticArrays", "StatsBase"] -git-tree-sha1 = "24c52de051293745a9bad7d73497708954562b79" -uuid = "89d5987c-236e-4e32-acd0-25bd6bd87b70" -version = "0.1.3" - -[[deps.ImageDistances]] -deps = ["Distances", "ImageCore", "ImageMorphology", "LinearAlgebra", "Statistics"] -git-tree-sha1 = "08b0e6354b21ef5dd5e49026028e41831401aca8" -uuid = "51556ac3-7006-55f5-8cb3-34580c88182d" -version = "0.2.17" - -[[deps.ImageFiltering]] -deps = ["CatIndices", "ComputationalResources", "DataStructures", "FFTViews", "FFTW", "ImageBase", "ImageCore", "LinearAlgebra", "OffsetArrays", "PrecompileTools", "Reexport", "SparseArrays", "StaticArrays", "Statistics", "TiledIteration"] -git-tree-sha1 = "52116260a234af5f69969c5286e6a5f8dc3feab8" -uuid = "6a3955dd-da59-5b1f-98d4-e7296123deb5" -version = "0.7.12" - -[[deps.ImageIO]] -deps = ["FileIO", "IndirectArrays", "JpegTurbo", "LazyModules", "Netpbm", "OpenEXR", "PNGFiles", "QOI", "Sixel", "TiffImages", "UUIDs", "WebP"] -git-tree-sha1 = "696144904b76e1ca433b886b4e7edd067d76cbf7" -uuid = "82e4d734-157c-48bb-816b-45c225c6df19" -version = "0.6.9" - -[[deps.ImageMagick]] -deps = ["FileIO", "ImageCore", "ImageMagick_jll", "InteractiveUtils"] -git-tree-sha1 = "8e64ab2f0da7b928c8ae889c514a52741debc1c2" -uuid = "6218d12a-5da1-5696-b52f-db25d2ecc6d1" -version = "1.4.2" - -[[deps.ImageMagick_jll]] -deps = ["Artifacts", "Bzip2_jll", "FFTW_jll", "Ghostscript_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "OpenJpeg_jll", "Zlib_jll", "Zstd_jll", "libpng_jll", "libwebp_jll", "libzip_jll"] -git-tree-sha1 = "d670e8e3adf0332f57054955422e85a4aec6d0b0" -uuid = "c73af94c-d91f-53ed-93a7-00f77d67a9d7" -version = "7.1.2005+0" - -[[deps.ImageMetadata]] -deps = ["AxisArrays", "ImageAxes", "ImageBase", "ImageCore"] -git-tree-sha1 = "2a81c3897be6fbcde0802a0ebe6796d0562f63ec" -uuid = "bc367c6b-8a6b-528e-b4bd-a4b897500b49" -version = "0.9.10" - -[[deps.ImageMorphology]] -deps = ["DataStructures", "ImageCore", "LinearAlgebra", "LoopVectorization", "OffsetArrays", "Requires", "TiledIteration"] -git-tree-sha1 = "cffa21df12f00ca1a365eb8ed107614b40e8c6da" -uuid = "787d08f9-d448-5407-9aad-5290dd7ab264" -version = "0.4.6" - -[[deps.ImageQualityIndexes]] -deps = ["ImageContrastAdjustment", "ImageCore", "ImageDistances", "ImageFiltering", "LazyModules", "OffsetArrays", "PrecompileTools", "Statistics"] -git-tree-sha1 = "783b70725ed326340adf225be4889906c96b8fd1" -uuid = "2996bd0c-7a13-11e9-2da2-2f5ce47296a9" -version = "0.3.7" - -[[deps.ImageSegmentation]] -deps = ["Clustering", "DataStructures", "Distances", "Graphs", "ImageCore", "ImageFiltering", "ImageMorphology", "LinearAlgebra", "MetaGraphs", "RegionTrees", "SimpleWeightedGraphs", "StaticArrays", "Statistics"] -git-tree-sha1 = "7196039573b6f312864547eb7a74360d6c0ab8e6" -uuid = "80713f31-8817-5129-9cf8-209ff8fb23e1" -version = "1.9.0" - -[[deps.ImageShow]] -deps = ["Base64", "ColorSchemes", "FileIO", "ImageBase", "ImageCore", "OffsetArrays", "StackViews"] -git-tree-sha1 = "3b5344bcdbdc11ad58f3b1956709b5b9345355de" -uuid = "4e3cecfd-b093-5904-9786-8bbb286a6a31" -version = "0.3.8" - -[[deps.ImageTransformations]] -deps = ["AxisAlgorithms", "CoordinateTransformations", "ImageBase", "ImageCore", "Interpolations", "OffsetArrays", "Rotations", "StaticArrays"] -git-tree-sha1 = "dfde81fafbe5d6516fb864dc79362c5c6b973c82" -uuid = "02fcd773-0e25-5acc-982a-7f6622650795" -version = "0.10.2" - -[[deps.Images]] -deps = ["Base64", "FileIO", "Graphics", "ImageAxes", "ImageBase", "ImageBinarization", "ImageContrastAdjustment", "ImageCore", "ImageCorners", "ImageDistances", "ImageFiltering", "ImageIO", "ImageMagick", "ImageMetadata", "ImageMorphology", "ImageQualityIndexes", "ImageSegmentation", "ImageShow", "ImageTransformations", "IndirectArrays", "IntegralArrays", "Random", "Reexport", "SparseArrays", "StaticArrays", "Statistics", "StatsBase", "TiledIteration"] -git-tree-sha1 = "a49b96fd4a8d1a9a718dfd9cde34c154fc84fcd5" -uuid = "916415d5-f1e6-5110-898d-aaa5f9f070e0" -version = "0.26.2" - -[[deps.Imath_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "0936ba688c6d201805a83da835b55c61a180db52" -uuid = "905a6f67-0a94-5f89-b386-d35d92009cd1" -version = "3.1.11+0" - -[[deps.Indexing]] -git-tree-sha1 = "ce1566720fd6b19ff3411404d4b977acd4814f9f" -uuid = "313cdc1a-70c2-5d6a-ae34-0150d3930a38" -version = "1.1.1" - -[[deps.IndirectArrays]] -git-tree-sha1 = "012e604e1c7458645cb8b436f8fba789a51b257f" -uuid = "9b13fd28-a010-5f03-acff-a1bbcff69959" -version = "1.0.0" - -[[deps.Inflate]] -git-tree-sha1 = "d1b1b796e47d94588b3757fe84fbf65a5ec4a80d" -uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" -version = "0.1.5" - -[[deps.IntegralArrays]] -deps = ["ColorTypes", "FixedPointNumbers", "IntervalSets"] -git-tree-sha1 = "b842cbff3f44804a84fda409745cc8f04c029a20" -uuid = "1d092043-8f09-5a30-832f-7509e371ab51" -version = "0.1.6" - -[[deps.IntelOpenMP_jll]] -deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] -git-tree-sha1 = "ec1debd61c300961f98064cfb21287613ad7f303" -uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" -version = "2025.2.0+0" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -version = "1.11.0" - -[[deps.Interpolations]] -deps = ["Adapt", "AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"] -git-tree-sha1 = "65d505fa4c0d7072990d659ef3fc086eb6da8208" -uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" -version = "0.16.2" -weakdeps = ["ForwardDiff", "Unitful"] - - [deps.Interpolations.extensions] - InterpolationsForwardDiffExt = "ForwardDiff" - InterpolationsUnitfulExt = "Unitful" - -[[deps.IntervalSets]] -git-tree-sha1 = "5fbb102dcb8b1a858111ae81d56682376130517d" -uuid = "8197267c-284f-5f27-9208-e0e47529a953" -version = "0.7.11" -weakdeps = ["Random", "RecipesBase", "Statistics"] - - [deps.IntervalSets.extensions] - IntervalSetsRandomExt = "Random" - IntervalSetsRecipesBaseExt = "RecipesBase" - IntervalSetsStatisticsExt = "Statistics" - -[[deps.IrrationalConstants]] -git-tree-sha1 = "b2d91fe939cae05960e760110b328288867b5758" -uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.6" - -[[deps.IterTools]] -git-tree-sha1 = "42d5f897009e7ff2cf88db414a389e5ed1bdd023" -uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" -version = "1.10.0" - -[[deps.IteratorInterfaceExtensions]] -git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" -uuid = "82899510-4779-5014-852e-03e436cf321d" -version = "1.0.0" - -[[deps.JLD2]] -deps = ["ChunkCodecLibZlib", "ChunkCodecLibZstd", "FileIO", "MacroTools", "Mmap", "OrderedCollections", "PrecompileTools", "ScopedValues"] -git-tree-sha1 = "da2e9b4d1abbebdcca0aa68afa0aa272102baad7" -uuid = "033835bb-8acc-5ee8-8aae-3f567f8a3819" -version = "0.6.2" -weakdeps = ["UnPack"] - - [deps.JLD2.extensions] - UnPackExt = "UnPack" - -[[deps.JLFzf]] -deps = ["REPL", "Random", "fzf_jll"] -git-tree-sha1 = "82f7acdc599b65e0f8ccd270ffa1467c21cb647b" -uuid = "1019f520-868f-41f5-a6de-eb00f4b6a39c" -version = "0.1.11" - -[[deps.JLLWrappers]] -deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "0533e564aae234aff59ab625543145446d8b6ec2" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.7.1" - -[[deps.JSON]] -deps = ["Dates", "Mmap", "Parsers", "Unicode"] -git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" -uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.21.4" - -[[deps.JpegTurbo]] -deps = ["CEnum", "FileIO", "ImageCore", "JpegTurbo_jll", "TOML"] -git-tree-sha1 = "9496de8fb52c224a2e3f9ff403947674517317d9" -uuid = "b835a17e-a41a-41e7-81f0-2f016b05efe0" -version = "0.1.6" - -[[deps.JpegTurbo_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "4255f0032eafd6451d707a51d5f0248b8a165e4d" -uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "3.1.3+0" - -[[deps.JuliaSyntaxHighlighting]] -deps = ["StyledStrings"] -uuid = "ac6e5ff7-fb65-4e79-a425-ec3bc9c03011" -version = "1.12.0" - -[[deps.KernelDensity]] -deps = ["Distributions", "DocStringExtensions", "FFTW", "Interpolations", "StatsBase"] -git-tree-sha1 = "ba51324b894edaf1df3ab16e2cc6bc3280a2f1a7" -uuid = "5ab0869b-81aa-558d-bb23-cbf5423bbe9b" -version = "0.6.10" - -[[deps.LAME_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "059aabebaa7c82ccb853dd4a0ee9d17796f7e1bc" -uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" -version = "3.100.3+0" - -[[deps.LERC_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "aaafe88dccbd957a8d82f7d05be9b69172e0cee3" -uuid = "88015f11-f218-50d7-93a8-a6af411a945d" -version = "4.0.1+0" - -[[deps.LLVMOpenMP_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "eb62a3deb62fc6d8822c0c4bef73e4412419c5d8" -uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" -version = "18.1.8+0" - -[[deps.LZO_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1c602b1127f4751facb671441ca72715cc95938a" -uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" -version = "2.10.3+0" - -[[deps.LaTeXStrings]] -git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" -uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.4.0" - -[[deps.Latexify]] -deps = ["Format", "Ghostscript_jll", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Requires"] -git-tree-sha1 = "44f93c47f9cd6c7e431f2f2091fcba8f01cd7e8f" -uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" -version = "0.16.10" - - [deps.Latexify.extensions] - DataFramesExt = "DataFrames" - SparseArraysExt = "SparseArrays" - SymEngineExt = "SymEngine" - TectonicExt = "tectonic_jll" - - [deps.Latexify.weakdeps] - DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - SymEngine = "123dc426-2d89-5057-bbad-38513e3affd8" - tectonic_jll = "d7dd28d6-a5e6-559c-9131-7eb760cdacc5" - -[[deps.LayoutPointers]] -deps = ["ArrayInterface", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface"] -git-tree-sha1 = "a9eaadb366f5493a5654e843864c13d8b107548c" -uuid = "10f19ff3-798f-405d-979b-55457f8fc047" -version = "0.1.17" - -[[deps.LazyArrays]] -deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "MacroTools", "SparseArrays"] -git-tree-sha1 = "79ee64f6ba0a5a49930f51c86f60d7526b5e12c8" -uuid = "5078a376-72f3-5289-bfd5-ec5146d43c02" -version = "2.8.0" - - [deps.LazyArrays.extensions] - LazyArraysBandedMatricesExt = "BandedMatrices" - LazyArraysBlockArraysExt = "BlockArrays" - LazyArraysBlockBandedMatricesExt = "BlockBandedMatrices" - LazyArraysStaticArraysExt = "StaticArrays" - - [deps.LazyArrays.weakdeps] - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" - BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.LazyArtifacts]] -deps = ["Artifacts", "Pkg"] -uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" -version = "1.11.0" - -[[deps.LazyModules]] -git-tree-sha1 = "a560dd966b386ac9ae60bdd3a3d3a326062d3c3e" -uuid = "8cdb02fc-e678-4876-92c5-9defec4f444e" -version = "0.3.1" - -[[deps.LibCURL]] -deps = ["LibCURL_jll", "MozillaCACerts_jll"] -uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.4" - -[[deps.LibCURL_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll", "Zlib_jll", "nghttp2_jll"] -uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.11.1+1" - -[[deps.LibGit2]] -deps = ["LibGit2_jll", "NetworkOptions", "Printf", "SHA"] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -version = "1.11.0" - -[[deps.LibGit2_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll"] -uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.9.0+0" - -[[deps.LibSSH2_jll]] -deps = ["Artifacts", "Libdl", "OpenSSL_jll"] -uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.11.3+1" - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -version = "1.11.0" - -[[deps.Libffi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c8da7e6a91781c41a863611c7e966098d783c57a" -uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" -version = "3.4.7+0" - -[[deps.Libglvnd_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll", "Xorg_libXext_jll"] -git-tree-sha1 = "d36c21b9e7c172a44a10484125024495e2625ac0" -uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" -version = "1.7.1+1" - -[[deps.Libiconv_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "be484f5c92fad0bd8acfef35fe017900b0b73809" -uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" -version = "1.18.0+0" - -[[deps.Libmount_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "3acf07f130a76f87c041cfb2ff7d7284ca67b072" -uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" -version = "2.41.2+0" - -[[deps.Libtiff_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] -git-tree-sha1 = "f04133fe05eff1667d2054c53d59f9122383fe05" -uuid = "89763e89-9b03-5906-acba-b20f662cd828" -version = "4.7.2+0" - -[[deps.Libuuid_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "2a7a12fc0a4e7fb773450d17975322aa77142106" -uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" -version = "2.41.2+0" - -[[deps.LineSearches]] -deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"] -git-tree-sha1 = "4adee99b7262ad2a1a4bbbc59d993d24e55ea96f" -uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" -version = "7.4.0" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -version = "1.12.0" - -[[deps.LittleCMS_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll"] -git-tree-sha1 = "8e6a74641caf3b84800f2ccd55dc7ab83893c10b" -uuid = "d3a379c0-f9a3-5b72-a4c0-6bf4d2e8af0f" -version = "2.17.0+0" - -[[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" -uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.29" - - [deps.LogExpFunctions.extensions] - LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" - LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" - LogExpFunctionsInverseFunctionsExt = "InverseFunctions" - - [deps.LogExpFunctions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -version = "1.11.0" - -[[deps.LoggingExtras]] -deps = ["Dates", "Logging"] -git-tree-sha1 = "f00544d95982ea270145636c181ceda21c4e2575" -uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.2.0" - -[[deps.LoopVectorization]] -deps = ["ArrayInterface", "CPUSummary", "CloseOpenIntervals", "DocStringExtensions", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "PrecompileTools", "SIMDTypes", "SLEEFPirates", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"] -git-tree-sha1 = "a9fc7883eb9b5f04f46efb9a540833d1fad974b3" -uuid = "bdcacae8-1622-11e9-2a5c-532679323890" -version = "0.12.173" - - [deps.LoopVectorization.extensions] - ForwardDiffExt = ["ChainRulesCore", "ForwardDiff"] - ForwardDiffNNlibExt = ["ForwardDiff", "NNlib"] - SpecialFunctionsExt = "SpecialFunctions" - - [deps.LoopVectorization.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" - SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" - -[[deps.MIMEs]] -git-tree-sha1 = "c64d943587f7187e751162b3b84445bbbd79f691" -uuid = "6c6e2e6c-3030-632d-7369-2d6c69616d65" -version = "1.1.0" - -[[deps.MKL_jll]] -deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "oneTBB_jll"] -git-tree-sha1 = "282cadc186e7b2ae0eeadbd7a4dffed4196ae2aa" -uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" -version = "2025.2.0+0" - -[[deps.MacroTools]] -git-tree-sha1 = "1e0228a030642014fe5cfe68c2c0a818f9e3f522" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.16" - -[[deps.ManualMemory]] -git-tree-sha1 = "bcaef4fc7a0cfe2cba636d84cda54b5e4e4ca3cd" -uuid = "d125e4d3-2237-4719-b19c-fa641b8a4667" -version = "0.1.8" - -[[deps.MappedArrays]] -git-tree-sha1 = "2dab0221fe2b0f2cb6754eaa743cc266339f527e" -uuid = "dbb5928d-eab1-5f90-85c2-b9b0edb7c900" -version = "0.4.2" - -[[deps.Markdown]] -deps = ["Base64", "JuliaSyntaxHighlighting", "StyledStrings"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -version = "1.11.0" - -[[deps.MatrixCorrectionTools]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "73f93b21eae5714c282396bfae9d9f13d6ad04b6" -uuid = "41f81499-25de-46de-b591-c3cfc21e9eaf" -version = "1.2.0" - -[[deps.MbedTLS]] -deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] -git-tree-sha1 = "c067a280ddc25f196b5e7df3877c6b226d390aaf" -uuid = "739be429-bea8-5141-9913-cc70e7f3736d" -version = "1.1.9" - -[[deps.MbedTLS_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "3cce3511ca2c6f87b19c34ffc623417ed2798cbd" -uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.10+0" - -[[deps.Measures]] -git-tree-sha1 = "c13304c81eec1ed3af7fc20e75fb6b26092a1102" -uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" -version = "0.3.2" - -[[deps.MetaGraphs]] -deps = ["Graphs", "JLD2", "Random"] -git-tree-sha1 = "3a8f462a180a9d735e340f4e8d5f364d411da3a4" -uuid = "626554b9-1ddb-594c-aa3c-2596fe9399a5" -version = "0.8.1" - -[[deps.MetaGraphsNext]] -deps = ["Graphs", "JLD2", "SimpleTraits"] -git-tree-sha1 = "c3f7e597f1cf5fe04e68e7907af47f055cad211c" -uuid = "fa8bd995-216d-47f1-8a91-f3b68fbeb377" -version = "0.7.4" - -[[deps.Missings]] -deps = ["DataAPI"] -git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d" -uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" -version = "1.2.0" - -[[deps.Mmap]] -uuid = "a63ad114-7e13-5084-954f-fe012c677804" -version = "1.11.0" - -[[deps.MosaicViews]] -deps = ["MappedArrays", "OffsetArrays", "PaddedViews", "StackViews"] -git-tree-sha1 = "7b86a5d4d70a9f5cdf2dacb3cbe6d251d1a61dbe" -uuid = "e94cdb99-869f-56ef-bcf0-1ae2bcbe0389" -version = "0.3.4" - -[[deps.MozillaCACerts_jll]] -uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2025.5.20" - -[[deps.MultivariateStats]] -deps = ["Arpack", "Distributions", "LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI", "StatsBase"] -git-tree-sha1 = "816620e3aac93e5b5359e4fdaf23ca4525b00ddf" -uuid = "6f286f6a-111f-5878-ab1e-185364afe411" -version = "0.10.3" - -[[deps.NLSolversBase]] -deps = ["ADTypes", "DifferentiationInterface", "Distributed", "FiniteDiff", "ForwardDiff"] -git-tree-sha1 = "25a6638571a902ecfb1ae2a18fc1575f86b1d4df" -uuid = "d41bc354-129a-5804-8e4c-c37616107c6c" -version = "7.10.0" - -[[deps.NaNMath]] -deps = ["OpenLibm_jll"] -git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" -uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.1.3" - -[[deps.NamedTupleTools]] -git-tree-sha1 = "90914795fc59df44120fe3fff6742bb0d7adb1d0" -uuid = "d9ec5142-1e00-5aa0-9d6a-321866360f50" -version = "0.14.3" - -[[deps.NearestNeighbors]] -deps = ["Distances", "StaticArrays"] -git-tree-sha1 = "ca7e18198a166a1f3eb92a3650d53d94ed8ca8a1" -uuid = "b8a86587-4115-5ab1-83bc-aa920d37bbce" -version = "0.4.22" - -[[deps.Netpbm]] -deps = ["FileIO", "ImageCore", "ImageMetadata"] -git-tree-sha1 = "d92b107dbb887293622df7697a2223f9f8176fcd" -uuid = "f09324ee-3d7c-5217-9330-fc30815ba969" -version = "1.1.1" - -[[deps.NetworkOptions]] -uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -version = "1.3.0" - -[[deps.Observables]] -git-tree-sha1 = "7438a59546cf62428fc9d1bc94729146d37a7225" -uuid = "510215fc-4207-5dde-b226-833fc4488ee2" -version = "0.5.5" - -[[deps.OffsetArrays]] -git-tree-sha1 = "117432e406b5c023f665fa73dc26e79ec3630151" -uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" -version = "1.17.0" -weakdeps = ["Adapt"] - - [deps.OffsetArrays.extensions] - OffsetArraysAdaptExt = "Adapt" - -[[deps.Ogg_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "b6aa4566bb7ae78498a5e68943863fa8b5231b59" -uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" -version = "1.3.6+0" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.29+0" - -[[deps.OpenEXR]] -deps = ["Colors", "FileIO", "OpenEXR_jll"] -git-tree-sha1 = "97db9e07fe2091882c765380ef58ec553074e9c7" -uuid = "52e1d378-f018-4a11-a4be-720524705ac7" -version = "0.3.3" - -[[deps.OpenEXR_jll]] -deps = ["Artifacts", "Imath_jll", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "8292dd5c8a38257111ada2174000a33745b06d4e" -uuid = "18a262bb-aa17-5467-a713-aee519bc75cb" -version = "3.2.4+0" - -[[deps.OpenJpeg_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libtiff_jll", "LittleCMS_jll", "libpng_jll"] -git-tree-sha1 = "215a6666fee6d6b3a6e75f2cc22cb767e2dd393a" -uuid = "643b3616-a352-519d-856d-80112ee9badc" -version = "2.5.5+0" - -[[deps.OpenLibm_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.7+0" - -[[deps.OpenSSL]] -deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] -git-tree-sha1 = "f1a7e086c677df53e064e0fdd2c9d0b0833e3f6e" -uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" -version = "1.5.0" - -[[deps.OpenSSL_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "3.5.1+0" - -[[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" -uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.6+0" - -[[deps.Optim]] -deps = ["Compat", "EnumX", "FillArrays", "ForwardDiff", "LineSearches", "LinearAlgebra", "NLSolversBase", "NaNMath", "PositiveFactorizations", "Printf", "SparseArrays", "StatsBase"] -git-tree-sha1 = "61942645c38dd2b5b78e2082c9b51ab315315d10" -uuid = "429524aa-4258-5aef-a3af-852621145aeb" -version = "1.13.2" - - [deps.Optim.extensions] - OptimMOIExt = "MathOptInterface" - - [deps.Optim.weakdeps] - MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" - -[[deps.Opus_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c392fc5dd032381919e3b22dd32d6443760ce7ea" -uuid = "91d4177d-7536-5919-b921-800302f37372" -version = "1.5.2+0" - -[[deps.OrderedCollections]] -git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.8.1" - -[[deps.PCRE2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" -version = "10.44.0+1" - -[[deps.PDMats]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "d922b4d80d1e12c658da7785e754f4796cc1d60d" -uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" -version = "0.11.36" -weakdeps = ["StatsBase"] - - [deps.PDMats.extensions] - StatsBaseExt = "StatsBase" - -[[deps.PNGFiles]] -deps = ["Base64", "CEnum", "ImageCore", "IndirectArrays", "OffsetArrays", "libpng_jll"] -git-tree-sha1 = "cf181f0b1e6a18dfeb0ee8acc4a9d1672499626c" -uuid = "f57f5aa1-a3ce-4bc8-8ab9-96f992907883" -version = "0.4.4" - -[[deps.PaddedViews]] -deps = ["OffsetArrays"] -git-tree-sha1 = "0fac6313486baae819364c52b4f483450a9d793f" -uuid = "5432bcbf-9aad-5242-b902-cca2824c8663" -version = "0.5.12" - -[[deps.Pango_jll]] -deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1f7f9bbd5f7a2e5a9f7d96e51c9754454ea7f60b" -uuid = "36c8627f-9965-5494-a995-c6b170f724f3" -version = "1.56.4+0" - -[[deps.Parameters]] -deps = ["OrderedCollections", "UnPack"] -git-tree-sha1 = "34c0e9ad262e5f7fc75b10a9952ca7692cfc5fbe" -uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a" -version = "0.12.3" - -[[deps.Parsers]] -deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "7d2f8f21da5db6a806faf7b9b292296da42b2810" -uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.8.3" - -[[deps.Pixman_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl"] -git-tree-sha1 = "db76b1ecd5e9715f3d043cec13b2ec93ce015d53" -uuid = "30392449-352a-5448-841d-b1acce4e97dc" -version = "0.44.2+0" - -[[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.12.0" -weakdeps = ["REPL"] - - [deps.Pkg.extensions] - REPLExt = "REPL" - -[[deps.PkgVersion]] -deps = ["Pkg"] -git-tree-sha1 = "f9501cc0430a26bc3d156ae1b5b0c1b47af4d6da" -uuid = "eebad327-c553-4316-9ea0-9fa01ccd7688" -version = "0.3.3" - -[[deps.PlotThemes]] -deps = ["PlotUtils", "Statistics"] -git-tree-sha1 = "41031ef3a1be6f5bbbf3e8073f210556daeae5ca" -uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a" -version = "3.3.0" - -[[deps.PlotUtils]] -deps = ["ColorSchemes", "Colors", "Dates", "PrecompileTools", "Printf", "Random", "Reexport", "StableRNGs", "Statistics"] -git-tree-sha1 = "3ca9a356cd2e113c420f2c13bea19f8d3fb1cb18" -uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" -version = "1.4.3" - -[[deps.Plots]] -deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "TOML", "UUIDs", "UnicodeFun", "UnitfulLatexify", "Unzip"] -git-tree-sha1 = "bfe839e9668f0c58367fb62d8757315c0eac8777" -uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -version = "1.40.20" - - [deps.Plots.extensions] - FileIOExt = "FileIO" - GeometryBasicsExt = "GeometryBasics" - IJuliaExt = "IJulia" - ImageInTerminalExt = "ImageInTerminal" - UnitfulExt = "Unitful" - - [deps.Plots.weakdeps] - FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" - GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326" - IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a" - ImageInTerminal = "d8c32880-2388-543b-8c61-d9f865259254" - Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - -[[deps.PlutoTeachingTools]] -deps = ["Downloads", "HypertextLiteral", "Latexify", "Markdown", "PlutoUI"] -git-tree-sha1 = "dacc8be63916b078b592806acd13bb5e5137d7e9" -uuid = "661c6b06-c737-4d37-b85c-46df65de6f69" -version = "0.4.6" - -[[deps.PlutoUI]] -deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "Downloads", "FixedPointNumbers", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "MIMEs", "Markdown", "Random", "Reexport", "URIs", "UUIDs"] -git-tree-sha1 = "3faff84e6f97a7f18e0dd24373daa229fd358db5" -uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" -version = "0.7.73" - -[[deps.PolyaGammaHybridSamplers]] -deps = ["Distributions", "Random", "SpecialFunctions", "StatsFuns"] -git-tree-sha1 = "9f6139650ff57f9d8528cd809ebc604c7e9738b1" -uuid = "c636ee4f-4591-4d8c-9fae-2dea21daa433" -version = "1.2.6" - -[[deps.PolyesterWeave]] -deps = ["BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "Static", "ThreadingUtilities"] -git-tree-sha1 = "645bed98cd47f72f67316fd42fc47dee771aefcd" -uuid = "1d0040c9-8b98-4ee7-8388-3f51789ca0ad" -version = "0.2.2" - -[[deps.Polynomials]] -deps = ["LinearAlgebra", "OrderedCollections", "RecipesBase", "Requires", "Setfield", "SparseArrays"] -git-tree-sha1 = "972089912ba299fba87671b025cd0da74f5f54f7" -uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45" -version = "4.1.0" - - [deps.Polynomials.extensions] - PolynomialsChainRulesCoreExt = "ChainRulesCore" - PolynomialsFFTWExt = "FFTW" - PolynomialsMakieExt = "Makie" - PolynomialsMutableArithmeticsExt = "MutableArithmetics" - - [deps.Polynomials.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" - Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" - MutableArithmetics = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" - -[[deps.PositiveFactorizations]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "17275485f373e6673f7e7f97051f703ed5b15b20" -uuid = "85a6dd25-e78a-55b7-8502-1745935b8125" -version = "0.2.4" - -[[deps.PrecompileTools]] -deps = ["Preferences"] -git-tree-sha1 = "07a921781cab75691315adc645096ed5e370cb77" -uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.3.3" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "0f27480397253da18fe2c12a4ba4eb9eb208bf3d" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.5.0" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -version = "1.11.0" - -[[deps.ProgressMeter]] -deps = ["Distributed", "Printf"] -git-tree-sha1 = "fbb92c6c56b34e1a2c4c36058f68f332bec840e7" -uuid = "92933f4c-e287-5a05-a399-4b506db050ca" -version = "1.11.0" - -[[deps.PtrArrays]] -git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" -uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" -version = "1.3.0" - -[[deps.QOI]] -deps = ["ColorTypes", "FileIO", "FixedPointNumbers"] -git-tree-sha1 = "8b3fc30bc0390abdce15f8822c889f669baed73d" -uuid = "4b34888f-f399-49d4-9bb3-47ed5cae4e65" -version = "1.0.1" - -[[deps.Qt6Base_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Vulkan_Loader_jll", "Xorg_libSM_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_cursor_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "libinput_jll", "xkbcommon_jll"] -git-tree-sha1 = "34f7e5d2861083ec7596af8b8c092531facf2192" -uuid = "c0090381-4147-56d7-9ebc-da0b1113ec56" -version = "6.8.2+2" - -[[deps.Qt6Declarative_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6ShaderTools_jll"] -git-tree-sha1 = "da7adf145cce0d44e892626e647f9dcbe9cb3e10" -uuid = "629bc702-f1f5-5709-abd5-49b8460ea067" -version = "6.8.2+1" - -[[deps.Qt6ShaderTools_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll"] -git-tree-sha1 = "9eca9fc3fe515d619ce004c83c31ffd3f85c7ccf" -uuid = "ce943373-25bb-56aa-8eca-768745ed7b5a" -version = "6.8.2+1" - -[[deps.Qt6Wayland_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6Declarative_jll"] -git-tree-sha1 = "8f528b0851b5b7025032818eb5abbeb8a736f853" -uuid = "e99dba38-086e-5de3-a5b1-6e4c66e897c3" -version = "6.8.2+2" - -[[deps.QuadGK]] -deps = ["DataStructures", "LinearAlgebra"] -git-tree-sha1 = "9da16da70037ba9d701192e27befedefb91ec284" -uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" -version = "2.11.2" - - [deps.QuadGK.extensions] - QuadGKEnzymeExt = "Enzyme" - - [deps.QuadGK.weakdeps] - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - -[[deps.Quaternions]] -deps = ["LinearAlgebra", "Random", "RealDot"] -git-tree-sha1 = "994cc27cdacca10e68feb291673ec3a76aa2fae9" -uuid = "94ee1d12-ae83-5a48-8b1c-48b8ff168ae0" -version = "0.7.6" - -[[deps.REPL]] -deps = ["InteractiveUtils", "JuliaSyntaxHighlighting", "Markdown", "Sockets", "StyledStrings", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" -version = "1.11.0" - -[[deps.Random]] -deps = ["SHA"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -version = "1.11.0" - -[[deps.RangeArrays]] -git-tree-sha1 = "b9039e93773ddcfc828f12aadf7115b4b4d225f5" -uuid = "b3c3ace0-ae52-54e7-9d0b-2c1406fd6b9d" -version = "0.3.2" - -[[deps.Ratios]] -deps = ["Requires"] -git-tree-sha1 = "1342a47bf3260ee108163042310d26f2be5ec90b" -uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439" -version = "0.4.5" -weakdeps = ["FixedPointNumbers"] - - [deps.Ratios.extensions] - RatiosFixedPointNumbersExt = "FixedPointNumbers" - -[[deps.ReactiveMP]] -deps = ["BayesBase", "DataStructures", "DiffResults", "Distributions", "DomainIntegrals", "DomainSets", "ExponentialFamily", "FastCholesky", "FastGaussQuadrature", "FixedArguments", "ForwardDiff", "HCubature", "LazyArrays", "LinearAlgebra", "MacroTools", "MatrixCorrectionTools", "Optim", "PolyaGammaHybridSamplers", "PositiveFactorizations", "Random", "Rocket", "SpecialFunctions", "StaticArrays", "StatsBase", "StatsFuns", "TinyHugeNumbers", "Tullio", "TupleTools", "Unrolled"] -git-tree-sha1 = "dcd2f85ba9f2f7be1b1b31708db889d078b161f6" -uuid = "a194aa59-28ba-4574-a09c-4a745416d6e3" -version = "5.6.2" - - [deps.ReactiveMP.extensions] - ReactiveMPOptimisersExt = "Optimisers" - ReactiveMPProjectionExt = "ExponentialFamilyProjection" - ReactiveMPRequiresExt = "Requires" - - [deps.ReactiveMP.weakdeps] - ExponentialFamilyProjection = "17f509fa-9a96-44ba-99b2-1c5f01f0931b" - Optimisers = "3bd65402-5787-11e9-1adc-39752487f4e2" - Requires = "ae029012-a4dd-5104-9daa-d747884805df" - -[[deps.RealDot]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" -uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" -version = "0.1.0" - -[[deps.RecipesBase]] -deps = ["PrecompileTools"] -git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" -uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "1.3.4" - -[[deps.RecipesPipeline]] -deps = ["Dates", "NaNMath", "PlotUtils", "PrecompileTools", "RecipesBase"] -git-tree-sha1 = "45cf9fd0ca5839d06ef333c8201714e888486342" -uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" -version = "0.6.12" - -[[deps.Reexport]] -git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" -uuid = "189a3867-3050-52da-a836-e630ba90ab69" -version = "1.2.2" - -[[deps.RegionTrees]] -deps = ["IterTools", "LinearAlgebra", "StaticArrays"] -git-tree-sha1 = "4618ed0da7a251c7f92e869ae1a19c74a7d2a7f9" -uuid = "dee08c22-ab7f-5625-9660-a9af2021b33f" -version = "0.3.2" - -[[deps.RelocatableFolders]] -deps = ["SHA", "Scratch"] -git-tree-sha1 = "ffdaf70d81cf6ff22c2b6e733c900c3321cab864" -uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" -version = "1.0.1" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.1" - -[[deps.Rmath]] -deps = ["Random", "Rmath_jll"] -git-tree-sha1 = "4395a4cad612f95c1d08352f8c53811d6af3060b" -uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" -version = "0.8.1" - -[[deps.Rmath_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "58cdd8fb2201a6267e1db87ff148dd6c1dbd8ad8" -uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" -version = "0.5.1+0" - -[[deps.Rocket]] -deps = ["DataStructures", "Sockets", "Unrolled"] -git-tree-sha1 = "fe7373bf6b935c4431002fd91fa581d5eb835d09" -uuid = "df971d30-c9d6-4b37-b8ff-e965b2cb3a40" -version = "1.8.3" - -[[deps.Rotations]] -deps = ["LinearAlgebra", "Quaternions", "Random", "StaticArrays"] -git-tree-sha1 = "5680a9276685d392c87407df00d57c9924d9f11e" -uuid = "6038ab10-8711-5258-84ad-4b1120ba62dc" -version = "1.7.1" -weakdeps = ["RecipesBase"] - - [deps.Rotations.extensions] - RotationsRecipesBaseExt = "RecipesBase" - -[[deps.RxInfer]] -deps = ["BayesBase", "DataStructures", "Dates", "Distributions", "DomainSets", "ExponentialFamily", "FastCholesky", "GraphPPL", "HTTP", "JSON", "LinearAlgebra", "Logging", "MacroTools", "Optim", "Preferences", "ProgressMeter", "Random", "ReactiveMP", "Reexport", "Rocket", "Static", "Statistics", "TupleTools", "UUIDs"] -git-tree-sha1 = "bcaf218d6b5329dc5e5be4299cbb5818c2c7bb19" -uuid = "86711068-29c9-4ff7-b620-ae75d7495b3d" -version = "4.6.2" - - [deps.RxInfer.extensions] - PrettyTablesExt = "PrettyTables" - ProjectionExt = "ExponentialFamilyProjection" - - [deps.RxInfer.weakdeps] - ExponentialFamilyProjection = "17f509fa-9a96-44ba-99b2-1c5f01f0931b" - PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.SIMD]] -deps = ["PrecompileTools"] -git-tree-sha1 = "e24dc23107d426a096d3eae6c165b921e74c18e4" -uuid = "fdea26ae-647d-5447-a871-4b548cad5224" -version = "3.7.2" - -[[deps.SIMDTypes]] -git-tree-sha1 = "330289636fb8107c5f32088d2741e9fd7a061a5c" -uuid = "94e857df-77ce-4151-89e5-788b33177be4" -version = "0.1.0" - -[[deps.SLEEFPirates]] -deps = ["IfElse", "Static", "VectorizationBase"] -git-tree-sha1 = "456f610ca2fbd1c14f5fcf31c6bfadc55e7d66e0" -uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa" -version = "0.6.43" - -[[deps.SciMLPublic]] -git-tree-sha1 = "ed647f161e8b3f2973f24979ec074e8d084f1bee" -uuid = "431bcebd-1456-4ced-9d72-93c2757fff0b" -version = "1.0.0" - -[[deps.ScopedValues]] -deps = ["HashArrayMappedTries", "Logging"] -git-tree-sha1 = "c3b2323466378a2ba15bea4b2f73b081e022f473" -uuid = "7e506255-f358-4e82-b7e4-beb19740aa63" -version = "1.5.0" - -[[deps.Scratch]] -deps = ["Dates"] -git-tree-sha1 = "9b81b8393e50b7d4e6d0a9f14e192294d3b7c109" -uuid = "6c6a2e73-6563-6170-7368-637461726353" -version = "1.3.0" - -[[deps.SentinelArrays]] -deps = ["Dates", "Random"] -git-tree-sha1 = "712fb0231ee6f9120e005ccd56297abbc053e7e0" -uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" -version = "1.4.8" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -version = "1.11.0" - -[[deps.Setfield]] -deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] -git-tree-sha1 = "c5391c6ace3bc430ca630251d02ea9687169ca68" -uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" -version = "1.1.2" - -[[deps.SharedArrays]] -deps = ["Distributed", "Mmap", "Random", "Serialization"] -uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" -version = "1.11.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 = "f305871d2f381d21527c770d4788c06c097c9bc1" -uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" -version = "1.2.0" - -[[deps.SimpleTraits]] -deps = ["InteractiveUtils", "MacroTools"] -git-tree-sha1 = "be8eeac05ec97d379347584fa9fe2f5f76795bcb" -uuid = "699a6c99-e7fa-54fc-8d76-47d257e15c1d" -version = "0.9.5" - -[[deps.SimpleWeightedGraphs]] -deps = ["Graphs", "LinearAlgebra", "Markdown", "SparseArrays"] -git-tree-sha1 = "3e5f165e58b18204aed03158664c4982d691f454" -uuid = "47aef6b3-ad0c-573a-a1e2-d07658019622" -version = "1.5.0" - -[[deps.Sixel]] -deps = ["Dates", "FileIO", "ImageCore", "IndirectArrays", "OffsetArrays", "REPL", "libsixel_jll"] -git-tree-sha1 = "0494aed9501e7fb65daba895fb7fd57cc38bc743" -uuid = "45858cf5-a6b0-47a3-bbea-62219f50df47" -version = "0.1.5" - -[[deps.Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -version = "1.11.0" - -[[deps.SortingAlgorithms]] -deps = ["DataStructures"] -git-tree-sha1 = "64d974c2e6fdf07f8155b5b2ca2ffa9069b608d9" -uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" -version = "1.2.2" - -[[deps.SparseArrays]] -deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.12.0" - -[[deps.SpecialFunctions]] -deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "f2685b435df2613e25fc10ad8c26dddb8640f547" -uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.6.1" -weakdeps = ["ChainRulesCore"] - - [deps.SpecialFunctions.extensions] - SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" - -[[deps.StableRNGs]] -deps = ["Random"] -git-tree-sha1 = "95af145932c2ed859b63329952ce8d633719f091" -uuid = "860ef19b-820b-49d6-a774-d7a799459cd3" -version = "1.0.3" - -[[deps.StackViews]] -deps = ["OffsetArrays"] -git-tree-sha1 = "be1cf4eb0ac528d96f5115b4ed80c26a8d8ae621" -uuid = "cae243ae-269e-4f55-b966-ac2d0dc13c15" -version = "0.1.2" - -[[deps.Static]] -deps = ["CommonWorldInvalidations", "IfElse", "PrecompileTools", "SciMLPublic"] -git-tree-sha1 = "49440414711eddc7227724ae6e570c7d5559a086" -uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" -version = "1.3.1" - -[[deps.StaticArrayInterface]] -deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools", "Static"] -git-tree-sha1 = "96381d50f1ce85f2663584c8e886a6ca97e60554" -uuid = "0d7ed370-da01-4f52-bd93-41d350b8b718" -version = "1.8.0" -weakdeps = ["OffsetArrays", "StaticArrays"] - - [deps.StaticArrayInterface.extensions] - StaticArrayInterfaceOffsetArraysExt = "OffsetArrays" - StaticArrayInterfaceStaticArraysExt = "StaticArrays" - -[[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "b8693004b385c842357406e3af647701fe783f98" -uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.15" -weakdeps = ["ChainRulesCore", "Statistics"] - - [deps.StaticArrays.extensions] - StaticArraysChainRulesCoreExt = "ChainRulesCore" - StaticArraysStatisticsExt = "Statistics" - -[[deps.StaticArraysCore]] -git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" -uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.3" - -[[deps.Statistics]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.Statistics.extensions] - SparseArraysExt = ["SparseArrays"] - -[[deps.StatsAPI]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9d72a13a3f4dd3795a195ac5a44d7d6ff5f552ff" -uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" -version = "1.7.1" - -[[deps.StatsBase]] -deps = ["AliasTables", "DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "2c962245732371acd51700dbb268af311bddd719" -uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.34.6" - -[[deps.StatsFuns]] -deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] -git-tree-sha1 = "8e45cecc66f3b42633b8ce14d431e8e57a3e242e" -uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" -version = "1.5.0" - - [deps.StatsFuns.extensions] - StatsFunsChainRulesCoreExt = "ChainRulesCore" - StatsFunsInverseFunctionsExt = "InverseFunctions" - - [deps.StatsFuns.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.StatsPlots]] -deps = ["AbstractFFTs", "Clustering", "DataStructures", "Distributions", "Interpolations", "KernelDensity", "LinearAlgebra", "MultivariateStats", "NaNMath", "Observables", "Plots", "RecipesBase", "RecipesPipeline", "Reexport", "StatsBase", "TableOperations", "Tables", "Widgets"] -git-tree-sha1 = "88cf3587711d9ad0a55722d339a013c4c56c5bbc" -uuid = "f3b207a7-027a-5e70-b257-86293d7955fd" -version = "0.15.8" - -[[deps.StyledStrings]] -uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b" -version = "1.11.0" - -[[deps.SuiteSparse]] -deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] -uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" - -[[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] -uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.8.3+2" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[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", "OrderedCollections", "TableTraits"] -git-tree-sha1 = "f2c1efbc8f3a609aadf318094f8fc5204bdaf344" -uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.12.1" - -[[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" -version = "1.11.0" - -[[deps.ThreadingUtilities]] -deps = ["ManualMemory"] -git-tree-sha1 = "d969183d3d244b6c33796b5ed01ab97328f2db85" -uuid = "8290d209-cae3-49c0-8002-c8c24d57dab5" -version = "0.5.5" - -[[deps.TiffImages]] -deps = ["ColorTypes", "DataStructures", "DocStringExtensions", "FileIO", "FixedPointNumbers", "IndirectArrays", "Inflate", "Mmap", "OffsetArrays", "PkgVersion", "PrecompileTools", "ProgressMeter", "SIMD", "UUIDs"] -git-tree-sha1 = "98b9352a24cb6a2066f9ababcc6802de9aed8ad8" -uuid = "731e570b-9d59-4bfa-96dc-6df516fadf69" -version = "0.11.6" - -[[deps.TiledIteration]] -deps = ["OffsetArrays", "StaticArrayInterface"] -git-tree-sha1 = "1176cc31e867217b06928e2f140c90bd1bc88283" -uuid = "06e1c1a7-607b-532d-9fad-de7d9aa2abac" -version = "0.5.0" - -[[deps.TinyHugeNumbers]] -git-tree-sha1 = "83c6abf376718345a85c071b249ef6692a8936d4" -uuid = "783c9a47-75a3-44ac-a16b-f1ab7b3acf04" -version = "1.0.3" - -[[deps.TranscodingStreams]] -git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742" -uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" -version = "0.11.3" - -[[deps.Tricks]] -git-tree-sha1 = "372b90fe551c019541fafc6ff034199dc19c8436" -uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" -version = "0.1.12" - -[[deps.Tullio]] -deps = ["DiffRules", "LinearAlgebra", "Requires"] -git-tree-sha1 = "972698b132b9df8791ae74aa547268e977b55f68" -uuid = "bc48ee85-29a4-5162-ae0b-a64e1601d4bc" -version = "0.3.8" - - [deps.Tullio.extensions] - TullioCUDAExt = "CUDA" - TullioChainRulesCoreExt = "ChainRulesCore" - TullioFillArraysExt = "FillArrays" - TullioTrackerExt = "Tracker" - - [deps.Tullio.weakdeps] - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - -[[deps.TupleTools]] -git-tree-sha1 = "41e43b9dc950775eac654b9f845c839cd2f1821e" -uuid = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6" -version = "1.6.0" - -[[deps.URIs]] -git-tree-sha1 = "bef26fb046d031353ef97a82e3fdb6afe7f21b1a" -uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -version = "1.6.1" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -version = "1.11.0" - -[[deps.UnPack]] -git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" -uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" -version = "1.0.2" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -version = "1.11.0" - -[[deps.UnicodeFun]] -deps = ["REPL"] -git-tree-sha1 = "53915e50200959667e78a92a418594b428dffddf" -uuid = "1cfade01-22cf-5700-b092-accc4b62d6e1" -version = "0.4.1" - -[[deps.Unitful]] -deps = ["Dates", "LinearAlgebra", "Random"] -git-tree-sha1 = "6258d453843c466d84c17a58732dda5deeb8d3af" -uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" -version = "1.24.0" - - [deps.Unitful.extensions] - ConstructionBaseUnitfulExt = "ConstructionBase" - ForwardDiffExt = "ForwardDiff" - InverseFunctionsUnitfulExt = "InverseFunctions" - PrintfExt = "Printf" - - [deps.Unitful.weakdeps] - ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[deps.UnitfulLatexify]] -deps = ["LaTeXStrings", "Latexify", "Unitful"] -git-tree-sha1 = "af305cc62419f9bd61b6644d19170a4d258c7967" -uuid = "45397f5d-5981-4c77-b2b3-fc36d6e9b728" -version = "1.7.0" - -[[deps.Unrolled]] -deps = ["MacroTools"] -git-tree-sha1 = "6cc9d682755680e0f0be87c56392b7651efc2c7b" -uuid = "9602ed7d-8fef-5bc8-8597-8f21381861e8" -version = "0.1.5" - -[[deps.Unzip]] -git-tree-sha1 = "ca0969166a028236229f63514992fc073799bb78" -uuid = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" -version = "0.2.0" - -[[deps.VectorizationBase]] -deps = ["ArrayInterface", "CPUSummary", "HostCPUFeatures", "IfElse", "LayoutPointers", "Libdl", "LinearAlgebra", "SIMDTypes", "Static", "StaticArrayInterface"] -git-tree-sha1 = "d1d9a935a26c475ebffd54e9c7ad11627c43ea85" -uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f" -version = "0.21.72" - -[[deps.Vulkan_Loader_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Wayland_jll", "Xorg_libX11_jll", "Xorg_libXrandr_jll", "xkbcommon_jll"] -git-tree-sha1 = "2f0486047a07670caad3a81a075d2e518acc5c59" -uuid = "a44049a8-05dd-5a78-86c9-5fde0876e88c" -version = "1.3.243+0" - -[[deps.Wayland_jll]] -deps = ["Artifacts", "EpollShim_jll", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll"] -git-tree-sha1 = "96478df35bbc2f3e1e791bc7a3d0eeee559e60e9" -uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" -version = "1.24.0+0" - -[[deps.WebP]] -deps = ["CEnum", "ColorTypes", "FileIO", "FixedPointNumbers", "ImageCore", "libwebp_jll"] -git-tree-sha1 = "aa1ca3c47f119fbdae8770c29820e5e6119b83f2" -uuid = "e3aaa7dc-3e4b-44e0-be63-ffb868ccd7c1" -version = "0.1.3" - -[[deps.Widgets]] -deps = ["Colors", "Dates", "Observables", "OrderedCollections"] -git-tree-sha1 = "e9aeb174f95385de31e70bd15fa066a505ea82b9" -uuid = "cc8bc4a8-27d6-5769-a93b-9d913e69aa62" -version = "0.6.7" - -[[deps.WoodburyMatrices]] -deps = ["LinearAlgebra", "SparseArrays"] -git-tree-sha1 = "c1a7aa6219628fcd757dede0ca95e245c5cd9511" -uuid = "efce3f68-66dc-5838-9240-27a6d6f5f9b6" -version = "1.0.0" - -[[deps.XZ_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "fee71455b0aaa3440dfdd54a9a36ccef829be7d4" -uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" -version = "5.8.1+0" - -[[deps.Xorg_libICE_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a3ea76ee3f4facd7a64684f9af25310825ee3668" -uuid = "f67eecfb-183a-506d-b269-f58e52b52d7c" -version = "1.1.2+0" - -[[deps.Xorg_libSM_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libICE_jll"] -git-tree-sha1 = "9c7ad99c629a44f81e7799eb05ec2746abb5d588" -uuid = "c834827a-8449-5923-a945-d239c165b7dd" -version = "1.2.6+0" - -[[deps.Xorg_libX11_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] -git-tree-sha1 = "b5899b25d17bf1889d25906fb9deed5da0c15b3b" -uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" -version = "1.8.12+0" - -[[deps.Xorg_libXau_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "aa1261ebbac3ccc8d16558ae6799524c450ed16b" -uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" -version = "1.0.13+0" - -[[deps.Xorg_libXcursor_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] -git-tree-sha1 = "6c74ca84bbabc18c4547014765d194ff0b4dc9da" -uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" -version = "1.2.4+0" - -[[deps.Xorg_libXdmcp_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "52858d64353db33a56e13c341d7bf44cd0d7b309" -uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" -version = "1.1.6+0" - -[[deps.Xorg_libXext_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "a4c0ee07ad36bf8bbce1c3bb52d21fb1e0b987fb" -uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" -version = "1.3.7+0" - -[[deps.Xorg_libXfixes_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "75e00946e43621e09d431d9b95818ee751e6b2ef" -uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" -version = "6.0.2+0" - -[[deps.Xorg_libXi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] -git-tree-sha1 = "a376af5c7ae60d29825164db40787f15c80c7c54" -uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" -version = "1.8.3+0" - -[[deps.Xorg_libXinerama_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll"] -git-tree-sha1 = "a5bc75478d323358a90dc36766f3c99ba7feb024" -uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" -version = "1.1.6+0" - -[[deps.Xorg_libXrandr_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXrender_jll"] -git-tree-sha1 = "aff463c82a773cb86061bce8d53a0d976854923e" -uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" -version = "1.5.5+0" - -[[deps.Xorg_libXrender_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "7ed9347888fac59a618302ee38216dd0379c480d" -uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" -version = "0.9.12+0" - -[[deps.Xorg_libxcb_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXau_jll", "Xorg_libXdmcp_jll"] -git-tree-sha1 = "bfcaf7ec088eaba362093393fe11aa141fa15422" -uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" -version = "1.17.1+0" - -[[deps.Xorg_libxkbfile_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "e3150c7400c41e207012b41659591f083f3ef795" -uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" -version = "1.1.3+0" - -[[deps.Xorg_xcb_util_cursor_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_jll", "Xorg_xcb_util_renderutil_jll"] -git-tree-sha1 = "9750dc53819eba4e9a20be42349a6d3b86c7cdf8" -uuid = "e920d4aa-a673-5f3a-b3d7-f755a4d47c43" -version = "0.1.6+0" - -[[deps.Xorg_xcb_util_image_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] -git-tree-sha1 = "f4fc02e384b74418679983a97385644b67e1263b" -uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b" -version = "0.4.1+0" - -[[deps.Xorg_xcb_util_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll"] -git-tree-sha1 = "68da27247e7d8d8dafd1fcf0c3654ad6506f5f97" -uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5" -version = "0.4.1+0" - -[[deps.Xorg_xcb_util_keysyms_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] -git-tree-sha1 = "44ec54b0e2acd408b0fb361e1e9244c60c9c3dd4" -uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7" -version = "0.4.1+0" - -[[deps.Xorg_xcb_util_renderutil_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] -git-tree-sha1 = "5b0263b6d080716a02544c55fdff2c8d7f9a16a0" -uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e" -version = "0.3.10+0" - -[[deps.Xorg_xcb_util_wm_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] -git-tree-sha1 = "f233c83cad1fa0e70b7771e0e21b061a116f2763" -uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361" -version = "0.4.2+0" - -[[deps.Xorg_xkbcomp_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxkbfile_jll"] -git-tree-sha1 = "801a858fc9fb90c11ffddee1801bb06a738bda9b" -uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" -version = "1.4.7+0" - -[[deps.Xorg_xkeyboard_config_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xkbcomp_jll"] -git-tree-sha1 = "00af7ebdc563c9217ecc67776d1bbf037dbcebf4" -uuid = "33bec58e-1273-512f-9401-5d533626f822" -version = "2.44.0+0" - -[[deps.Xorg_xtrans_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a63799ff68005991f9d9491b6e95bd3478d783cb" -uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" -version = "1.6.0+0" - -[[deps.Zlib_jll]] -deps = ["Libdl"] -uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.3.1+2" - -[[deps.Zstd_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "446b23e73536f84e8037f5dce465e92275f6a308" -uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" -version = "1.5.7+1" - -[[deps.eudev_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c3b0e6196d50eab0c5ed34021aaa0bb463489510" -uuid = "35ca27e7-8b34-5b7f-bca9-bdc33f59eb06" -version = "3.2.14+0" - -[[deps.fzf_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "b6a34e0e0960190ac2a4363a1bd003504772d631" -uuid = "214eeab7-80f7-51ab-84ad-2988db7cef09" -version = "0.61.1+0" - -[[deps.libaom_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "371cc681c00a3ccc3fbc5c0fb91f58ba9bec1ecf" -uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" -version = "3.13.1+0" - -[[deps.libass_jll]] -deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "125eedcb0a4a0bba65b657251ce1d27c8714e9d6" -uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" -version = "0.17.4+0" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.15.0+0" - -[[deps.libdecor_jll]] -deps = ["Artifacts", "Dbus_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pango_jll", "Wayland_jll", "xkbcommon_jll"] -git-tree-sha1 = "9bf7903af251d2050b467f76bdbe57ce541f7f4f" -uuid = "1183f4f0-6f2a-5f1a-908b-139f9cdfea6f" -version = "0.2.2+0" - -[[deps.libevdev_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "56d643b57b188d30cccc25e331d416d3d358e557" -uuid = "2db6ffa8-e38f-5e21-84af-90c45d0032cc" -version = "1.13.4+0" - -[[deps.libfdk_aac_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "646634dd19587a56ee2f1199563ec056c5f228df" -uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" -version = "2.0.4+0" - -[[deps.libinput_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "eudev_jll", "libevdev_jll", "mtdev_jll"] -git-tree-sha1 = "91d05d7f4a9f67205bd6cf395e488009fe85b499" -uuid = "36db933b-70db-51c0-b978-0f229ee0e533" -version = "1.28.1+0" - -[[deps.libpng_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "07b6a107d926093898e82b3b1db657ebe33134ec" -uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -version = "1.6.50+0" - -[[deps.libsixel_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "libpng_jll"] -git-tree-sha1 = "c1733e347283df07689d71d61e14be986e49e47a" -uuid = "075b6546-f08a-558a-be8f-8157d0f608a5" -version = "1.10.5+0" - -[[deps.libvorbis_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll"] -git-tree-sha1 = "11e1772e7f3cc987e9d3de991dd4f6b2602663a5" -uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" -version = "1.3.8+0" - -[[deps.libwebp_jll]] -deps = ["Artifacts", "Giflib_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libglvnd_jll", "Libtiff_jll", "libpng_jll"] -git-tree-sha1 = "4e4282c4d846e11dce56d74fa8040130b7a95cb3" -uuid = "c5f90fcd-3b7e-5836-afba-fc50a0988cb2" -version = "1.6.0+0" - -[[deps.libzip_jll]] -deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "OpenSSL_jll", "XZ_jll", "Zlib_jll", "Zstd_jll"] -git-tree-sha1 = "86addc139bca85fdf9e7741e10977c45785727b7" -uuid = "337d8026-41b4-5cde-a456-74a10e5b31d1" -version = "1.11.3+0" - -[[deps.mtdev_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "b4d631fd51f2e9cdd93724ae25b2efc198b059b1" -uuid = "009596ad-96f7-51b1-9f1b-5ce2d5e8a71e" -version = "1.1.7+0" - -[[deps.nghttp2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.64.0+1" - -[[deps.oneTBB_jll]] -deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] -git-tree-sha1 = "1350188a69a6e46f799d3945beef36435ed7262f" -uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e" -version = "2022.0.0+1" - -[[deps.p7zip_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.5.0+2" - -[[deps.x264_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "14cc7083fc6dff3cc44f2bc435ee96d06ed79aa7" -uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a" -version = "10164.0.1+0" - -[[deps.x265_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "e7b67590c14d487e734dcb925924c5dc43ec85f3" -uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" -version = "4.1.0+0" - -[[deps.xkbcommon_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] -git-tree-sha1 = "fbf139bce07a534df0e699dbb5f5cc9346f95cc1" -uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" -version = "1.9.2+0" -""" - -# ╔═╡ Cell order: -# ╟─27289f68-d294-11ef-37d6-e399ed72a1d0 -# ╟─6107b57e-cda2-46fb-b6f8-bd0e3787516d -# ╟─2728adf0-d294-11ef-2467-f176bb42fb8b -# ╟─50c601c9-ec68-4155-932c-190bced1ac9a -# ╟─2728b7c8-d294-11ef-06e6-5329a76c16be -# ╟─91fb40f2-8c2d-4e0e-8a8a-8d823ed869dc -# ╟─49fd6d97-8ef1-49cd-8dcb-dafddb14814c -# ╟─4940b72d-182d-47bb-a446-51ce42724beb -# ╟─6b7f6d3b-8ad6-434a-babe-2597e86299fa -# ╟─fc919736-d9e3-4ca0-a53c-5fac18539ab5 -# ╟─2728c344-d294-11ef-1c5e-8d601b7ac3f9 -# ╟─2728d136-d294-11ef-27bc-6de51ace159c -# ╟─73104616-8cb4-4665-b09b-1c771ecdf372 -# ╟─2728dece-d294-11ef-2dda-af89555d838f -# ╟─2728e5c2-d294-11ef-1788-9b3699bb4ccd -# ╟─2729087c-d294-11ef-3f71-51112552f7b9 -# ╟─5d9d2972-0507-47a1-a726-26bb129f62f9 -# ╟─63f422ca-ba15-41ad-b36b-7a6aa4cc5e2a -# ╟─27290f78-d294-11ef-2ac4-b179be83b812 -# ╟─27295340-d294-11ef-3a56-131df0415315 -# ╟─27296132-d294-11ef-0d39-9da05d6c20b7 -# ╟─6bcabd28-f72b-47d9-b846-b1528f3758bb -# ╟─27298004-d294-11ef-06db-490237bf9408 -# ╟─d51bd37b-a12f-426a-87ca-6d4e6701fdb4 -# ╟─030d6de1-1f63-47d3-bea0-abe3ddf24be4 -# ╟─99ef8d0f-679a-43d1-9bbb-91bd8ad725ec -# ╟─69446a18-bb7d-45e2-b480-dcaa76fa66c0 -# ╟─620a77a8-50c4-4005-a41b-6a6221391434 -# ╟─2f439fb0-012c-4318-bb8b-90c37d2ff43c -# ╟─a24760e2-055a-4902-a78e-65aa59b80f68 -# ╟─27298d26-d294-11ef-080e-dbe7270d9191 -# ╟─27299a12-d294-11ef-1026-ddb5ffc81543 -# ╟─2729b6dc-d294-11ef-390f-6fa53c0b04f1 -# ╟─2729c4ba-d294-11ef-1ccc-df1f4ef5f3d4 -# ╟─2729ec24-d294-11ef-2547-cbb5238bb18d -# ╟─272a00a6-d294-11ef-18ba-a3700f78b13f -# ╟─e44c6138-7f59-48f3-8f4d-7c5db8e1c016 -# ╟─bbaa44b9-9bac-4fb8-8014-fbf400a93039 -# ╟─599e21c8-1141-4192-9dd7-46b83314a1ef -# ╟─272a0d3a-d294-11ef-2537-39a6e410e56b -# ╟─83587586-8a88-4bbb-b2bf-1ca9a8cf6339 -# ╟─f2e5dd92-b4bf-495a-8c11-2f34f2667041 -# ╠═ad05de22-40db-413e-85bd-24e6ef448656 -# ╟─ec3b781d-8b44-4bf4-9562-c5362eeb8913 -# ╠═e3056eeb-777a-4323-9d2e-f376cae2e1ca -# ╟─130edb3e-f5f9-40d2-970d-d0fc822fd82a -# ╠═2618d09b-4fd6-4cdc-9d80-45f7d0b262db -# ╟─272a4b2e-d294-11ef-2762-47a3479186ad -# ╠═6e8e7cea-7f97-418e-9453-c25a5896bc71 -# ╟─557b0052-b1a4-489e-be53-2327033954f2 -# ╟─b7d0c2e7-418b-417d-992a-c93ae3598f9e -# ╟─272aaaf6-d294-11ef-0162-c76ba8ba7232 -# ╟─272ab9b2-d294-11ef-0510-c3b68d2f1099 -# ╟─d6d3b368-8be5-4201-989f-44617d0cb34e -# ╠═32f7bc6a-cf3d-44f3-9603-8c4fe5c1a32d -# ╠═25b3697e-6171-402c-97a5-201ca6bbe3a7 -# ╠═331415dc-70fd-4b58-8536-8ed47b071e25 -# ╟─272afaec-d294-11ef-3953-5f868ec73cb8 -# ╟─95ca53f8-d60a-4262-911b-b1010e0c7752 -# ╟─27a6880c-b007-4d39-9e21-e7e24fc9d059 -# ╟─7505d957-0c4d-41ba-a662-45ba4dfe4d05 -# ╟─3a188b49-919d-4168-b789-ce6a5cebf509 -# ╟─e8cab5ea-4906-4c64-b1bb-f33e267762a1 -# ╟─d5d13c2e-3e8d-454e-b0d7-cb224aed063c -# ╟─0c65804b-bd3f-40b7-9752-96f730dbdc96 -# ╟─272b07f8-d294-11ef-3bfe-bffd9e3623aa -# ╟─272b17b6-d294-11ef-1e58-a75484ab56d9 -# ╟─f44e0303-dd28-48ad-9de2-7f7882f3923d -# ╠═e66b2193-87c8-4645-bfcc-643ee006383a -# ╠═f2a42c4d-9607-4f50-bbda-9a9a4942faab -# ╠═dab295ff-5a02-4e4f-8f46-b0842b6bf1ff -# ╠═07fe12dc-501c-407b-ab39-ba9a4845762c -# ╠═60201d93-64e8-42ce-85ab-8eb661223427 -# ╟─ae8c57ce-b74d-4543-b25b-eee57ad2e415 -# ╠═24f6c005-173d-4831-8c93-c54a9ba0334e -# ╠═84018669-bff5-4d06-a8f1-df515910c4d9 -# ╟─00000000-0000-0000-0000-000000000001 -# ╟─00000000-0000-0000-0000-000000000002 diff --git a/mlss/archive/Generative Classification.jl b/mlss/archive/Generative Classification.jl deleted file mode 100644 index c2f73cf..0000000 --- a/mlss/archive/Generative Classification.jl +++ /dev/null @@ -1,2231 +0,0 @@ -### A Pluto.jl notebook ### -# v0.20.19 - -#> [frontmatter] -#> image = "https://imgur.com/TGISnuj.png" -#> description = "Can you teach a computer to tell apples from peaches? Discover generative classification!" -#> -#> [[frontmatter.author]] -#> name = "BMLIP" -#> url = "https://github.com/bmlip" - -using Markdown -using InteractiveUtils - -# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). -macro bind(def, element) - #! format: off - return quote - local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end - local el = $(esc(element)) - global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : iv(el) - el - end - #! format: on -end - -# ╔═╡ f1a40378-a27c-4aa0-a62c-600ffde0032f -using BmlipTeachingTools - -# ╔═╡ 6631c0e4-4941-442e-8dd4-fa307ee7a8c0 -using Random - -# ╔═╡ f1575443-c9fb-4674-bbce-bf3a5a6d5a8d -using Plots, Distributions - -# ╔═╡ 26853cdc-0644-4f44-b6db-b5624a4a8689 -using MarkdownLiteral: @mdx - -# ╔═╡ 50cbe27e-009f-4df1-b80a-cf1e73fc525e -using LaTeXStrings - -# ╔═╡ 23c689fc-d294-11ef-086e-47c4f871bed2 -title("Generative Classification") - -# ╔═╡ fe9d4fbc-f264-459b-8fbe-26663500f6c5 -PlutoUI.TableOfContents() - -# ╔═╡ 23c6997e-d294-11ef-09a8-a50563e5975b -md""" -## Preliminaries - -##### Goal - - * Introduction to linear generative classification with a Gaussian-categorical generative model - -##### Materials - - * Mandatory - - * These lecture notes - * Optional - - * [Bishop PRML book](https://www.microsoft.com/en-us/research/wp-content/uploads/2006/01/Bishop-Pattern-Recognition-and-Machine-Learning-2006.pdf) (2006), pp. 196-202 (section 4.2 focuses on binary classification, whereas in these lecture notes we describe generative classification for multiple classes). - -""" - -# ╔═╡ f7a19975-a919-4659-9b6a-d8963a1cd6d9 -challenge_statement("Apple or Peach?" , color= "red", header_level=1 ) - -# ╔═╡ 876f47d8-b272-4e23-b5ec-5c7d615ff618 -begin - N_bond = @bindname N Slider(1:250; show_value=true, default=50) -end - -# ╔═╡ f63b65b9-86c8-420b-b2d5-28268782f155 -md""" -In the scatter plot, the two features are represented along the two ``x``-coordinates, while the fruit label ``y \in \{\text{apple}, \text{peach}\}`` is encoded by the marker style. - -""" - -# ╔═╡ 70a620bc-47c7-46c4-870b-22b3e05039a1 -md""" -The features are stored in two matrices, corresponding to the two classes: -""" - -# ╔═╡ 5730758d-80cd-4d95-b16c-399c38cf585b -md""" -# Bayesian Generative Classification -""" - -# ╔═╡ 23c73302-d294-11ef-0c12-571686b202a9 -md""" -The plan for generative classification is as follows: -We begin by constructing a model for the joint distribution - -```math -p(x, y) = p(x | y)\, p(y), -``` -which combines a **class-conditional likelihood** ``p(x | y)`` with a **prior** ``p(y)`` over classes. -Then, we apply Bayes rule to compute the posterior class probabilities, - -```math -p(y|x) = \frac{p(x|y) p(y)}{\sum_{y^\prime} p(x|y^\prime) p(y^\prime)} \propto p(x|y)\,p(y) -``` -This posterior can then be used for classification by selecting the class with the highest probability. - -Next, we discuss the three modeling stages: (1) model specification, (2) parameter learning, (3) application (classification). - -""" - -# ╔═╡ 23c73b54-d294-11ef-0ef8-8d9159139a1b -md""" -## Model Specification - -#### Representation - -The above data set will be represented as ``D = \{(x_1,y_1),\dotsc,(x_N,y_N)\}``, where - * inputs ``x_n \in \mathbb{R}^M`` are called **features**. - * outputs ``y_n \in \mathcal{C}_k``, with ``k=1,\ldots,K``; The **discrete** targets ``\mathcal{C}_k`` are called **classes**. - -Similar to our representation of the categorical distribution, we will again use the 1-of-K (or one-hot) encoding to represent the discrete class labels. We define binary **class selection variables** - -```math -y_{nk} = \begin{cases} 1 & \text{if } \, y_n \in \mathcal{C}_k\\ -0 & \text{otherwise} \end{cases} -``` - -Hence, the notations ``y_{nk}=1`` and ``y_n \in \mathcal{C}_k`` mean the same thing. - -""" - -# ╔═╡ 0d52466f-b092-4569-8c2d-b43c725887ae -md""" - -#### Likelihood - -Assume a Gaussian **class-conditional data-generating distribution** with **equal covariance matrix** across the classes, - -```math - p(x_n|\mathcal{C}_{k}) = \mathcal{N}(x_n|\mu_k,\Sigma) \tag{1} - -``` - -with notational shorthand: ``\mathcal{C}_{k} \triangleq (y_n \in \mathcal{C}_{k})``. - -""" - -# ╔═╡ 23c74748-d294-11ef-2170-bf45b6379e4d -md""" -#### Prior - -We use a categorical distribution for the class labels ``y_{nk}``: - -```math -p(\mathcal{C}_{k}) = \pi_k \tag{2} -``` - -""" - -# ╔═╡ 23c75dc8-d294-11ef-3c57-614e75f06d8f -md""" -We will refer to this model (specified by Eqs. 1 and 2) as the **Gaussian-Categorical Model** ($(HTML("GCM"))). - - * N.B. In the literature, this model (with possibly unequal ``\Sigma_k`` across classes) is often called the Gaussian Discriminant Analysis model and the special case with equal covariance matrices ``\Sigma_k=\Sigma`` is also called Linear Discriminant Analysis. We think these names are a bit unfortunate as it may lead to confusion with the [discriminative method for classification](https://bmlip.github.io/course/lectures/Discriminative%20Classification.html). - -""" - -# ╔═╡ 23c763ce-d294-11ef-015b-736be1a5e9d6 -md""" -As usual, once the model has been specified, the rest (inference for parameters and application) can be executed through straight probability theory. - -""" - -# ╔═╡ 20cd1582-d7f7-448c-8685-607f7cc1dc9c -keyconcept("",md""" -A common generative model for classification is the **Gaussian–Categorical model**: - -```math -p(x,\mathcal{C}_k|\,\theta) = \pi_k \cdot \mathcal{N}(x|\mu_k,\Sigma) \,. -``` - -""") - -# ╔═╡ 23c7779a-d294-11ef-2e2c-6ba6cadb1381 -md""" -## Parameter Estimation - -In principle, a full Bayesian treatment requires us to specify prior distributions over the model parameters ``\theta = \{ \{\pi_k\}, \{\mu_k\}, \Sigma \}``, and then apply Bayes rule to obtain the corresponding posterior distributions. While this is certainly possible, the mathematics quickly becomes bewildering. Therefore, we opt for maximum likelihood estimation of the parameters as a more practical alternative. - - -""" - -# ╔═╡ ffc80e65-a454-4b45-a9b7-76b01c7e96c0 -exercise_statement("Evaluate log-likelihood" , color= "yellow", header_level=4 ) - -# ╔═╡ 2e1ccf78-6097-4097-8bc8-1f1ec2d9c3ff -md""" - -Show that the log-likelihood for the parameters evaluates to - -```math -\log\, p(D|\theta) = \sum_{n,k} y_{nk} \underbrace{ \log\mathcal{N}(x_n|\mu_k,\Sigma) }_{ \text{see Gaussian lecture} } + \underbrace{ \sum_k m_k \log \pi_k }_{ \text{see multinomial lecture} } \tag{3} -``` - -where we used ``m_k \triangleq \sum_n y_{nk}``. - -""" - -# ╔═╡ 32cb67f6-1ed2-4d30-8493-e4eed9651526 -hide_solution( -md""" -```math -\begin{align*} -\log\, p(D|\theta) &= \log \prod_n p(x_n,y_n|\theta ) \quad \text{(assume IID data)} \\ - &= \sum_n \log p(x_n,y_n|\theta ) \\ - &= \sum_n \log \prod_k p(x_n,y_{nk}=1\,|\,\theta)^{y_{nk}} \\ - &= \sum_{n,k} y_{nk} \log p(x_n,y_{nk}=1\,|\,\theta) \\ - &= \sum_{n,k} y_{nk} \log p(x_n|y_{nk}=1) + \sum_{n,k} y_{nk} \log p(y_{nk}=1) \\ - &= \sum_{n,k} y_{nk} \log\mathcal{N}(x_n|\mu_k,\Sigma) + \sum_{n,k} y_{nk} \log \pi_k \\ - &= \sum_{n,k} y_{nk} \log\mathcal{N}(x_n|\mu_k,\Sigma)+ \sum_k m_k \log \pi_k -\end{align*} -``` -""" - ) - -# ╔═╡ 23c78d3e-d294-11ef-0309-ff10f58f0252 -md""" -#### Maximization of log-likelihood - -Maximization of the LLH for the GDA model breaks down into - - * **Gaussian density estimation** for parameters ``\mu_k, \Sigma``, since the first term contains exactly the log-likelihood for MVG density estimation. We've already done this, see the [Gaussian distribution lesson](https://bmlip.github.io/course/lectures/The%20Gaussian%20Distribution.html#ML-for-Gaussian). - * **Multinomial density estimation** for class priors ``\pi_k``, since the second term holds exactly the log-likelihood for multinomial density estimation, see the [Multinomial distribution lesson](https://bmlip.github.io/course/lectures/The%20Multinomial%20Distribution.html#ML-for-multinomial). - -""" - -# ╔═╡ 23c798ce-d294-11ef-0190-f342f30e2266 -md""" -The ML for multinomial class prior (we've done this before!) - -```math -\begin{align*} -\hat \pi_k = \frac{m_k}{N} -\end{align*} -``` - -""" - -# ╔═╡ 23c7a54c-d294-11ef-0252-ef7a043e995c -md""" -Now group the data into separate classes and do MVG ML estimation for class-conditional parameters (we've done this before as well): - -```math -\begin{align*} - \hat \mu_k &= \frac{ \sum_n y_{nk} x_n} { \sum_n y_{nk} } = \frac{1}{m_k} \sum_n y_{nk} x_n \\ - \hat \Sigma &= \frac{1}{N} \sum_{n,k} y_{nk} (x_n-\hat \mu_k)(x_n-\hat \mu_k)^T \\ - &= \sum_k \hat \pi_k \cdot \underbrace{ \left( \frac{1}{m_k} \sum_{n} y_{nk} (x_n-\hat \mu_k)(x_n-\hat \mu_k)^T \right) }_{ \text{class-cond. variance} } \\ - &= \sum_k \hat \pi_k \cdot \hat \Sigma_k -\end{align*} -``` - -where ``\hat \pi_k``, ``\hat{\mu}_k`` and ``\hat{\Sigma}_k`` are the sample proportion, sample mean and sample variance for the ``k``th class, respectively. - -""" - -# ╔═╡ 23c7ab20-d294-11ef-1926-afae49e79923 -md""" -Note that the binary class selection variable ``y_{nk}`` groups data from the same class. - -""" - -# ╔═╡ 14362031-7977-4a0c-b329-23da9b5b2f62 -keyconcept("", -md""" -ML estimation for ``\{\pi_k,\mu_k,\Sigma\}`` in the GCM model breaks down to simple density estimation for Gaussian and multinomial/categorical distributions. - -""") - -# ╔═╡ 23c7baa4-d294-11ef-22c1-31b0d86f5586 -md""" -## Application: Class prediction for new Data - -##### the posterior class probability - -Let's apply the trained model to predict the class for a "new" input ``x_\bullet``: - -```math -\begin{align*} -p(\mathcal{C}_k|x_\bullet,D ) &= \int p(\mathcal{C}_k|x_\bullet,\theta ) p(\theta|D) \mathrm{d}\theta \\ - &= \sigma\left( \beta_k^T x_\bullet + \gamma_k\right) \tag{4} -\end{align*} -``` - -where -```math -\sigma(a)_k \triangleq \frac{\exp(a_k)}{\sum_{k^\prime}\exp(a_{k^\prime})} -``` -is $(HTML("called a")) [**softmax**](https://en.wikipedia.org/wiki/Softmax_function) (a.k.a., **normalized exponential**) function, and - -```math -\begin{align*} -\beta_k &= \hat{\Sigma}^{-1} \hat{\mu}_k \\ -\gamma_k &= - \frac{1}{2} \hat{\mu}_k^T \hat{\Sigma}^{-1} \hat{\mu}_k + \log \hat{\pi}_k -\end{align*} -``` - -""" - -# ╔═╡ 84353cd1-e4fb-4689-9e90-d8995cbe2e9b -details("Click for proof of (4)", -md""" ```math -\begin{align*} -p(\mathcal{C}_k|x_\bullet,D ) &= \int p(\mathcal{C}_k|x_\bullet,\theta ) \underbrace{p(\theta|D)}_{=\delta(\theta - \hat{\theta})} \mathrm{d}\theta \\ -&= p(\mathcal{C}_k|x_\bullet,\hat{\theta} ) \\ -&\propto p(\mathcal{C}_k)\,p(x_\bullet|\mathcal{C}_k) \\ -&= \hat{\pi}_k \cdot \mathcal{N}(x_\bullet | \hat{\mu}_k, \hat{\Sigma}) \\ - &\propto \hat{\pi}_k \exp \left\{ { - {\frac{1}{2}}(x_\bullet - \hat{\mu}_k )^T \hat{\Sigma}^{ - 1} (x_\bullet - \hat{\mu}_k )} \right\}\\ - &=\exp \Big\{ \underbrace{-\frac{1}{2}x_\bullet^T \hat{\Sigma}^{ - 1} x_\bullet}_{\text{not a function of }k} + \underbrace{\hat{\mu}_k^T \hat{\Sigma}^{-1}}_{\beta_k^T} x_\bullet \underbrace{- {\frac{1}{2}}\hat{\mu}_k^T \hat{\Sigma}^{ - 1} \hat{\mu}_k + \log \hat{\pi}_k }_{\gamma_k} \Big\} \\ - &\propto \frac{1}{Z}\exp\{\beta_k^T x_\bullet + \gamma_k\} \\ - &= \sigma\left( \beta_k^T x_\bullet + \gamma_k\right) -\end{align*} -``` """ ) - - -# ╔═╡ 23c7c920-d294-11ef-1b6d-d98dd54dcbe3 -md""" - -##### The softmax function - -The softmax function can be viewed as a smooth approximation to the maximum function. -Importantly, we did not impose the softmax posterior by assumption; rather, it emerged naturally by applying Bayes rule to our chosen prior and likelihood models. -""" - -# ╔═╡ 2f2cb20f-ff7c-4b7f-8aa0-f5b3addb9299 -NotebookCard("https://bmlip.github.io/course/minis/Softmax.html") - -# ╔═╡ 866d8e7a-2b33-4635-84c0-6cbf900b523b -keyconcept("", -md"""For the GCM with equal covariances, the posterior class probability is a softmax function, - -```math - p(\mathcal{C}_k|x,\theta ) \propto \exp\{\beta_k^T x + \gamma_k\} -``` - -where ``\beta _k= \Sigma^{-1} \mu_k`` and ``\gamma_k=- \frac{1}{2} \mu_k^T \Sigma^{-1} \mu_k + \log \pi_k``. -""") - -# ╔═╡ 23c82154-d294-11ef-0945-c9c94fc2a44d -md""" -#### Making a Decision - -How should we classify a new input ``x_\bullet``? - -The Bayesian answer is to compute the posterior distribution over classes, -```math -p(\mathcal{C}_k | x_\bullet,D)\,, -``` -and this completes the classification task: the posterior encapsulates all available information about class membership given the input and data. - -If a definite classification **must** be made, a natural choice is the class with the highest posterior probability: - -```math -\begin{align*} -k^* &= \arg\max_k p(\mathcal{C}_k|x_\bullet,D) \\ - &= \arg\max_k \left( \beta _k^T x_\bullet + \gamma_k \right) -\end{align*} -``` -This corresponds to a maximum a posteriori (MAP) decision rule, which is both simple and effective in many practical settings. - -""" - -# ╔═╡ 23c7e4a0-d294-11ef-16e9-6f96a41baf97 -md""" -## Discrimination Boundaries - -The class log-posterior ``\log p(\mathcal{C}_k|x) \propto \beta_k^T x + \gamma_k`` is a linear function of the input features. - -""" - -# ╔═╡ 23c7f170-d294-11ef-1340-fbdf4ce5fd44 -md""" -Therefore, the contours of equal probability (also known as **discriminant functions**, or **decision boundaries**), given by - -```math -\log \frac{{p(\mathcal{C}_k|x,D )}}{{p(\mathcal{C}_j|x,D )}} \overset{!}{=} 0 \,, -``` -are lines (hyperplanes) in the feature space. - - -""" - -# ╔═╡ 5c746070-19a9-464b-aedc-401d016dfdb6 -exercise_statement("Discrimination boundaries" , color= "yellow", header_level=4 ) - -# ╔═╡ 8d78f9d3-7ba8-46b0-8d6f-231e681caa49 -md""" -Show that the discrimination boundaries for the posterior class probabilities in Eq. (4) evaluates to a line (or hyperplane). -""" - -# ╔═╡ 25e18c78-9cac-4faa-bb7c-ac036d0eac90 -hide_solution( -md""" -```math -\begin{align} -&\log \frac{{p(\mathcal{C}_k|x,D )}}{{p(\mathcal{C}_j|x,D )}} \overset{!}{=} 0 \\ -\implies &\frac{\beta_k^T x + \gamma_k}{\beta_j^T x + \gamma_j} = 1 \\ -\implies &\beta_k^T x + \gamma_k = \beta_j^T x + \gamma_j \\ -\implies &\beta_{kj}^T x + \gamma_{kj} = 0 \quad \text{(this is a line)}\,, -\end{align} -``` - -where we defined ``\beta_{kj} \triangleq \beta_k - \beta_j`` and similarly for ``\gamma_{kj}``. -""" - - ) - -# ╔═╡ 117f3f65-a9bd-4b25-93e2-42ac1e576b6d -keyconcept("", -md""" If the class-conditional distributions are Gaussian with equal covariance matrices across classes (i.e., ``\Sigma_k = \Sigma``), then the discriminant functions are hyperplanes in feature space. -""") - -# ╔═╡ a8adaf31-bee2-40e9-8d9b-bb9f1ad996ca -md""" -Now assume that the class-conditional feature distributions are modeled with class-dependent covariance matrices, i.e., -```math - p(x_n|\mathcal{C}_{k}) = \mathcal{N}(x_n|\mu_k,\Sigma_k) - -``` -What do the decision boundaries look like in this case? -""" - -# ╔═╡ b01a4a56-bed2-4a06-991a-831adc84aa3e -hide_solution( -md""" -Following the same derivation as above (in the cell "Click for proof of (4)"), the posterior class probability evaluates to - ```math -\begin{align*} -p(\mathcal{C}_k|x_\bullet,D ) \propto \exp \Big\{ \underbrace{-\frac{1}{2}x_\bullet^T \hat{\Sigma}_k^{ - 1} x_\bullet}_{\text{now a function of }k} + \underbrace{\hat{\mu}_k^T \hat{\Sigma}_k^{-1}}_{\beta_k^T} x_\bullet \underbrace{- {\frac{1}{2}}\hat{\mu}_k^T \hat{\Sigma}_k^{ - 1} \hat{\mu}_k + \log \hat{\pi}_k }_{\gamma_k} \Big\} \,. -\end{align*} -``` -Because the quadratic term ``x_\bullet^T \hat{\Sigma}_k^{-1} x_\bullet`` is now class-dependent, the decision boundaries are given by quadratic equations in ``x``. Hence, the decision boundaries are generally (hyper-)parabolic surfaces. - -""" ) - -# ╔═╡ 1a890e4b-b8a9-4a6e-b1f3-17863e1416d7 -challenge_solution("Apple or Peach", header_level=1, color="green") - -# ╔═╡ 689ea1f9-0a72-478e-b8a9-ebf450ce95ef -N_bond - -# ╔═╡ 4481b38d-dc67-4c1f-ac0b-b348f0aea461 -md""" - -## Implementation Issues - -We can fit a Bernouilly distribution to [`y` (see definition)](#y), this is simple: -""" - -# ╔═╡ 5092090d-cfac-4ced-b61e-fb7107a4c638 -md""" -#### Estimate class-conditional distributions -Now, for each class, we fit a Gaussian distribution to the data of that class: -""" - -# ╔═╡ 3228f074-7c1d-420a-bfb0-c3bd693003ad -md""" -Our model assumes that both distributions have the same covariance matrix. We get this in practice by taking the weighted average of the two: -""" - -# ╔═╡ e91effb4-b3ac-4d7a-b93f-33a78a125110 -md""" - -We now have class-conditional Gaussian distributions for each class: -""" - -# ╔═╡ 845f19c4-c3c5-4368-a48a-a7b57687ddf9 -N_bond - -# ╔═╡ 21602809-d98b-43d7-8c41-80dc8de6da57 -md""" -# Closing Thoughts -""" - -# ╔═╡ 23c85d90-d294-11ef-375e-7101d4d3cbfa -md""" -## Why Be Bayesian? - -A student in one of the previous years posed the following question at Piazza: - -> "After re-reading topics regarding generative classification, this question popped into my mind: Besides the sole purpose of the lecture, which is getting to know the concepts of generative classification and how to implement them, are there any advantages of using this instead of using deep neural nets (DNN), as they seem simpler and more powerful?" - - -The following answer was provided: - -If you are only interested in approximating a function, and you have lots of examples of desired behavior, then often a non-probabilistic DNN is a fine approach. However, if you are willing to formulate your models in a probabilistic framework, you can frequently improve on the deterministic approach in many ways. We list a few below: - -1. **Bayesian Evidence as a Performance Metric** - - Model performance is evaluated using the evidence ``p(D|m)`` for a model, which inherently balances fit and complexity. This enables the use of the entire dataset for learning: there is no need for arbitrary splits into training and test sets. - -2. **Parameter Uncertainty Enables Active Learning** - - By maintaining uncertainty over model parameters, Bayesian models support active learning, i.e., the selection of data points that are expected to be most informative (See the [lesson on intelligent agents](https://bmlip.github.io/course/lectures/Intelligent%20Agents%20and%20Active%20Inference.html)). This allows learning from smaller datasets, unlike deterministic deep networks, which often require massive amounts of labeled data. - -3. **Predictions with Confidence Bounds** - - Bayesian models naturally yield predictive distributions, enabling uncertainty quantification (e.g., confidence intervals) around predictions. - -4. **Explicit and Modular Assumptions** - - Priors, likelihoods, and structural assumptions are explicitly specified and can be independently modified, promoting transparency and model modularity. - -5. **Unified Treatment of Accuracy and Complexity** - - Both data fit and model complexity are scored in the same probabilistic units. In contrast, how would you penalize overparameterized architectures (e.g., deep networks) in a deterministic framework? - -6. **Data-Dependent, Optimal Learning Rates** - - Learning rates emerge naturally from Bayesian updates. Contrast this with the trial-and-error tuning needed in standard optimization. - - Example: The Kalman gain is an optimal learning rate based on current uncertainty. - -7. **Principled Knowledge Transfer** - - Bayesian inference enables posterior-to-prior propagation: results from one experiment (posterior) can inform the next (as a prior). This provides a principled mechanism for sequential learning and integration of heterogeneous information sources. - - -Admittedly, the probabilistic approach can be challenging to grasp at first, but the effort often pays off. It provides a principled, flexible, and robust framework for reasoning under uncertainty. - - -""" - -# ╔═╡ 45f1f80d-18fc-465c-aaf3-54bbcd8bc95e -md""" -# Summary -""" - -# ╔═╡ 358fac57-7458-40b5-9f69-50ad4ca7edde -keyconceptsummary() - -# ╔═╡ ca11db2d-aa15-4bf1-b949-529c7487d11d -exercises(header_level=1) - -# ╔═╡ 24a08e5c-c2c1-4f1f-a2c1-998b30147e61 -md""" - -#### Fanta or Orangina? (**) - -You have a machine that measures property ``x``, the "orangeness" of liquids. You wish to discriminate between ``C_1 = \text{`Fanta'}`` and ``C_2 = \text{`Orangina'}``. It is known that - -```math -\begin{align*} -p(x|C_1) &= \begin{cases} 10 & 1.0 \leq x \leq 1.1\\ - 0 & \text{otherwise} - \end{cases}\\ -p(x|C_2) &= \begin{cases} 200(x - 1) & 1.0 \leq x \leq 1.1\\ -0 & \text{otherwise} -\end{cases} -\end{align*} -``` - -The prior probabilities ``p(C_1) = 0.6`` and ``p(C_2) = 0.4`` are also known from experience. - -- (a) A "Bayes Classifier" is given by - -```math - \text{Decision} = \begin{cases} C_1 & \text{if } p(C_1|x)>p(C_2|x) \\ - C_2 & \text{otherwise} - \end{cases} -``` - -Derive the optimal Bayes classifier. - -- (b) The probability of making the wrong decision, given ``x``, is - -```math -p(\text{error}|x)= p(C_1|\text{we-decide-} C_2, x) + p(C_2|\text{we-decide-}C_1, x) -``` - -Compute the **total** error probability ``p(\text{error})`` for the Bayes classifier in this example. - -""" - -# ╔═╡ 66172ab6-7df8-4068-a748-b33b3f345d6d -hide_solution( -md""" -- (a) We choose ``C_1`` if ``p(C_1|x)/p(C_2|x) > 1``. This condition can be worked out as - - -```math -\frac{p(C_1|x)}{p(C_2|x)} = \frac{p(x|C_1)p(C_1)}{p(x|C_2)p(C_2)} = \frac{10 \times 0.6}{200(x-1)\times 0.4}>1 -``` - -which evaluates to choosing - -```math -\mathrm{Decision} = \begin{cases} -C_1 & \text{ if $1.0\leq x < 1.075$} \\ -C_2 & \text{ if $1.075 \leq x \leq 1.1$ } -\end{cases} -``` - -The probability that ``x`` falls outside the interval ``[1.0,1.1]`` is zero. - - -- (b) The total probability of error is - -```math -p(\text{error})=\int_x p(\text{error}|x)p(x) \mathrm{d}{x} \,. -``` - -We can work this out as - - -```math -\begin{align*} -p(\text{error}) &= \int_x p(\text{error}|x)p(x)\mathrm{d}{x}\\ -&= \int_{1.0}^{1.075} p(C_2|x)p(x) \mathrm{d}{x} + \int_{1.075}^{1.1} p(C_1|x)p(x) \mathrm{d}{x}\\ -&= \int_{1.0}^{1.075} p(x|C_2)p(C_2) \mathrm{d}{x} + \int_{1.075}^{1.1} p(x|C_1)p(C_1) \mathrm{d}{x}\\ -&= \int_{1.0}^{1.075}0.4\cdot 200(x-1) \mathrm{d}{x} + \int_{1.075}^{1.1} 0.6\cdot 10 \mathrm{d}{x}\\ -&=80\cdot[x^2/2-x]_{1.0}^{1.075} + 6\cdot[x]_{1.075}^{1.1}\\ -&=0.225 + 0.15\\ -&=0.375 -\end{align*} -``` - -""") - -# ╔═╡ 7e5213d6-4a68-4843-ab4c-77ea3ed8b0cd -md""" -#### [Bishop exercise 4.8](https://www.microsoft.com/en-us/research/wp-content/uploads/2006/01/Bishop-Pattern-Recognition-and-Machine-Learning-2006.pdf#page=241) (**) - -Using (4.57) and (4.58) (from Bishop's book), derive the result (4.65) for the posterior class probability in the two-class generative model with Gaussian densities, and verify the results (4.66) and (4.67) for the parameters ``w`` and ``w0``. - -""" - -# ╔═╡ ef1e5885-7153-4b55-9f97-1e984c2504e6 -hide_solution( -md""" -Substitute 4.64 into 4.58 to get - -```math -\begin{align*} -a &= \log \left( \frac{ \frac{1}{(2\pi)^{D/2}} \cdot \frac{1}{|\Sigma|^{1/2}} \cdot \exp\left( -\frac{1}{2}(x-\mu_1)^T \Sigma^{-1} (x-\mu_1)\right) \cdot p(C_1)}{\frac{1}{(2\pi)^{D/2}} \cdot \frac{1}{|\Sigma|^{1/2}}\cdot \exp\left( -\frac{1}{2}(x-\mu_2)^T \Sigma^{-1} (x-\mu_2)\right) \cdot p(C_2)}\right) \\ -&= \log \left( \exp\left(-\frac{1}{2}(x-\mu_1)^T \Sigma^{-1} (x-\mu_1) + \frac{1}{2}(x-\mu_2)^T \Sigma^{-1} (x-\mu_2) \right) \right) + \log \frac{p(C_1)}{p(C_2)} \\ -&\qquad\vdots \\ -&=( \mu_1-\mu_2)^T\Sigma^{-1}x - 0.5\left(\mu_1^T\Sigma^{-1}\mu_1 - \mu_2^T\Sigma^{-1} \mu_2\right)+ \log \frac{p(C_1)}{p(C_2)} -\end{align*} -``` - -Substituting this into the right-most form of (4.57) we obtain (4.65), with ``w`` and ``w0`` given by (4.66) and (4.67), respectively. - -""") - -# ╔═╡ e65e0e33-3e4f-4765-84ea-a4fb5d43269e -md""" -# Code -""" - -# ╔═╡ a4463d74-04ea-428a-b5a5-504d96432a0a -md""" -Our data is structured as follows: -- ``y`` is whether a data point is an apple (`true`) or a peach (`false`) -- ``x`` has one column of data per fruit -""" - -# ╔═╡ 3842654e-6dd7-427c-bb77-8b35a2f324fb -const Σ_secret = [0.2 0.1; 0.1 0.3]; - -# ╔═╡ c91ed138-9885-43ce-a00e-1ba6e996f1aa -const p_apple_secret = Bernoulli(0.7); - -# ╔═╡ 841ddfc8-85e0-47ee-9288-2d90a84a5dc3 -y = rand(MersenneTwister(23), p_apple_secret, N) - -# ╔═╡ fedb7530-6fce-496c-a55a-3e9908f9711a -y .|> Int |> join - -# ╔═╡ cc8144d9-9ecf-4cbd-aea9-0c7a2fca2d94 -p_apple_est = sum(y) / length(y) # or: p_apple_est = fit_mle(Bernoulli, y).p - -# ╔═╡ 19360d53-93d8-46fe-82d5-357015e75e22 -π_hat = [p_apple_est; 1-p_apple_est] - -# ╔═╡ eac2821e-b25c-4605-857a-cd3bd06303c1 -X = let - Σ = Σ_secret - p_given_apple = MvNormal([1.0, 1.0], Σ) # p(X|y=apple) - p_given_peach = MvNormal([1.7, 2.5], Σ) # p(X|y=peach) - - # Apple or peach? - X = Matrix{Float64}(undef,2,N); - - rng = MersenneTwister(76) - - for n in 1:N - X[:,n] = rand(rng, y[n] ? p_given_apple : p_given_peach) - end # for - X - end; - -# ╔═╡ 24d3c1f4-432f-419f-8854-69d8bfc135f8 -X_apples, X_peaches = collect(X[:,findall(y)]'), collect(X[:,findall(.!y)]'); - -# ╔═╡ cff683bf-0488-41d2-9858-cf8776a48992 -X_apples, X_peaches - -# ╔═╡ 10bfb9ea-46a6-4f4d-980e-ed2afce7b39a -d1 = fit_mle(FullNormal, X_apples') # MLE density estimation d1 = N(μ₁, Σ₁) - -# ╔═╡ cd310392-aabd-40e0-b06f-f8297c7eed6f -d2 = fit_mle(FullNormal, X_peaches') # MLE density estimation d2 = N(μ₂, Σ₂) - -# ╔═╡ ba9fa93f-093c-4783-988f-27f4ba228e88 -Σ_computed = Σ = π_hat[1]*cov(d1) + π_hat[2]*cov(d2) # Combine Σ₁ and Σ₂ into Σ - -# ╔═╡ 46d2d5e9-bb6b-409a-acdc-cdffd1a6f797 -conditionals = [ - MvNormal(mean(d1), Σ_computed) - MvNormal(mean(d2), Σ_computed) -] # p(x|C) - -# ╔═╡ 33d5d6e7-1208-4c5b-b651-429b3b6ad50b -# calculate p(C_k | point) -function predict_class(k::Int64, point::Vector{<:Real})::Real - norm = - π_hat[1]*pdf(conditionals[1],point) + - π_hat[2]*pdf(conditionals[2],point) - - return π_hat[k]*pdf(conditionals[k], point) ./ norm -end - -# ╔═╡ d9efe8bb-c32c-40f4-89d9-8ace7a0665ba -x_test = [2.3; 1.5] # Features of 'new' data point - -# ╔═╡ bf39f423-7df3-4990-a254-c28a1bdf23bf -x_test - -# ╔═╡ 723e09fc-ec63-4c47-844c-d821515ce0f4 -@mdx("``p(\\text{apple}|x=x_∙) = $(round(predict_class(1,x_test), digits=3))``") - -# ╔═╡ ffa01b68-c3ba-4509-8df6-00596974be0f -const plot_lims = ( - xlim=(-.3, 3.1), ylim=(-.4, 4.1), -) - -# ╔═╡ 69732524-90fd-46f4-9706-c07ce6226d2b -let - # plot training data - scatter(X_apples[:,1], X_apples[:,2], label="apple", marker=:x, markerstrokewidth=3) - scatter!(X_peaches[:,1], X_peaches[:,2], label="peach", marker=:+, markerstrokewidth=3) - plot!(; plot_lims..., legend=:topleft) - - # plot test point - scatter!([x_test[1]], [x_test[2]], label="unknown", c=:yellow, ms=9) -end # let - -# ╔═╡ 36e6b874-a1b8-40d7-8762-f0c5f9121e40 -let - plot(; plot_lims..., legend=:topleft) - scatter!(X_apples[:,1], X_apples[:,2], label="apple", marker=:x, markerstrokewidth=3) - scatter!(X_peaches[:,1], X_peaches[:,2], label="peach", marker=:+, markerstrokewidth=3) - scatter!([x_test[1]], [x_test[2]], label="unknown", color="yellow") # 'new' unlabelled data point - - x = y = range(-1, stop = 5, length = 40) - for distr in conditionals - contour!(x, y, (x, y) -> pdf(distr, [x,y]); opacity=.4, color=cgrad(:grays, rev=true)) - end - plot!() -end - -# ╔═╡ 4ada77d1-09f2-49c7-a44f-1928e0dc5421 -let - plot(; plot_lims..., legend=:topleft, title=L"p(apple | x)") - scatter!(X_apples[:,1], X_apples[:,2], label="apple", marker=:x, markerstrokewidth=3) - scatter!(X_peaches[:,1], X_peaches[:,2], label="peach", marker=:+, markerstrokewidth=3) - scatter!([x_test[1]], [x_test[2]], label="unknown", color="yellow") # 'new' unlabelled data point - - x = range(plot_lims.xlim..., length=60) - y = range(plot_lims.ylim..., length=60) - heatmap!(x, y, (x, y) -> predict_class(1, [x,y]); opacity=.4, color=cgrad(:bluesreds, rev=true)) - plot!() -end - -# ╔═╡ c79525b1-7b44-4585-8292-84abe20a1a3d -md""" -Markers -""" - -# ╔═╡ 79fa1b47-460f-457e-aebc-646f60ffecc1 -unknown_marker = @htl """ - - """ - -# ╔═╡ fe324e92-d753-46cd-aad9-794a76dc806b -md""" - -You are also given a test fruit $unknown_marker, which has known feature values but an **unknown fruit label**. - -""" - -# ╔═╡ a985e1d3-4867-4991-a60e-e85a9730311b -apple_marker = @htl """ - - -""" - -# ╔═╡ 90b862a5-d5bc-4122-a942-f01062daa86a -md""" -### Posterior class probability of ``x_∙`` (prediction) - -Now we can answer the question from the challenge, and calculate the probability that ``x_∙`` is an apple $apple_marker. -""" - -# ╔═╡ 9973e8e5-4744-4ff6-9494-1c93503f11c1 -md""" -We can use this function on every point of the plot, to draw a heatmap of apple $apple_marker probability: -""" - -# ╔═╡ e8cbfc78-04dd-4196-8011-90283969e5b1 -peach_marker = @htl """ - - -""" - -# ╔═╡ 51a46b5e-0c35-4841-a4f3-413d5d294805 -md""" - -You're given the numerical values for two features (let's say, _sugar content_ and _acidity_) of a bunch of fruits. Each piece of fruit is either an apple $apple_marker or a peach $peach_marker. - -Generate this data yourself by selecting the total number of fruits with the slider: -""" - -# ╔═╡ 77280f3b-e391-482f-936f-703d1d3c4006 -md""" - -##### Problem - - - Based on the observed data, what is the probability that the test fruit is an apple $apple_marker, and not a peach $peach_marker? - -##### Solution - - - Later in this lecture. -""" - -# ╔═╡ 23c82e10-d294-11ef-286a-ff6fee0f2805 -md""" - -We'll apply the above results to solve the "apple $apple_marker or peach $peach_marker" example problem. - -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000001 -PLUTO_PROJECT_TOML_CONTENTS = """ -[deps] -BmlipTeachingTools = "656a7065-6f73-6c65-7465-6e646e617262" -Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" -LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -MarkdownLiteral = "736d6165-7244-6769-4267-6b50796e6954" -Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - -[compat] -BmlipTeachingTools = "~1.3.1" -Distributions = "~0.25.122" -LaTeXStrings = "~1.4.0" -MarkdownLiteral = "~0.1.2" -Plots = "~1.40.17" -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000002 -PLUTO_MANIFEST_TOML_CONTENTS = """ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.12.1" -manifest_format = "2.0" -project_hash = "7c2148a417390ed2e53a59f6046d1571771e2044" - -[[deps.AbstractPlutoDingetjes]] -deps = ["Pkg"] -git-tree-sha1 = "6e1d2a35f2f90a4bc7c2ed98079b2ba09c35b83a" -uuid = "6e696c72-6542-2067-7265-42206c756150" -version = "1.3.2" - -[[deps.AliasTables]] -deps = ["PtrArrays", "Random"] -git-tree-sha1 = "9876e1e164b144ca45e9e3198d0b689cadfed9ff" -uuid = "66dad0bd-aa9a-41b7-9441-69ab47430ed8" -version = "1.1.3" - -[[deps.ArgTools]] -uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.2" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -version = "1.11.0" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -version = "1.11.0" - -[[deps.BitFlags]] -git-tree-sha1 = "0691e34b3bb8be9307330f88d1a3c3f25466c24d" -uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" -version = "0.1.9" - -[[deps.BmlipTeachingTools]] -deps = ["HypertextLiteral", "InteractiveUtils", "Markdown", "PlutoTeachingTools", "PlutoUI", "Reexport"] -git-tree-sha1 = "806eadb642467b05f9d930f0d127f1e6fa5130f0" -uuid = "656a7065-6f73-6c65-7465-6e646e617262" -version = "1.3.1" - -[[deps.Bzip2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1b96ea4a01afe0ea4090c5c8039690672dd13f2e" -uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" -version = "1.0.9+0" - -[[deps.Cairo_jll]] -deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "fde3bf89aead2e723284a8ff9cdf5b551ed700e8" -uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" -version = "1.18.5+0" - -[[deps.CodecZlib]] -deps = ["TranscodingStreams", "Zlib_jll"] -git-tree-sha1 = "962834c22b66e32aa10f7611c08c8ca4e20749a9" -uuid = "944b1d66-785c-5afd-91f1-9de20f533193" -version = "0.7.8" - -[[deps.ColorSchemes]] -deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"] -git-tree-sha1 = "b0fd3f56fa442f81e0a47815c92245acfaaa4e34" -uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" -version = "3.31.0" - -[[deps.ColorTypes]] -deps = ["FixedPointNumbers", "Random"] -git-tree-sha1 = "67e11ee83a43eb71ddc950302c53bf33f0690dfe" -uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -version = "0.12.1" -weakdeps = ["StyledStrings"] - - [deps.ColorTypes.extensions] - StyledStringsExt = "StyledStrings" - -[[deps.ColorVectorSpace]] -deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "Requires", "Statistics", "TensorCore"] -git-tree-sha1 = "8b3b6f87ce8f65a2b4f857528fd8d70086cd72b1" -uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" -version = "0.11.0" -weakdeps = ["SpecialFunctions"] - - [deps.ColorVectorSpace.extensions] - SpecialFunctionsExt = "SpecialFunctions" - -[[deps.Colors]] -deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] -git-tree-sha1 = "37ea44092930b1811e666c3bc38065d7d87fcc74" -uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" -version = "0.13.1" - -[[deps.CommonMark]] -deps = ["PrecompileTools"] -git-tree-sha1 = "351d6f4eaf273b753001b2de4dffb8279b100769" -uuid = "a80b9123-70ca-4bc0-993e-6e3bcb318db6" -version = "0.9.1" - -[[deps.Compat]] -deps = ["TOML", "UUIDs"] -git-tree-sha1 = "9d8a54ce4b17aa5bdce0ea5c34bc5e7c340d16ad" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.18.1" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.3.0+1" - -[[deps.ConcurrentUtilities]] -deps = ["Serialization", "Sockets"] -git-tree-sha1 = "d9d26935a0bcffc87d2613ce14c527c99fc543fd" -uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" -version = "2.5.0" - -[[deps.Contour]] -git-tree-sha1 = "439e35b0b36e2e5881738abc8857bd92ad6ff9a8" -uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" -version = "0.6.3" - -[[deps.DataAPI]] -git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" -uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.16.0" - -[[deps.DataStructures]] -deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "4e1fe97fdaed23e9dc21d4d664bea76b65fc50a0" -uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.22" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -version = "1.11.0" - -[[deps.Dbus_jll]] -deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "473e9afc9cf30814eb67ffa5f2db7df82c3ad9fd" -uuid = "ee1fde0b-3d02-5ea6-8484-8dfef6360eab" -version = "1.16.2+0" - -[[deps.DelimitedFiles]] -deps = ["Mmap"] -git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" -uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" -version = "1.9.1" - -[[deps.Distributions]] -deps = ["AliasTables", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] -git-tree-sha1 = "3bc002af51045ca3b47d2e1787d6ce02e68b943a" -uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.122" - - [deps.Distributions.extensions] - DistributionsChainRulesCoreExt = "ChainRulesCore" - DistributionsDensityInterfaceExt = "DensityInterface" - DistributionsTestExt = "Test" - - [deps.Distributions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - DensityInterface = "b429d917-457f-4dbc-8f4c-0cc954292b1d" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.DocStringExtensions]] -git-tree-sha1 = "7442a5dfe1ebb773c29cc2962a8980f47221d76c" -uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.5" - -[[deps.Downloads]] -deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] -uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -version = "1.6.0" - -[[deps.EpollShim_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "8a4be429317c42cfae6a7fc03c31bad1970c310d" -uuid = "2702e6a9-849d-5ed8-8c21-79e8b8f9ee43" -version = "0.0.20230411+1" - -[[deps.ExceptionUnwrapping]] -deps = ["Test"] -git-tree-sha1 = "d36f682e590a83d63d1c7dbd287573764682d12a" -uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" -version = "0.1.11" - -[[deps.Expat_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "27af30de8b5445644e8ffe3bcb0d72049c089cf1" -uuid = "2e619515-83b5-522b-bb60-26c02a35a201" -version = "2.7.3+0" - -[[deps.FFMPEG]] -deps = ["FFMPEG_jll"] -git-tree-sha1 = "83dc665d0312b41367b7263e8a4d172eac1897f4" -uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" -version = "0.4.4" - -[[deps.FFMPEG_jll]] -deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] -git-tree-sha1 = "3a948313e7a41eb1db7a1e733e6335f17b4ab3c4" -uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" -version = "7.1.1+0" - -[[deps.FileWatching]] -uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" -version = "1.11.0" - -[[deps.FillArrays]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "173e4d8f14230a7523ae11b9a3fa9edb3e0efd78" -uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.14.0" -weakdeps = ["PDMats", "SparseArrays", "Statistics"] - - [deps.FillArrays.extensions] - FillArraysPDMatsExt = "PDMats" - FillArraysSparseArraysExt = "SparseArrays" - FillArraysStatisticsExt = "Statistics" - -[[deps.FixedPointNumbers]] -deps = ["Statistics"] -git-tree-sha1 = "05882d6995ae5c12bb5f36dd2ed3f61c98cbb172" -uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" -version = "0.8.5" - -[[deps.Fontconfig_jll]] -deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Zlib_jll"] -git-tree-sha1 = "f85dac9a96a01087df6e3a749840015a0ca3817d" -uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" -version = "2.17.1+0" - -[[deps.Format]] -git-tree-sha1 = "9c68794ef81b08086aeb32eeaf33531668d5f5fc" -uuid = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8" -version = "1.3.7" - -[[deps.FreeType2_jll]] -deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "2c5512e11c791d1baed2049c5652441b28fc6a31" -uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" -version = "2.13.4+0" - -[[deps.FriBidi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "7a214fdac5ed5f59a22c2d9a885a16da1c74bbc7" -uuid = "559328eb-81f9-559d-9380-de523a88c83c" -version = "1.0.17+0" - -[[deps.GLFW_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll", "libdecor_jll", "xkbcommon_jll"] -git-tree-sha1 = "fcb0584ff34e25155876418979d4c8971243bb89" -uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" -version = "3.4.0+2" - -[[deps.GR]] -deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Preferences", "Printf", "Qt6Wayland_jll", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "p7zip_jll"] -git-tree-sha1 = "1828eb7275491981fa5f1752a5e126e8f26f8741" -uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" -version = "0.73.17" - -[[deps.GR_jll]] -deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "FreeType2_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "27299071cc29e409488ada41ec7643e0ab19091f" -uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" -version = "0.73.17+0" - -[[deps.GettextRuntime_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll"] -git-tree-sha1 = "45288942190db7c5f760f59c04495064eedf9340" -uuid = "b0724c58-0f36-5564-988d-3bb0596ebc4a" -version = "0.22.4+0" - -[[deps.Ghostscript_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Zlib_jll"] -git-tree-sha1 = "38044a04637976140074d0b0621c1edf0eb531fd" -uuid = "61579ee1-b43e-5ca0-a5da-69d92c66a64b" -version = "9.55.1+0" - -[[deps.Glib_jll]] -deps = ["Artifacts", "GettextRuntime_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "50c11ffab2a3d50192a228c313f05b5b5dc5acb2" -uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" -version = "2.86.0+0" - -[[deps.Graphite2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "8a6dbda1fd736d60cc477d99f2e7a042acfa46e8" -uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" -version = "1.3.15+0" - -[[deps.Grisu]] -git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" -uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" -version = "1.0.2" - -[[deps.HTTP]] -deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "PrecompileTools", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "5e6fe50ae7f23d171f44e311c2960294aaa0beb5" -uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.10.19" - -[[deps.HarfBuzz_jll]] -deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll"] -git-tree-sha1 = "f923f9a774fcf3f5cb761bfa43aeadd689714813" -uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" -version = "8.5.1+0" - -[[deps.HypergeometricFunctions]] -deps = ["LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] -git-tree-sha1 = "68c173f4f449de5b438ee67ed0c9c748dc31a2ec" -uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" -version = "0.3.28" - -[[deps.Hyperscript]] -deps = ["Test"] -git-tree-sha1 = "179267cfa5e712760cd43dcae385d7ea90cc25a4" -uuid = "47d2ed2b-36de-50cf-bf87-49c2cf4b8b91" -version = "0.0.5" - -[[deps.HypertextLiteral]] -deps = ["Tricks"] -git-tree-sha1 = "7134810b1afce04bbc1045ca1985fbe81ce17653" -uuid = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2" -version = "0.9.5" - -[[deps.IOCapture]] -deps = ["Logging", "Random"] -git-tree-sha1 = "b6d6bfdd7ce25b0f9b2f6b3dd56b2673a66c8770" -uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" -version = "0.2.5" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -version = "1.11.0" - -[[deps.IrrationalConstants]] -git-tree-sha1 = "b2d91fe939cae05960e760110b328288867b5758" -uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.6" - -[[deps.JLFzf]] -deps = ["REPL", "Random", "fzf_jll"] -git-tree-sha1 = "82f7acdc599b65e0f8ccd270ffa1467c21cb647b" -uuid = "1019f520-868f-41f5-a6de-eb00f4b6a39c" -version = "0.1.11" - -[[deps.JLLWrappers]] -deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "0533e564aae234aff59ab625543145446d8b6ec2" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.7.1" - -[[deps.JSON]] -deps = ["Dates", "Mmap", "Parsers", "Unicode"] -git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" -uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.21.4" - -[[deps.JpegTurbo_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "4255f0032eafd6451d707a51d5f0248b8a165e4d" -uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "3.1.3+0" - -[[deps.JuliaSyntaxHighlighting]] -deps = ["StyledStrings"] -uuid = "ac6e5ff7-fb65-4e79-a425-ec3bc9c03011" -version = "1.12.0" - -[[deps.LAME_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "059aabebaa7c82ccb853dd4a0ee9d17796f7e1bc" -uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" -version = "3.100.3+0" - -[[deps.LERC_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "aaafe88dccbd957a8d82f7d05be9b69172e0cee3" -uuid = "88015f11-f218-50d7-93a8-a6af411a945d" -version = "4.0.1+0" - -[[deps.LLVMOpenMP_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "eb62a3deb62fc6d8822c0c4bef73e4412419c5d8" -uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" -version = "18.1.8+0" - -[[deps.LZO_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1c602b1127f4751facb671441ca72715cc95938a" -uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" -version = "2.10.3+0" - -[[deps.LaTeXStrings]] -git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" -uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.4.0" - -[[deps.Latexify]] -deps = ["Format", "Ghostscript_jll", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Requires"] -git-tree-sha1 = "44f93c47f9cd6c7e431f2f2091fcba8f01cd7e8f" -uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" -version = "0.16.10" - - [deps.Latexify.extensions] - DataFramesExt = "DataFrames" - SparseArraysExt = "SparseArrays" - SymEngineExt = "SymEngine" - TectonicExt = "tectonic_jll" - - [deps.Latexify.weakdeps] - DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - SymEngine = "123dc426-2d89-5057-bbad-38513e3affd8" - tectonic_jll = "d7dd28d6-a5e6-559c-9131-7eb760cdacc5" - -[[deps.LibCURL]] -deps = ["LibCURL_jll", "MozillaCACerts_jll"] -uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.4" - -[[deps.LibCURL_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll", "Zlib_jll", "nghttp2_jll"] -uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.11.1+1" - -[[deps.LibGit2]] -deps = ["LibGit2_jll", "NetworkOptions", "Printf", "SHA"] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -version = "1.11.0" - -[[deps.LibGit2_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll"] -uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.9.0+0" - -[[deps.LibSSH2_jll]] -deps = ["Artifacts", "Libdl", "OpenSSL_jll"] -uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.11.3+1" - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -version = "1.11.0" - -[[deps.Libffi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c8da7e6a91781c41a863611c7e966098d783c57a" -uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" -version = "3.4.7+0" - -[[deps.Libglvnd_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll", "Xorg_libXext_jll"] -git-tree-sha1 = "d36c21b9e7c172a44a10484125024495e2625ac0" -uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" -version = "1.7.1+1" - -[[deps.Libiconv_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "be484f5c92fad0bd8acfef35fe017900b0b73809" -uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" -version = "1.18.0+0" - -[[deps.Libmount_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "3acf07f130a76f87c041cfb2ff7d7284ca67b072" -uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" -version = "2.41.2+0" - -[[deps.Libtiff_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] -git-tree-sha1 = "f04133fe05eff1667d2054c53d59f9122383fe05" -uuid = "89763e89-9b03-5906-acba-b20f662cd828" -version = "4.7.2+0" - -[[deps.Libuuid_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "2a7a12fc0a4e7fb773450d17975322aa77142106" -uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" -version = "2.41.2+0" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -version = "1.12.0" - -[[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" -uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.29" - - [deps.LogExpFunctions.extensions] - LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" - LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" - LogExpFunctionsInverseFunctionsExt = "InverseFunctions" - - [deps.LogExpFunctions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -version = "1.11.0" - -[[deps.LoggingExtras]] -deps = ["Dates", "Logging"] -git-tree-sha1 = "f00544d95982ea270145636c181ceda21c4e2575" -uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.2.0" - -[[deps.MIMEs]] -git-tree-sha1 = "c64d943587f7187e751162b3b84445bbbd79f691" -uuid = "6c6e2e6c-3030-632d-7369-2d6c69616d65" -version = "1.1.0" - -[[deps.MacroTools]] -git-tree-sha1 = "1e0228a030642014fe5cfe68c2c0a818f9e3f522" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.16" - -[[deps.Markdown]] -deps = ["Base64", "JuliaSyntaxHighlighting", "StyledStrings"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -version = "1.11.0" - -[[deps.MarkdownLiteral]] -deps = ["CommonMark", "HypertextLiteral"] -git-tree-sha1 = "f7d73634acd573bf3489df1ee0d270a5d6d3a7a3" -uuid = "736d6165-7244-6769-4267-6b50796e6954" -version = "0.1.2" - -[[deps.MbedTLS]] -deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] -git-tree-sha1 = "c067a280ddc25f196b5e7df3877c6b226d390aaf" -uuid = "739be429-bea8-5141-9913-cc70e7f3736d" -version = "1.1.9" - -[[deps.MbedTLS_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "3cce3511ca2c6f87b19c34ffc623417ed2798cbd" -uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.10+0" - -[[deps.Measures]] -git-tree-sha1 = "c13304c81eec1ed3af7fc20e75fb6b26092a1102" -uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" -version = "0.3.2" - -[[deps.Missings]] -deps = ["DataAPI"] -git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d" -uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" -version = "1.2.0" - -[[deps.Mmap]] -uuid = "a63ad114-7e13-5084-954f-fe012c677804" -version = "1.11.0" - -[[deps.MozillaCACerts_jll]] -uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2025.5.20" - -[[deps.NaNMath]] -deps = ["OpenLibm_jll"] -git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" -uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.1.3" - -[[deps.NetworkOptions]] -uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -version = "1.3.0" - -[[deps.Ogg_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "b6aa4566bb7ae78498a5e68943863fa8b5231b59" -uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" -version = "1.3.6+0" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.29+0" - -[[deps.OpenLibm_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.7+0" - -[[deps.OpenSSL]] -deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] -git-tree-sha1 = "f1a7e086c677df53e064e0fdd2c9d0b0833e3f6e" -uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" -version = "1.5.0" - -[[deps.OpenSSL_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "3.5.1+0" - -[[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" -uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.6+0" - -[[deps.Opus_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c392fc5dd032381919e3b22dd32d6443760ce7ea" -uuid = "91d4177d-7536-5919-b921-800302f37372" -version = "1.5.2+0" - -[[deps.OrderedCollections]] -git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.8.1" - -[[deps.PCRE2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" -version = "10.44.0+1" - -[[deps.PDMats]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "d922b4d80d1e12c658da7785e754f4796cc1d60d" -uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" -version = "0.11.36" -weakdeps = ["StatsBase"] - - [deps.PDMats.extensions] - StatsBaseExt = "StatsBase" - -[[deps.Pango_jll]] -deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1f7f9bbd5f7a2e5a9f7d96e51c9754454ea7f60b" -uuid = "36c8627f-9965-5494-a995-c6b170f724f3" -version = "1.56.4+0" - -[[deps.Parsers]] -deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "7d2f8f21da5db6a806faf7b9b292296da42b2810" -uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.8.3" - -[[deps.Pixman_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl"] -git-tree-sha1 = "db76b1ecd5e9715f3d043cec13b2ec93ce015d53" -uuid = "30392449-352a-5448-841d-b1acce4e97dc" -version = "0.44.2+0" - -[[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.12.0" -weakdeps = ["REPL"] - - [deps.Pkg.extensions] - REPLExt = "REPL" - -[[deps.PlotThemes]] -deps = ["PlotUtils", "Statistics"] -git-tree-sha1 = "41031ef3a1be6f5bbbf3e8073f210556daeae5ca" -uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a" -version = "3.3.0" - -[[deps.PlotUtils]] -deps = ["ColorSchemes", "Colors", "Dates", "PrecompileTools", "Printf", "Random", "Reexport", "StableRNGs", "Statistics"] -git-tree-sha1 = "3ca9a356cd2e113c420f2c13bea19f8d3fb1cb18" -uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" -version = "1.4.3" - -[[deps.Plots]] -deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "TOML", "UUIDs", "UnicodeFun", "UnitfulLatexify", "Unzip"] -git-tree-sha1 = "bfe839e9668f0c58367fb62d8757315c0eac8777" -uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -version = "1.40.20" - - [deps.Plots.extensions] - FileIOExt = "FileIO" - GeometryBasicsExt = "GeometryBasics" - IJuliaExt = "IJulia" - ImageInTerminalExt = "ImageInTerminal" - UnitfulExt = "Unitful" - - [deps.Plots.weakdeps] - FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" - GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326" - IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a" - ImageInTerminal = "d8c32880-2388-543b-8c61-d9f865259254" - Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - -[[deps.PlutoTeachingTools]] -deps = ["Downloads", "HypertextLiteral", "Latexify", "Markdown", "PlutoUI"] -git-tree-sha1 = "dacc8be63916b078b592806acd13bb5e5137d7e9" -uuid = "661c6b06-c737-4d37-b85c-46df65de6f69" -version = "0.4.6" - -[[deps.PlutoUI]] -deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "Downloads", "FixedPointNumbers", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "MIMEs", "Markdown", "Random", "Reexport", "URIs", "UUIDs"] -git-tree-sha1 = "3faff84e6f97a7f18e0dd24373daa229fd358db5" -uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" -version = "0.7.73" - -[[deps.PrecompileTools]] -deps = ["Preferences"] -git-tree-sha1 = "07a921781cab75691315adc645096ed5e370cb77" -uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.3.3" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "0f27480397253da18fe2c12a4ba4eb9eb208bf3d" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.5.0" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -version = "1.11.0" - -[[deps.PtrArrays]] -git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" -uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" -version = "1.3.0" - -[[deps.Qt6Base_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Vulkan_Loader_jll", "Xorg_libSM_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_cursor_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "libinput_jll", "xkbcommon_jll"] -git-tree-sha1 = "34f7e5d2861083ec7596af8b8c092531facf2192" -uuid = "c0090381-4147-56d7-9ebc-da0b1113ec56" -version = "6.8.2+2" - -[[deps.Qt6Declarative_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6ShaderTools_jll"] -git-tree-sha1 = "da7adf145cce0d44e892626e647f9dcbe9cb3e10" -uuid = "629bc702-f1f5-5709-abd5-49b8460ea067" -version = "6.8.2+1" - -[[deps.Qt6ShaderTools_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll"] -git-tree-sha1 = "9eca9fc3fe515d619ce004c83c31ffd3f85c7ccf" -uuid = "ce943373-25bb-56aa-8eca-768745ed7b5a" -version = "6.8.2+1" - -[[deps.Qt6Wayland_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6Declarative_jll"] -git-tree-sha1 = "8f528b0851b5b7025032818eb5abbeb8a736f853" -uuid = "e99dba38-086e-5de3-a5b1-6e4c66e897c3" -version = "6.8.2+2" - -[[deps.QuadGK]] -deps = ["DataStructures", "LinearAlgebra"] -git-tree-sha1 = "9da16da70037ba9d701192e27befedefb91ec284" -uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" -version = "2.11.2" - - [deps.QuadGK.extensions] - QuadGKEnzymeExt = "Enzyme" - - [deps.QuadGK.weakdeps] - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - -[[deps.REPL]] -deps = ["InteractiveUtils", "JuliaSyntaxHighlighting", "Markdown", "Sockets", "StyledStrings", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" -version = "1.11.0" - -[[deps.Random]] -deps = ["SHA"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -version = "1.11.0" - -[[deps.RecipesBase]] -deps = ["PrecompileTools"] -git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" -uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "1.3.4" - -[[deps.RecipesPipeline]] -deps = ["Dates", "NaNMath", "PlotUtils", "PrecompileTools", "RecipesBase"] -git-tree-sha1 = "45cf9fd0ca5839d06ef333c8201714e888486342" -uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" -version = "0.6.12" - -[[deps.Reexport]] -git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" -uuid = "189a3867-3050-52da-a836-e630ba90ab69" -version = "1.2.2" - -[[deps.RelocatableFolders]] -deps = ["SHA", "Scratch"] -git-tree-sha1 = "ffdaf70d81cf6ff22c2b6e733c900c3321cab864" -uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" -version = "1.0.1" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.1" - -[[deps.Rmath]] -deps = ["Random", "Rmath_jll"] -git-tree-sha1 = "4395a4cad612f95c1d08352f8c53811d6af3060b" -uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" -version = "0.8.1" - -[[deps.Rmath_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "58cdd8fb2201a6267e1db87ff148dd6c1dbd8ad8" -uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" -version = "0.5.1+0" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.Scratch]] -deps = ["Dates"] -git-tree-sha1 = "9b81b8393e50b7d4e6d0a9f14e192294d3b7c109" -uuid = "6c6a2e73-6563-6170-7368-637461726353" -version = "1.3.0" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -version = "1.11.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 = "f305871d2f381d21527c770d4788c06c097c9bc1" -uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" -version = "1.2.0" - -[[deps.Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -version = "1.11.0" - -[[deps.SortingAlgorithms]] -deps = ["DataStructures"] -git-tree-sha1 = "64d974c2e6fdf07f8155b5b2ca2ffa9069b608d9" -uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" -version = "1.2.2" - -[[deps.SparseArrays]] -deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.12.0" - -[[deps.SpecialFunctions]] -deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "f2685b435df2613e25fc10ad8c26dddb8640f547" -uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.6.1" - - [deps.SpecialFunctions.extensions] - SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" - - [deps.SpecialFunctions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - -[[deps.StableRNGs]] -deps = ["Random"] -git-tree-sha1 = "95af145932c2ed859b63329952ce8d633719f091" -uuid = "860ef19b-820b-49d6-a774-d7a799459cd3" -version = "1.0.3" - -[[deps.Statistics]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.Statistics.extensions] - SparseArraysExt = ["SparseArrays"] - -[[deps.StatsAPI]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9d72a13a3f4dd3795a195ac5a44d7d6ff5f552ff" -uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" -version = "1.7.1" - -[[deps.StatsBase]] -deps = ["AliasTables", "DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "2c962245732371acd51700dbb268af311bddd719" -uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.34.6" - -[[deps.StatsFuns]] -deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] -git-tree-sha1 = "8e45cecc66f3b42633b8ce14d431e8e57a3e242e" -uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" -version = "1.5.0" - - [deps.StatsFuns.extensions] - StatsFunsChainRulesCoreExt = "ChainRulesCore" - StatsFunsInverseFunctionsExt = "InverseFunctions" - - [deps.StatsFuns.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.StyledStrings]] -uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b" -version = "1.11.0" - -[[deps.SuiteSparse]] -deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] -uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" - -[[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] -uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.8.3+2" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[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" -version = "1.11.0" - -[[deps.TranscodingStreams]] -git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742" -uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" -version = "0.11.3" - -[[deps.Tricks]] -git-tree-sha1 = "372b90fe551c019541fafc6ff034199dc19c8436" -uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" -version = "0.1.12" - -[[deps.URIs]] -git-tree-sha1 = "bef26fb046d031353ef97a82e3fdb6afe7f21b1a" -uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -version = "1.6.1" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -version = "1.11.0" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -version = "1.11.0" - -[[deps.UnicodeFun]] -deps = ["REPL"] -git-tree-sha1 = "53915e50200959667e78a92a418594b428dffddf" -uuid = "1cfade01-22cf-5700-b092-accc4b62d6e1" -version = "0.4.1" - -[[deps.Unitful]] -deps = ["Dates", "LinearAlgebra", "Random"] -git-tree-sha1 = "6258d453843c466d84c17a58732dda5deeb8d3af" -uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" -version = "1.24.0" - - [deps.Unitful.extensions] - ConstructionBaseUnitfulExt = "ConstructionBase" - ForwardDiffExt = "ForwardDiff" - InverseFunctionsUnitfulExt = "InverseFunctions" - PrintfExt = "Printf" - - [deps.Unitful.weakdeps] - ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[deps.UnitfulLatexify]] -deps = ["LaTeXStrings", "Latexify", "Unitful"] -git-tree-sha1 = "af305cc62419f9bd61b6644d19170a4d258c7967" -uuid = "45397f5d-5981-4c77-b2b3-fc36d6e9b728" -version = "1.7.0" - -[[deps.Unzip]] -git-tree-sha1 = "ca0969166a028236229f63514992fc073799bb78" -uuid = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" -version = "0.2.0" - -[[deps.Vulkan_Loader_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Wayland_jll", "Xorg_libX11_jll", "Xorg_libXrandr_jll", "xkbcommon_jll"] -git-tree-sha1 = "2f0486047a07670caad3a81a075d2e518acc5c59" -uuid = "a44049a8-05dd-5a78-86c9-5fde0876e88c" -version = "1.3.243+0" - -[[deps.Wayland_jll]] -deps = ["Artifacts", "EpollShim_jll", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll"] -git-tree-sha1 = "96478df35bbc2f3e1e791bc7a3d0eeee559e60e9" -uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" -version = "1.24.0+0" - -[[deps.XZ_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "fee71455b0aaa3440dfdd54a9a36ccef829be7d4" -uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" -version = "5.8.1+0" - -[[deps.Xorg_libICE_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a3ea76ee3f4facd7a64684f9af25310825ee3668" -uuid = "f67eecfb-183a-506d-b269-f58e52b52d7c" -version = "1.1.2+0" - -[[deps.Xorg_libSM_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libICE_jll"] -git-tree-sha1 = "9c7ad99c629a44f81e7799eb05ec2746abb5d588" -uuid = "c834827a-8449-5923-a945-d239c165b7dd" -version = "1.2.6+0" - -[[deps.Xorg_libX11_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] -git-tree-sha1 = "b5899b25d17bf1889d25906fb9deed5da0c15b3b" -uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" -version = "1.8.12+0" - -[[deps.Xorg_libXau_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "aa1261ebbac3ccc8d16558ae6799524c450ed16b" -uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" -version = "1.0.13+0" - -[[deps.Xorg_libXcursor_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] -git-tree-sha1 = "6c74ca84bbabc18c4547014765d194ff0b4dc9da" -uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" -version = "1.2.4+0" - -[[deps.Xorg_libXdmcp_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "52858d64353db33a56e13c341d7bf44cd0d7b309" -uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" -version = "1.1.6+0" - -[[deps.Xorg_libXext_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "a4c0ee07ad36bf8bbce1c3bb52d21fb1e0b987fb" -uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" -version = "1.3.7+0" - -[[deps.Xorg_libXfixes_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "75e00946e43621e09d431d9b95818ee751e6b2ef" -uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" -version = "6.0.2+0" - -[[deps.Xorg_libXi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] -git-tree-sha1 = "a376af5c7ae60d29825164db40787f15c80c7c54" -uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" -version = "1.8.3+0" - -[[deps.Xorg_libXinerama_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll"] -git-tree-sha1 = "a5bc75478d323358a90dc36766f3c99ba7feb024" -uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" -version = "1.1.6+0" - -[[deps.Xorg_libXrandr_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXrender_jll"] -git-tree-sha1 = "aff463c82a773cb86061bce8d53a0d976854923e" -uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" -version = "1.5.5+0" - -[[deps.Xorg_libXrender_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "7ed9347888fac59a618302ee38216dd0379c480d" -uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" -version = "0.9.12+0" - -[[deps.Xorg_libxcb_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXau_jll", "Xorg_libXdmcp_jll"] -git-tree-sha1 = "bfcaf7ec088eaba362093393fe11aa141fa15422" -uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" -version = "1.17.1+0" - -[[deps.Xorg_libxkbfile_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "e3150c7400c41e207012b41659591f083f3ef795" -uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" -version = "1.1.3+0" - -[[deps.Xorg_xcb_util_cursor_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_jll", "Xorg_xcb_util_renderutil_jll"] -git-tree-sha1 = "9750dc53819eba4e9a20be42349a6d3b86c7cdf8" -uuid = "e920d4aa-a673-5f3a-b3d7-f755a4d47c43" -version = "0.1.6+0" - -[[deps.Xorg_xcb_util_image_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] -git-tree-sha1 = "f4fc02e384b74418679983a97385644b67e1263b" -uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b" -version = "0.4.1+0" - -[[deps.Xorg_xcb_util_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll"] -git-tree-sha1 = "68da27247e7d8d8dafd1fcf0c3654ad6506f5f97" -uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5" -version = "0.4.1+0" - -[[deps.Xorg_xcb_util_keysyms_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] -git-tree-sha1 = "44ec54b0e2acd408b0fb361e1e9244c60c9c3dd4" -uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7" -version = "0.4.1+0" - -[[deps.Xorg_xcb_util_renderutil_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] -git-tree-sha1 = "5b0263b6d080716a02544c55fdff2c8d7f9a16a0" -uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e" -version = "0.3.10+0" - -[[deps.Xorg_xcb_util_wm_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] -git-tree-sha1 = "f233c83cad1fa0e70b7771e0e21b061a116f2763" -uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361" -version = "0.4.2+0" - -[[deps.Xorg_xkbcomp_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxkbfile_jll"] -git-tree-sha1 = "801a858fc9fb90c11ffddee1801bb06a738bda9b" -uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" -version = "1.4.7+0" - -[[deps.Xorg_xkeyboard_config_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xkbcomp_jll"] -git-tree-sha1 = "00af7ebdc563c9217ecc67776d1bbf037dbcebf4" -uuid = "33bec58e-1273-512f-9401-5d533626f822" -version = "2.44.0+0" - -[[deps.Xorg_xtrans_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a63799ff68005991f9d9491b6e95bd3478d783cb" -uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" -version = "1.6.0+0" - -[[deps.Zlib_jll]] -deps = ["Libdl"] -uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.3.1+2" - -[[deps.Zstd_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "446b23e73536f84e8037f5dce465e92275f6a308" -uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" -version = "1.5.7+1" - -[[deps.eudev_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c3b0e6196d50eab0c5ed34021aaa0bb463489510" -uuid = "35ca27e7-8b34-5b7f-bca9-bdc33f59eb06" -version = "3.2.14+0" - -[[deps.fzf_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "b6a34e0e0960190ac2a4363a1bd003504772d631" -uuid = "214eeab7-80f7-51ab-84ad-2988db7cef09" -version = "0.61.1+0" - -[[deps.libaom_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "371cc681c00a3ccc3fbc5c0fb91f58ba9bec1ecf" -uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" -version = "3.13.1+0" - -[[deps.libass_jll]] -deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "125eedcb0a4a0bba65b657251ce1d27c8714e9d6" -uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" -version = "0.17.4+0" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.15.0+0" - -[[deps.libdecor_jll]] -deps = ["Artifacts", "Dbus_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pango_jll", "Wayland_jll", "xkbcommon_jll"] -git-tree-sha1 = "9bf7903af251d2050b467f76bdbe57ce541f7f4f" -uuid = "1183f4f0-6f2a-5f1a-908b-139f9cdfea6f" -version = "0.2.2+0" - -[[deps.libevdev_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "56d643b57b188d30cccc25e331d416d3d358e557" -uuid = "2db6ffa8-e38f-5e21-84af-90c45d0032cc" -version = "1.13.4+0" - -[[deps.libfdk_aac_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "646634dd19587a56ee2f1199563ec056c5f228df" -uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" -version = "2.0.4+0" - -[[deps.libinput_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "eudev_jll", "libevdev_jll", "mtdev_jll"] -git-tree-sha1 = "91d05d7f4a9f67205bd6cf395e488009fe85b499" -uuid = "36db933b-70db-51c0-b978-0f229ee0e533" -version = "1.28.1+0" - -[[deps.libpng_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "07b6a107d926093898e82b3b1db657ebe33134ec" -uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -version = "1.6.50+0" - -[[deps.libvorbis_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll"] -git-tree-sha1 = "11e1772e7f3cc987e9d3de991dd4f6b2602663a5" -uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" -version = "1.3.8+0" - -[[deps.mtdev_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "b4d631fd51f2e9cdd93724ae25b2efc198b059b1" -uuid = "009596ad-96f7-51b1-9f1b-5ce2d5e8a71e" -version = "1.1.7+0" - -[[deps.nghttp2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.64.0+1" - -[[deps.p7zip_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.5.0+2" - -[[deps.x264_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "14cc7083fc6dff3cc44f2bc435ee96d06ed79aa7" -uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a" -version = "10164.0.1+0" - -[[deps.x265_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "e7b67590c14d487e734dcb925924c5dc43ec85f3" -uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" -version = "4.1.0+0" - -[[deps.xkbcommon_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] -git-tree-sha1 = "fbf139bce07a534df0e699dbb5f5cc9346f95cc1" -uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" -version = "1.9.2+0" -""" - -# ╔═╡ Cell order: -# ╟─23c689fc-d294-11ef-086e-47c4f871bed2 -# ╟─fe9d4fbc-f264-459b-8fbe-26663500f6c5 -# ╟─23c6997e-d294-11ef-09a8-a50563e5975b -# ╟─f7a19975-a919-4659-9b6a-d8963a1cd6d9 -# ╟─51a46b5e-0c35-4841-a4f3-413d5d294805 -# ╟─876f47d8-b272-4e23-b5ec-5c7d615ff618 -# ╟─69732524-90fd-46f4-9706-c07ce6226d2b -# ╟─f63b65b9-86c8-420b-b2d5-28268782f155 -# ╟─841ddfc8-85e0-47ee-9288-2d90a84a5dc3 -# ╠═fedb7530-6fce-496c-a55a-3e9908f9711a -# ╟─70a620bc-47c7-46c4-870b-22b3e05039a1 -# ╠═cff683bf-0488-41d2-9858-cf8776a48992 -# ╟─fe324e92-d753-46cd-aad9-794a76dc806b -# ╠═bf39f423-7df3-4990-a254-c28a1bdf23bf -# ╟─77280f3b-e391-482f-936f-703d1d3c4006 -# ╟─5730758d-80cd-4d95-b16c-399c38cf585b -# ╟─23c73302-d294-11ef-0c12-571686b202a9 -# ╟─23c73b54-d294-11ef-0ef8-8d9159139a1b -# ╟─0d52466f-b092-4569-8c2d-b43c725887ae -# ╟─23c74748-d294-11ef-2170-bf45b6379e4d -# ╟─23c75dc8-d294-11ef-3c57-614e75f06d8f -# ╟─23c763ce-d294-11ef-015b-736be1a5e9d6 -# ╟─20cd1582-d7f7-448c-8685-607f7cc1dc9c -# ╟─23c7779a-d294-11ef-2e2c-6ba6cadb1381 -# ╟─ffc80e65-a454-4b45-a9b7-76b01c7e96c0 -# ╟─2e1ccf78-6097-4097-8bc8-1f1ec2d9c3ff -# ╟─32cb67f6-1ed2-4d30-8493-e4eed9651526 -# ╟─23c78d3e-d294-11ef-0309-ff10f58f0252 -# ╟─23c798ce-d294-11ef-0190-f342f30e2266 -# ╟─23c7a54c-d294-11ef-0252-ef7a043e995c -# ╟─23c7ab20-d294-11ef-1926-afae49e79923 -# ╟─14362031-7977-4a0c-b329-23da9b5b2f62 -# ╟─23c7baa4-d294-11ef-22c1-31b0d86f5586 -# ╟─84353cd1-e4fb-4689-9e90-d8995cbe2e9b -# ╟─23c7c920-d294-11ef-1b6d-d98dd54dcbe3 -# ╟─2f2cb20f-ff7c-4b7f-8aa0-f5b3addb9299 -# ╟─866d8e7a-2b33-4635-84c0-6cbf900b523b -# ╟─23c82154-d294-11ef-0945-c9c94fc2a44d -# ╟─23c7e4a0-d294-11ef-16e9-6f96a41baf97 -# ╟─23c7f170-d294-11ef-1340-fbdf4ce5fd44 -# ╟─5c746070-19a9-464b-aedc-401d016dfdb6 -# ╟─8d78f9d3-7ba8-46b0-8d6f-231e681caa49 -# ╟─25e18c78-9cac-4faa-bb7c-ac036d0eac90 -# ╟─117f3f65-a9bd-4b25-93e2-42ac1e576b6d -# ╟─a8adaf31-bee2-40e9-8d9b-bb9f1ad996ca -# ╟─b01a4a56-bed2-4a06-991a-831adc84aa3e -# ╟─1a890e4b-b8a9-4a6e-b1f3-17863e1416d7 -# ╟─23c82e10-d294-11ef-286a-ff6fee0f2805 -# ╟─36e6b874-a1b8-40d7-8762-f0c5f9121e40 -# ╟─689ea1f9-0a72-478e-b8a9-ebf450ce95ef -# ╟─4481b38d-dc67-4c1f-ac0b-b348f0aea461 -# ╠═cc8144d9-9ecf-4cbd-aea9-0c7a2fca2d94 -# ╠═19360d53-93d8-46fe-82d5-357015e75e22 -# ╟─5092090d-cfac-4ced-b61e-fb7107a4c638 -# ╠═10bfb9ea-46a6-4f4d-980e-ed2afce7b39a -# ╠═cd310392-aabd-40e0-b06f-f8297c7eed6f -# ╟─3228f074-7c1d-420a-bfb0-c3bd693003ad -# ╠═ba9fa93f-093c-4783-988f-27f4ba228e88 -# ╠═46d2d5e9-bb6b-409a-acdc-cdffd1a6f797 -# ╟─e91effb4-b3ac-4d7a-b93f-33a78a125110 -# ╠═90b862a5-d5bc-4122-a942-f01062daa86a -# ╠═33d5d6e7-1208-4c5b-b651-429b3b6ad50b -# ╟─723e09fc-ec63-4c47-844c-d821515ce0f4 -# ╟─9973e8e5-4744-4ff6-9494-1c93503f11c1 -# ╟─4ada77d1-09f2-49c7-a44f-1928e0dc5421 -# ╟─845f19c4-c3c5-4368-a48a-a7b57687ddf9 -# ╟─21602809-d98b-43d7-8c41-80dc8de6da57 -# ╟─23c85d90-d294-11ef-375e-7101d4d3cbfa -# ╟─45f1f80d-18fc-465c-aaf3-54bbcd8bc95e -# ╟─358fac57-7458-40b5-9f69-50ad4ca7edde -# ╟─ca11db2d-aa15-4bf1-b949-529c7487d11d -# ╟─24a08e5c-c2c1-4f1f-a2c1-998b30147e61 -# ╟─66172ab6-7df8-4068-a748-b33b3f345d6d -# ╟─7e5213d6-4a68-4843-ab4c-77ea3ed8b0cd -# ╟─ef1e5885-7153-4b55-9f97-1e984c2504e6 -# ╟─e65e0e33-3e4f-4765-84ea-a4fb5d43269e -# ╠═f1a40378-a27c-4aa0-a62c-600ffde0032f -# ╠═6631c0e4-4941-442e-8dd4-fa307ee7a8c0 -# ╠═f1575443-c9fb-4674-bbce-bf3a5a6d5a8d -# ╠═26853cdc-0644-4f44-b6db-b5624a4a8689 -# ╠═50cbe27e-009f-4df1-b80a-cf1e73fc525e -# ╟─a4463d74-04ea-428a-b5a5-504d96432a0a -# ╠═3842654e-6dd7-427c-bb77-8b35a2f324fb -# ╠═c91ed138-9885-43ce-a00e-1ba6e996f1aa -# ╠═eac2821e-b25c-4605-857a-cd3bd06303c1 -# ╠═24d3c1f4-432f-419f-8854-69d8bfc135f8 -# ╠═d9efe8bb-c32c-40f4-89d9-8ace7a0665ba -# ╠═ffa01b68-c3ba-4509-8df6-00596974be0f -# ╟─c79525b1-7b44-4585-8292-84abe20a1a3d -# ╟─79fa1b47-460f-457e-aebc-646f60ffecc1 -# ╟─a985e1d3-4867-4991-a60e-e85a9730311b -# ╟─e8cbfc78-04dd-4196-8011-90283969e5b1 -# ╟─00000000-0000-0000-0000-000000000001 -# ╟─00000000-0000-0000-0000-000000000002 diff --git a/mlss/archive/Machine Learning Overview.jl b/mlss/archive/Machine Learning Overview.jl deleted file mode 100644 index d368017..0000000 --- a/mlss/archive/Machine Learning Overview.jl +++ /dev/null @@ -1,746 +0,0 @@ -### A Pluto.jl notebook ### -# v0.20.19 - -#> [frontmatter] -#> image = "https://github.com/bmlip/course/blob/v2/assets/figures/scientific-inquiry-loop.png?raw=true" -#> description = "What type of problem can be solved using Machine Learning? Can we apply the Bayesian approach?" -#> -#> [[frontmatter.author]] -#> name = "BMLIP" -#> url = "https://github.com/bmlip" - -using Markdown -using InteractiveUtils - -# ╔═╡ a5d43e01-8f73-4c48-b565-f10eb807a9ab -using BmlipTeachingTools - -# ╔═╡ 3ceb490e-d294-11ef-1883-a50aadd2d519 -title("Machine Learning Overview") - -# ╔═╡ d7d20de9-53c6-4e30-a1bd-874fca52f017 -PlutoUI.TableOfContents() - -# ╔═╡ 3cebc804-d294-11ef-32bd-29507524ddb2 -md""" -## Preliminaries - -##### Goal - - * Top-level overview of machine learning - -##### Materials - - * Mandatory - - * this notebook - * Optional - - * Study Bishop pp. 1-4 - -""" - -# ╔═╡ 3cebf2d4-d294-11ef-1fde-bf03ecfb9b99 -md""" -## What is Machine Learning? - -Machine Learning relates to **building models from data and using these models in applications**. - -""" - -# ╔═╡ 3cec06e6-d294-11ef-3359-5740f25965da -md""" -##### Problem - - - Suppose we want to develop an algorithm for a complex process about which we have little knowledge (so hand-programming is not possible). - -""" - -# ╔═╡ 3cec1032-d294-11ef-1b9d-237c491b2eb2 -md""" -##### Solution - - - Get the computer to develop the algorithm by itself by showing it examples of the behavior that we want. - -""" - -# ╔═╡ 3cec1832-d294-11ef-1317-07fe5c4e69c2 -md""" -Practically, we choose a library of models, and write a program that picks a model and tunes it to fit the data. - -""" - -# ╔═╡ 3cec20f4-d294-11ef-1012-c19579a786e4 -md""" -This field is known in various scientific communities with slight variations under different names such as machine learning, statistical inference, system identification, data mining, source coding, data compression, data science, etc. - -""" - -# ╔═╡ 3cec3062-d294-11ef-3dd6-bfc5588bdf1f -md""" -## Machine Learning and the Scientific Method - - -The **scientific method** (or scientific inquiry loop) is a systematic approach for building models of the world. It comprises three stages: - - 1. **Hypothesis formulation / Experimental ("Trial") design** – a trial is designed and executed, based on an analysis of the uncertainties in the current model. - - 2. **Observation / Data collection** – the world’s response to the trial is measured in the form of new observations. - - 3. **Analysis / Model updating** – the model is revised in light of the observations. - -The cycle repeats, incrementally improving the model and our understanding. In an engineering context, the model can be used for various applications, such as predicting the future, or recognizing observations as objects. - -![](https://github.com/bmlip/course/blob/v2/assets/figures/scientific-inquiry-loop.png?raw=true) - - -Machine learning can be viewed analogously, as the process of constructing models of the world. While one may debate whether the experimental design stage is part of the machine learning field, the model updating stage, driven by observations, clearly is. This explains why machine learning methods are applied so widely across the sciences and engineering disciplines. - -In this course, we will revisit this scientific inquiry loop and progressively annotate it with the mathematical formulas that underlie each stage of the scientific method. - -""" - -# ╔═╡ a3ae8443-0100-41f7-a91a-c7d128064b88 -keyconcept("", -"Machine learning is about building models of the environment and is therefore an integral part of the scientific inquiry loop. Consequently, we see machine learning applied across the sciences, engineering, and society at large.") - -# ╔═╡ 3cec43d4-d294-11ef-0a9f-43eb506527a6 -md""" -## Machine Learning is Difficult - -##### Modeling (Learning) Problems - - * Is there any regularity in the data anyway? - * What is our prior knowledge and how to express it mathematically? - * How to pick the model library? - * How to tune the models to the data? - * How to measure the generalization performance? - -""" - -# ╔═╡ 3cec5b96-d294-11ef-39e0-15e93768d2b1 -md""" -##### Quality of Observed Data - - * Not enough data - * Too much data? - * Available data may be messy (measurement noise, missing data points, outliers) - -""" - -# ╔═╡ 3cec86cc-d294-11ef-267d-7743fd241c64 -md""" -# A Machine Learning Taxonomy - -Machine learning methods can be grouped, in broad terms, into four categories: - - - Supervised learning - - - Unsupervised learning - - - Trial design / decision-making - - - Other frameworks - - Other stuff, like preference learning, learning to rank, etc., can often be (re-)formulated as special cases of either a supervised, unsupervised, or trial design problem. - -We will briefly introduce these categories below and, in the forthcoming lectures, expand on how each can be framed within the Bayesian machine learning perspective. - -![](https://github.com/bmlip/course/blob/v2/assets/figures/ml-taxonomy.png?raw=true) - - -""" - -# ╔═╡ a66c3b31-0f1f-41ff-b19c-0926ea1c2ff5 -keyconcept("", -"The three major paradigms of machine learning are supervised learning, unsupervised learning, and trial design. Most other applications can be reframed within one of these three frameworks." ) - -# ╔═╡ 6f95adeb-d0a9-47fd-900a-0e55d497bab6 -md""" -## Supervised Learning -""" - -# ╔═╡ 3ced0d0c-d294-11ef-3000-7b63362a2351 -md""" - -**Supervised learning** is about learning functions. [Functions describe the world!!](https://youtu.be/BWZTlfrneD8?si=FNhUu7QH9O9xx2Bp) - -In supervised learning, we are given observations of desired input–output behavior, - -```math -D = \{(x_1, y_1), \dots, (x_N, y_N)\}, -``` - -where ``x_n`` are inputs and ``y_n`` are the corresponding outputs. The goal is to estimate the conditional probability distribution ``p(y_n | x_n)``, i.e., to capture how ``y_n`` depends on ``x_n``. The term "supervised" reflects the fact that the correct outputs ``y_n`` are provided in the training dataset ``D``. (The reasons for using probabilities will be discussed in the [Probability Theory lecture](https://bmlip.github.io/course/lectures/Probability%20Theory%20Review.html).) - -Generally, we distinguish between **classification** and **regression** as two different supervised learning problems. - -""" - -# ╔═╡ e1122eab-a25b-4441-a053-b0121b334731 -md""" -#### Classification - -In a classification problem, the target variable ``y`` is a *discrete-valued* vector representing class labels. - -The special case ``y \in \{\text{true},\text{false}\}`` is called **detection**. - - -![](https://imgur.com/XSCNBN9.png) - -""" - -# ╔═╡ b00872c2-96d0-47e7-8495-a3d6e559ea63 -NotebookCard("https://bmlip.github.io/course/lectures/Generative%20Classification.html"; link_text="Go to lecture") - -# ╔═╡ 3ced29ae-d294-11ef-158b-09fcdaa47d1c -md""" -#### Regression - -Regression, also called **curve fitting**, is the supervised learning task of estimating the conditional distribution ``p(y_n | x_n)``, where ``x_n`` are input variables and ``y_n`` represent __continuous__ output variables. - -![](https://imgur.com/lKUUjWr.png) - -""" - -# ╔═╡ 672c35c0-c7ab-4e17-a280-867bf3cf2f27 -NotebookCard("https://bmlip.github.io/course/lectures/Regression.html"; link_text="Go to lecture") - -# ╔═╡ 3cec9250-d294-11ef-01ac-9d94676a65a3 -md""" -## Unsupervised Learning - -In the unsupervised learning setting, we are given a data set - -```math -D=\{x_1,\ldots,x_N\}\,. -``` - -The task is to model the unconditional probability distribution ``p(x_n)``. The absence of target variables ``y_n`` in the dataset gives rise to the term unsupervised. - -Because no targets are provided, unsupervised learning problems are generally considered more challenging than supervised ones. As in supervised learning, however, we can distinguish two main types of tasks: **clustering** (discovering structure in the data) and **compression** (learning efficient representations of the data). - - -""" - -# ╔═╡ c5bfab8f-4985-420a-b46e-b4ff6d359d3d -md""" -#### Clustering - -If the unobserved target variables take on discrete values, the task is referred to as clustering. In this sense, clustering can be regarded as "unsupervised classification". - -![](https://imgur.com/yIvpvD6.png) -""" - -# ╔═╡ bb485cc3-02e2-4cb4-9e4d-80574b8eb66c -NotebookCard("https://bmlip.github.io/course/lectures/Latent%20Variable%20Models%20and%20VB.html"; link_text="Go to lecture") - -# ╔═╡ 3ced567c-d294-11ef-2657-df20e23a00fa -md""" -#### Compression - -In contrast, if the unobserved target variables are continuously valued, the task is referred to as **compression**. For example, compressing an image ``x`` produces an output ``y`` that is much smaller in size than the original. The objective is to learn a mapping ``y = f(x)`` (the encoder) such that the inverse mapping ``\hat{x} = g(y) \approx f^{-1}(y)`` reconstructs ``\hat{x}`` as close as possible (ideally identical) to the original input ``x``. - -Compression can be interpreted as ''unsupervised regression''. - -![](https://github.com/bmlip/course/blob/v2/assets/figures/fig-compression-example.png?raw=true) - -In this lecture series, we unfortunately do not have enough time to discuss compression in detail in a separate lecture. [Chapter 12 in Bishop (2006)](https://www.microsoft.com/en-us/research/wp-content/uploads/2006/01/Bishop-Pattern-Recognition-and-Machine-Learning-2006.pdf#page=579) contains a nice introduction to compression. - -""" - -# ╔═╡ 0d6029ef-87ba-4881-b7af-9de2dad1ed99 -md""" -## Trial Design -""" - -# ╔═╡ 3cecbc46-d294-11ef-24cb-2d9e41fb35d9 -md""" - -**Trial design** concerns learning which actions (trials) to perform in order to gain information about the environment and/or to achieve certain specific goals (such as crossing a street). In the broader literature, this idea is presented under various related labels, including **experimental design**, **active learning**, **decision-making under uncertainty**, **sequential decision-making**, **hypothesis testing**, **policy learning**, **planning**, and **control**. The sheer number of terms (often differing only in nuance) underscores the central importance of this task within the scientific inquiry process. - -In trial design problems, the model is not only a description of the environment but also acts upon it, thereby influencing which data will be observed in the future. Such systems are called "agents". In addition to the labels mentioned above, the term [Agentic AI](https://en.wikipedia.org/wiki/Agentic_AI) has recently gained popularity. - -In the machine learning and AI community, two prominent approaches to trial design are reinforcement learning and active inference: - - - **Reinforcement Learning**: Given an observed sequence of input signals and (occasionally observed) rewards for those inputs, *learn* to select actions that maximize *expected* future rewards. - - - **Active inference**: Given an observed sequence of input signals and a prior probability distribution about future observations, *learn* to select actions that minimize *expected* prediction errors (i.e., minimize actual minus predicted sensation). - - -""" - -# ╔═╡ 5971fb3c-1489-4e66-a77a-2c6e9714b8a2 -Resource("https://github.com/bmlip/course/raw/refs/heads/main/assets/figures/minigrid%20loop.mp4", :autoplay => true, :loop=>true) - -# ╔═╡ d2f07ece-5cea-4c00-8ed8-a70752e113b7 -NotebookCard("https://bmlip.github.io/course/lectures/Intelligent%20Agents%20and%20Active%20Inference.html"; link_text="Go to lecture") - -# ╔═╡ 3ced839a-d294-11ef-3dd0-1f8c5ef11b75 -md""" -## $(HTML("Some Machine Learning Applications")) - -- computer speech recognition, speaker recognition - -- face recognition, iris identification - -- printed and handwritten text parsing - -- financial prediction, outlier detection (credit-card fraud) - -- user preference modeling (amazon); modeling of human perception - -- modeling of the web (google) - -- machine translation - -- medical expert systems for disease diagnosis (e.g., mammogram) - -- strategic games (chess, go, backgammon), self-driving cars - -In summary, **any 'knowledge-poor' but 'data-rich' problem** - -""" - -# ╔═╡ 438981cd-8450-4678-8b61-9cc5c0c0ebf1 -md""" -# Summary -""" - -# ╔═╡ f47f4370-4d6f-4e36-bbef-63f806130dbe -keyconceptsummary() - -# ╔═╡ 86a2a956-fee6-4306-b8cb-f4b977ad3dbd -md""" -# Code -""" - -# ╔═╡ fa1d5123-db02-4fda-93d2-3e5e2efed515 -html""" - -""" - -# ╔═╡ 3ced947a-d294-11ef-0403-512f2407a2d2 -md""" - -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000001 -PLUTO_PROJECT_TOML_CONTENTS = """ -[deps] -BmlipTeachingTools = "656a7065-6f73-6c65-7465-6e646e617262" - -[compat] -BmlipTeachingTools = "~1.3.1" -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000002 -PLUTO_MANIFEST_TOML_CONTENTS = """ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.12.1" -manifest_format = "2.0" -project_hash = "3e0db0a10f1d7687b8c53fc91306ce22ead0cdba" - -[[deps.AbstractPlutoDingetjes]] -deps = ["Pkg"] -git-tree-sha1 = "6e1d2a35f2f90a4bc7c2ed98079b2ba09c35b83a" -uuid = "6e696c72-6542-2067-7265-42206c756150" -version = "1.3.2" - -[[deps.ArgTools]] -uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.2" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -version = "1.11.0" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -version = "1.11.0" - -[[deps.BmlipTeachingTools]] -deps = ["HypertextLiteral", "InteractiveUtils", "Markdown", "PlutoTeachingTools", "PlutoUI", "Reexport"] -git-tree-sha1 = "806eadb642467b05f9d930f0d127f1e6fa5130f0" -uuid = "656a7065-6f73-6c65-7465-6e646e617262" -version = "1.3.1" - -[[deps.ColorTypes]] -deps = ["FixedPointNumbers", "Random"] -git-tree-sha1 = "67e11ee83a43eb71ddc950302c53bf33f0690dfe" -uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -version = "0.12.1" -weakdeps = ["StyledStrings"] - - [deps.ColorTypes.extensions] - StyledStringsExt = "StyledStrings" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.3.0+1" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -version = "1.11.0" - -[[deps.Downloads]] -deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] -uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -version = "1.6.0" - -[[deps.FileWatching]] -uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" -version = "1.11.0" - -[[deps.FixedPointNumbers]] -deps = ["Statistics"] -git-tree-sha1 = "05882d6995ae5c12bb5f36dd2ed3f61c98cbb172" -uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" -version = "0.8.5" - -[[deps.Format]] -git-tree-sha1 = "9c68794ef81b08086aeb32eeaf33531668d5f5fc" -uuid = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8" -version = "1.3.7" - -[[deps.Ghostscript_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Zlib_jll"] -git-tree-sha1 = "38044a04637976140074d0b0621c1edf0eb531fd" -uuid = "61579ee1-b43e-5ca0-a5da-69d92c66a64b" -version = "9.55.1+0" - -[[deps.Hyperscript]] -deps = ["Test"] -git-tree-sha1 = "179267cfa5e712760cd43dcae385d7ea90cc25a4" -uuid = "47d2ed2b-36de-50cf-bf87-49c2cf4b8b91" -version = "0.0.5" - -[[deps.HypertextLiteral]] -deps = ["Tricks"] -git-tree-sha1 = "7134810b1afce04bbc1045ca1985fbe81ce17653" -uuid = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2" -version = "0.9.5" - -[[deps.IOCapture]] -deps = ["Logging", "Random"] -git-tree-sha1 = "b6d6bfdd7ce25b0f9b2f6b3dd56b2673a66c8770" -uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" -version = "0.2.5" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -version = "1.11.0" - -[[deps.JLLWrappers]] -deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "0533e564aae234aff59ab625543145446d8b6ec2" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.7.1" - -[[deps.JSON]] -deps = ["Dates", "Mmap", "Parsers", "Unicode"] -git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" -uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.21.4" - -[[deps.JpegTurbo_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "4255f0032eafd6451d707a51d5f0248b8a165e4d" -uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "3.1.3+0" - -[[deps.JuliaSyntaxHighlighting]] -deps = ["StyledStrings"] -uuid = "ac6e5ff7-fb65-4e79-a425-ec3bc9c03011" -version = "1.12.0" - -[[deps.LaTeXStrings]] -git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" -uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.4.0" - -[[deps.Latexify]] -deps = ["Format", "Ghostscript_jll", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Requires"] -git-tree-sha1 = "44f93c47f9cd6c7e431f2f2091fcba8f01cd7e8f" -uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" -version = "0.16.10" - - [deps.Latexify.extensions] - DataFramesExt = "DataFrames" - SparseArraysExt = "SparseArrays" - SymEngineExt = "SymEngine" - TectonicExt = "tectonic_jll" - - [deps.Latexify.weakdeps] - DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - SymEngine = "123dc426-2d89-5057-bbad-38513e3affd8" - tectonic_jll = "d7dd28d6-a5e6-559c-9131-7eb760cdacc5" - -[[deps.LibCURL]] -deps = ["LibCURL_jll", "MozillaCACerts_jll"] -uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.4" - -[[deps.LibCURL_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll", "Zlib_jll", "nghttp2_jll"] -uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.11.1+1" - -[[deps.LibGit2]] -deps = ["LibGit2_jll", "NetworkOptions", "Printf", "SHA"] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -version = "1.11.0" - -[[deps.LibGit2_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll"] -uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.9.0+0" - -[[deps.LibSSH2_jll]] -deps = ["Artifacts", "Libdl", "OpenSSL_jll"] -uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.11.3+1" - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -version = "1.11.0" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -version = "1.12.0" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -version = "1.11.0" - -[[deps.MIMEs]] -git-tree-sha1 = "c64d943587f7187e751162b3b84445bbbd79f691" -uuid = "6c6e2e6c-3030-632d-7369-2d6c69616d65" -version = "1.1.0" - -[[deps.MacroTools]] -git-tree-sha1 = "1e0228a030642014fe5cfe68c2c0a818f9e3f522" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.16" - -[[deps.Markdown]] -deps = ["Base64", "JuliaSyntaxHighlighting", "StyledStrings"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -version = "1.11.0" - -[[deps.Mmap]] -uuid = "a63ad114-7e13-5084-954f-fe012c677804" -version = "1.11.0" - -[[deps.MozillaCACerts_jll]] -uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2025.5.20" - -[[deps.NetworkOptions]] -uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -version = "1.3.0" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.29+0" - -[[deps.OpenSSL_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "3.5.1+0" - -[[deps.OrderedCollections]] -git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.8.1" - -[[deps.Parsers]] -deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "7d2f8f21da5db6a806faf7b9b292296da42b2810" -uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.8.3" - -[[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.12.0" - - [deps.Pkg.extensions] - REPLExt = "REPL" - - [deps.Pkg.weakdeps] - REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" - -[[deps.PlutoTeachingTools]] -deps = ["Downloads", "HypertextLiteral", "Latexify", "Markdown", "PlutoUI"] -git-tree-sha1 = "dacc8be63916b078b592806acd13bb5e5137d7e9" -uuid = "661c6b06-c737-4d37-b85c-46df65de6f69" -version = "0.4.6" - -[[deps.PlutoUI]] -deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "Downloads", "FixedPointNumbers", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "MIMEs", "Markdown", "Random", "Reexport", "URIs", "UUIDs"] -git-tree-sha1 = "3faff84e6f97a7f18e0dd24373daa229fd358db5" -uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" -version = "0.7.73" - -[[deps.PrecompileTools]] -deps = ["Preferences"] -git-tree-sha1 = "07a921781cab75691315adc645096ed5e370cb77" -uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.3.3" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "0f27480397253da18fe2c12a4ba4eb9eb208bf3d" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.5.0" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -version = "1.11.0" - -[[deps.Random]] -deps = ["SHA"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -version = "1.11.0" - -[[deps.Reexport]] -git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" -uuid = "189a3867-3050-52da-a836-e630ba90ab69" -version = "1.2.2" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.1" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -version = "1.11.0" - -[[deps.Statistics]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.11.1" - - [deps.Statistics.extensions] - SparseArraysExt = ["SparseArrays"] - - [deps.Statistics.weakdeps] - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - -[[deps.StyledStrings]] -uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b" -version = "1.11.0" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[deps.Tar]] -deps = ["ArgTools", "SHA"] -uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.0" - -[[deps.Test]] -deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] -uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -version = "1.11.0" - -[[deps.Tricks]] -git-tree-sha1 = "372b90fe551c019541fafc6ff034199dc19c8436" -uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" -version = "0.1.12" - -[[deps.URIs]] -git-tree-sha1 = "bef26fb046d031353ef97a82e3fdb6afe7f21b1a" -uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -version = "1.6.1" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -version = "1.11.0" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -version = "1.11.0" - -[[deps.Zlib_jll]] -deps = ["Libdl"] -uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.3.1+2" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.15.0+0" - -[[deps.nghttp2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.64.0+1" - -[[deps.p7zip_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.5.0+2" -""" - -# ╔═╡ Cell order: -# ╟─3ceb490e-d294-11ef-1883-a50aadd2d519 -# ╟─d7d20de9-53c6-4e30-a1bd-874fca52f017 -# ╟─3cebc804-d294-11ef-32bd-29507524ddb2 -# ╟─3cebf2d4-d294-11ef-1fde-bf03ecfb9b99 -# ╟─3cec06e6-d294-11ef-3359-5740f25965da -# ╟─3cec1032-d294-11ef-1b9d-237c491b2eb2 -# ╟─3cec1832-d294-11ef-1317-07fe5c4e69c2 -# ╟─3cec20f4-d294-11ef-1012-c19579a786e4 -# ╟─3cec3062-d294-11ef-3dd6-bfc5588bdf1f -# ╟─a3ae8443-0100-41f7-a91a-c7d128064b88 -# ╟─3cec43d4-d294-11ef-0a9f-43eb506527a6 -# ╟─3cec5b96-d294-11ef-39e0-15e93768d2b1 -# ╟─3cec86cc-d294-11ef-267d-7743fd241c64 -# ╟─a66c3b31-0f1f-41ff-b19c-0926ea1c2ff5 -# ╟─6f95adeb-d0a9-47fd-900a-0e55d497bab6 -# ╟─3ced0d0c-d294-11ef-3000-7b63362a2351 -# ╟─e1122eab-a25b-4441-a053-b0121b334731 -# ╟─b00872c2-96d0-47e7-8495-a3d6e559ea63 -# ╟─3ced29ae-d294-11ef-158b-09fcdaa47d1c -# ╟─672c35c0-c7ab-4e17-a280-867bf3cf2f27 -# ╟─3cec9250-d294-11ef-01ac-9d94676a65a3 -# ╟─c5bfab8f-4985-420a-b46e-b4ff6d359d3d -# ╟─bb485cc3-02e2-4cb4-9e4d-80574b8eb66c -# ╟─3ced567c-d294-11ef-2657-df20e23a00fa -# ╟─0d6029ef-87ba-4881-b7af-9de2dad1ed99 -# ╟─3cecbc46-d294-11ef-24cb-2d9e41fb35d9 -# ╟─5971fb3c-1489-4e66-a77a-2c6e9714b8a2 -# ╟─d2f07ece-5cea-4c00-8ed8-a70752e113b7 -# ╟─3ced839a-d294-11ef-3dd0-1f8c5ef11b75 -# ╟─438981cd-8450-4678-8b61-9cc5c0c0ebf1 -# ╟─f47f4370-4d6f-4e36-bbef-63f806130dbe -# ╟─86a2a956-fee6-4306-b8cb-f4b977ad3dbd -# ╟─a5d43e01-8f73-4c48-b565-f10eb807a9ab -# ╟─fa1d5123-db02-4fda-93d2-3e5e2efed515 -# ╟─3ced947a-d294-11ef-0403-512f2407a2d2 -# ╟─00000000-0000-0000-0000-000000000001 -# ╟─00000000-0000-0000-0000-000000000002 diff --git a/mlss/archive/Regression.jl b/mlss/archive/Regression.jl deleted file mode 100644 index 908a0be..0000000 --- a/mlss/archive/Regression.jl +++ /dev/null @@ -1,2209 +0,0 @@ -### A Pluto.jl notebook ### -# v0.20.21 - -#> [frontmatter] -#> image = "https://i.imgur.com/azbCpRW.png" -#> description = "Introduction to Bayesian linear regression and predictive modeling for continuous data." -#> -#> [[frontmatter.author]] -#> name = "BMLIP" -#> url = "https://github.com/bmlip" - -using Markdown -using InteractiveUtils - -# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). -macro bind(def, element) - #! format: off - return quote - local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end - local el = $(esc(element)) - global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : iv(el) - el - end - #! format: on -end - -# ╔═╡ f8c69b91-4415-454e-a50d-c4a37ada89d1 -using BmlipTeachingTools - -# ╔═╡ 33ca4c67-d96f-457f-bc19-171f4b4b03c6 -using LinearAlgebra, Random - -# ╔═╡ 3ff2bd04-1490-4be6-8b26-b82d1902bb07 -using Plots, Distributions, LaTeXStrings - -# ╔═╡ 234b77a8-d294-11ef-15d5-ff54ed5bec1e -title("Regression") - -# ╔═╡ 66998cd5-78d6-4b22-a9c9-886436cba4dd -PlutoUI.TableOfContents() - -# ╔═╡ 234ba8c2-d294-11ef-36f6-b1f61f65557a - - -challenge_statement("Finding a Secret Function", header_level=1 ) - - - -# ╔═╡ e248df9b-0c48-4803-8d1e-b466ab07692e -begin - secret_function_bond = @bindname secret_function Select([ - (x -> sin(x * 2π)) => "sin(x * 2π)", - (x -> sign(0.4 - x)) => "sign(0.4 - x)", - (x -> x ^ 2) => "x ^ 2", - ]) -end - -# ╔═╡ f1bf64f6-09f9-45a3-acd1-7975ab9e79fc -md""" - -##### Problem - -We consider an unknown data-generating process for ``y``, - -```math -y = f(x) = \sin(2 \pi x)\,, -``` -from which we observe a set of noisy measurements of the function values ``y_n``, for a given set of inputs ``x_n``. - -Let's generate some random observations from this function. You can change the **number of observations** and the **measurement noise**. -""" - -# ╔═╡ 37f06a96-07ac-43e0-ae4d-c64db09bde76 -begin - N_bond = @bindname N Slider(1:150; show_value=true, default=13) -end - -# ╔═╡ 2baf33ce-2ffe-4c99-ab61-a0d578da5117 -begin - σ_noise_bond = @bindname σ_data_noise Slider(0.0:0.01:0.2; default=0.12, show_value=true) -end - -# ╔═╡ f2387991-2d70-46ce-950d-73a9e2c0e8db -md""" -Here is the randomly generated dataset: -""" - -# ╔═╡ 2ff8c0d7-30f5-4593-9533-fee6114a3443 -md""" -The challenge is to uncover the underlying data-generating process and predict responses for future inputs ``x_\bullet``. - -##### Solution - -To be solved [later in this lecture](#Challenge-Revisited:-Finding-a-Secret-Function). -""" - -# ╔═╡ 234c3684-d294-11ef-1c08-d9d61fc3d471 -md""" -# Bayesian Linear Regression - - -""" - -# ╔═╡ 234bb452-d294-11ef-24cb-3d171fe9cb4e -md""" -## Regression as Discriminative Learning -""" - -# ╔═╡ 234be90e-d294-11ef-2257-496f155c2b59 -md""" - -We observe ``N`` IID data **pairs** ``D=\{(x_1,y_1),\dotsc,(x_N,y_N)\}`` with ``x_n \in \mathbb{R}^M`` and ``y_n \in \mathbb{R}``. - -Assume that, based on the data set, we are interested in predicting the response ``y_\bullet`` for a new **given and fixed** input observation ``x_\bullet = a``? - -In a Bayesian (generative) modeling context, we should develop a joint model for all variables, i.e., we should develop a model ``p(y_n,x_n)``, but in this case we already know ``p(x_n) = \delta(x_n-a)``. - -Since -```math -\begin{align} -p(y_n,x_n) &= p(y_n|x_n) p(x_n) \\ - &= p(y_n|x_n) \delta(x_n-a) \,, -\end{align} -``` - -we can focus attention on developing a model for the **conditional distribution** ``p(y_n|x_n)`` only. - -Building a conditional model ``p(y_n|x_n)`` directly for outputs ``y_n`` and given inputs ``x_n``, is called the **discriminative** approach to Bayesian modelling. We will see more of this approach in the [discriminative classification lecture](https://bmlip.github.io/course/lectures/Discriminative%20Classification.html#Discriminative-Classification). - -Next, we discuss (1) model specification, (2) Inference, and (3) a prediction application for a Bayesian linear regression problem. - -""" - -# ╔═╡ 8a7af8b4-f56c-48b2-83b6-afef30bb423e -keyconcept("", "Regression problems can be formulated as the task of developing a predictive model ``p(y | x)`` for outputs ``y`` given inputs ``x``. This is referred to as the **discriminative approach** to probabilistic modeling.") - -# ╔═╡ 234c5394-d294-11ef-1614-c9847412c8fb -md""" - -## Model Specification - - -#### Data-Generating Distribution - -In a traditional *regression* model, we try to "explain the data" by a purely deterministic function ``f(x_n,w)``, plus a purely random term ``\epsilon_n`` for 'unexplained noise': - -```math - y_n = f(x_n,w) + \epsilon_n -``` - -""" - -# ╔═╡ 234c6104-d294-11ef-0a18-15e51a878079 -md""" -In a *linear regression* model, i.e., linear with respect to the parameters ``w``, we assume that - -```math -f(x_n,w)= \sum_{j=0}^{M-1} w_j \phi_j(x_n) = w^T \phi(x_n) -``` - -where ``\phi_j(x)`` are called basis functions. - -For notational simplicity, from now on we will assume ``f(x_n,w) = w^T x_n``, with ``x_n \in \mathbb{R}^M``. - -""" - -# ╔═╡ 234c7766-d294-11ef-36fa-1d2beee3dec0 -md""" -In *ordinary linear regression* , it is further assumed that the noise process ``\epsilon_n`` is zero-mean Gaussian with constant variance, i.e., - -```math -\epsilon_n \sim \mathcal{N}(0,\beta^{-1}) \,. -``` - -""" - -# ╔═╡ 2c2dd8ea-aa41-430a-9066-8c2a20ce9b71 -md""" -💡 _We model our function as a **linear combination of basis functions**. Check out this mini to learn more about this:_ -""" - -# ╔═╡ 23010dab-3e07-401a-aa09-bcba760f0894 -NotebookCard("https://bmlip.github.io/course/minis/Basis%20Functions.html") - -# ╔═╡ 234c8850-d294-11ef-3707-6722628bd9dc -md""" - -#### Likelihood Function - -For an observed data set ``D=\{(x_1,y_1),\dotsc,(x_N,y_N)\}``., the likelihood function for ``w`` is then - -```math -\begin{align*} -p(y\,|\,X,w,\beta) &= \mathcal{N}(y\,|\,X w,\beta^{-1} I) \\ - &= \prod_n \mathcal{N}(y_n\,|\,w^T x_n,\beta^{-1}) \tag{B-3.10} -\end{align*} -``` - -where ``w = \left(\begin{matrix} w_1 \\ w_2 \\ \vdots \\ w_{M} \end{matrix} \right)``, and the observed data set is represented by the ``(N\times M)``-dimensional matrix ``X = \left(\begin{matrix}x_1^T \\ x_2^T \\ \vdots \\ x_N^T \end{matrix} \right) = \left(\begin{matrix}x_{11},x_{12},\dots,x_{1M}\\ x_{21},x_{22},\dots,x_{2M} \\ \vdots \\ x_{N1},x_{N2},\dots,x_{NM} \end{matrix} \right) $ and $y = \left(\begin{matrix} y_1 \\ y_2 \\ \vdots \\ y_N \end{matrix} \right)``. - -Note that, if parameter ``\beta`` is given, then Eq. B-3.10 is a proper likelihood function for the parameters ``w``. - -""" - -# ╔═╡ 234cab14-d294-11ef-1e7c-777fc35ddbd9 -md""" -#### Prior - -For full Bayesian learning of the weights ``w``, we should also choose a prior ``p(w)``. Let's choose a Gaussian prior, - -```math -\begin{equation} -p(w\,|\,\alpha) = \mathcal{N}(w\,|\,0,\alpha^{-1}I) \,.\tag{B-3.52} -\end{equation} -``` - -For simplicity, we will assume that ``\alpha`` and ``\beta`` are fixed and known. - -""" - -# ╔═╡ 234cdca6-d294-11ef-0ba3-dd5356b65236 -md""" -## Inference for ``w`` - -We'll do Bayesian inference for the parameters ``w``. - -```math -\begin{align} -p(w|D) &\propto p(D|w)\cdot p(w) \\ - &= \mathcal{N}(y\,|\,X w,\beta^{-1} I) \cdot \mathcal{N}(w\,|\,0,\alpha^{-1} I) \\ - &\propto \exp \big( -\frac{\beta}{2} \big( {y - X w } \big)^T \big( {y - X w } \big) - \frac{\alpha}{2}w^T w \big) \tag{B-3.55} \\ - &= \exp\big( -\frac{1}{2} w^T\big(\underbrace{\beta X^T X + \alpha I}_{\Lambda_N}\big)w + \big(\underbrace{\beta X^T y}_{\eta_N}\big)^T w - \frac{\beta}{2}y^T y \big) \\ - &\propto \mathcal{N}_c\left(w\,|\,\eta_N,\Lambda_N \right) -\end{align} -``` - -with natural parameters (see the [natural parameterization of Gaussian](https://bmlip.github.io/course/lectures/The%20Gaussian%20Distribution.html#natural-parameterization)): - -```math -\begin{align*} -\eta_N &= \beta X^T y \\ -\Lambda_N &= \beta X^T X + \alpha I -\end{align*} -``` - -Or equivalently (in the [moment parameterization of the Gaussian](https://bmlip.github.io/course/lectures/The%20Gaussian%20Distribution.html#The-Moment-Parameterization)): - -```math -\begin{align*} -p(w|D) &= \mathcal{N}\left(w\,|\,m_N,S_N \right) \tag{B-3.49} \\ -m_N &= \beta S_N X^T y \tag{B-3.53}\\ -S_N &= \left(\alpha I + \beta X^T X\right)^{-1} \tag{B-3.54} -\end{align*} -``` - -Note that Eqs. B-3.53 and B-3.54 combine to - -```math -m_N = \left(\frac{\alpha}{\beta}I + X^T X \right)^{-1} X^T y\,, -``` -which comprises only given variables, so ``m_N`` evaluates to a fixed vector. -""" - -# ╔═╡ 234d6dd8-d294-11ef-3abf-8d6cb00b1907 -md""" -## Application: Predicting Future Data Points - -Assume we are interested in the distribution ``p(y_\bullet \,|\, x_\bullet, D)`` for a new input ``x_\bullet``. This can be worked out to - -```math -\begin{align*} -p(y_\bullet \,|\, x_\bullet, D) &= \int p(y_\bullet \,|\, x_\bullet, w) p(w\,|\,D)\,\mathrm{d}w \\ -&= \int \mathcal{N}(y_\bullet \,|\, w^T x_\bullet, \beta^{-1}) \mathcal{N}(w\,|\,m_N,S_N)\,\mathrm{d}w \\ -&= \mathcal{N}\left(y_\bullet\,|\, m_N^T x_\bullet, \sigma_N^2(x_\bullet) \right) -\end{align*} -``` - -where - -```math -\begin{align*} -m_N &= \beta S_N X^T y \tag{B-3.53}\\ -S_N &= \left(\alpha I + \beta X^T X\right)^{-1} \tag{B-3.54} \\ -\sigma_N^2(x_\bullet) &= \beta^{-1} + x^T_\bullet S_N x_\bullet \tag{B-3.59} -\end{align*} -``` - -Thus, the uncertainty ``\sigma_N^2(x_\bullet)`` about the output ``y_\bullet`` contains both uncertainty about the generative process (through ``\beta^{-1}``), and uncertainty about the weights (through ``x^T_\bullet S_N x_\bullet``). - -""" - -# ╔═╡ ab3baeb4-51d7-4f50-9e06-ed00bb783ebd -details("details of the derivation", -md""" - ```math -\begin{align*} -p(y_\bullet \,|\, x_\bullet, D) &= \int p(y_\bullet \,|\, x_\bullet, w) p(w\,|\,D)\,\mathrm{d}w \\ -&= \int \mathcal{N}(y_\bullet \,|\, w^T x_\bullet, \beta^{-1}) \mathcal{N}(w\,|\,m_N,S_N)\,\mathrm{d}w \\ -&= \int \mathcal{N}(y_\bullet \,|\, z, \beta^{-1}) \underbrace{\mathcal{N}(z\,|\,x_\bullet^T m_N,x_\bullet^T S_N x_\bullet)\,\mathrm{d}z}_{=\mathcal{N}(w\,|\,m_N,S_N)\,\mathrm{d}w} \quad \text{(sub. }z=x_\bullet^T w \text{)} \\ -&= \int \underbrace{\underbrace{\mathcal{N}(z \,|\, y_\bullet, \beta^{-1})}_{\text{switch }z \text{ and }y_\bullet} \mathcal{N}(z\,|\,x_\bullet^T m_N,x_\bullet^T S_N x_\bullet)}_{\text{Use Gaussian product formula}}\,\mathrm{d}z \\ -&= \int \mathcal{N}\left(y_\bullet\,|\, m_N^T x_\bullet, \sigma_N^2(x_\bullet) \right) \underbrace{\mathcal{N}\left(z\,|\, \cdot, \cdot\right)}_{\text{integrate this out}} \mathrm{d}z\\ -&= \mathcal{N}\left(y_\bullet\,|\, m_N^T x_\bullet, \sigma_N^2(x_\bullet) \right) -\end{align*} -``` - -where - - ```math -\begin{align*} -m_N &= \beta S_N X^T y \tag{B-3.53}\\ -S_N &= \left(\alpha I + \beta X^T X\right)^{-1} \tag{B-3.54} \\ -\sigma_N^2(x_\bullet) &= \beta^{-1} + x^T_\bullet S_N x_\bullet \tag{B-3.59} -\end{align*} -``` - -In the above derivation, the substitution of ``\mathcal{N}(w\,|\,m_N,S_N)\,\mathrm{d}w`` by ``\mathcal{N}(z\,|\,x_\bullet^T m_N,x_\bullet^T S_N x_\bullet)\,\mathrm{d}z`` is tricky, and depends on the [change-of-variables theorem](https://bmlip.github.io/course/lectures/Probability%20Theory%20Review.html#General-Variable-Transformations): - -Since ``z = x^T w`` (drop the bullet for notational simplicity), we have - -```math -p(z) = \mathcal{N}(z|m_z,\Sigma_z) -``` - -with - -```math -\begin{aligned} m_z &:= E[z] = E[x^T w] = x^T E[w] = x^T m_N \\ \Sigma_z &:= E[(z-m_z)(z-m_z)^T] \\   &= E[(x^T w - x^T m_N)(x^T w - x^T m_N)^T] \\   &= x^T E[(w - m_N)(w - m_N)^T]x \\   &= x^T S_N x \end{aligned} -``` - -Then we equate probability masses in both domains: - -```math - \mathcal{N}(z|m_z,\Sigma_z)\mathrm{d}z = \mathcal{N}(w|m_N,S_N)\mathrm{d}w -``` - -```math - \Rightarrow \mathcal{N}(z|x^T m_N,x^T S_N x)\mathrm{d}z = \mathcal{N}(w|m_N,S_N)\mathrm{d}w -``` - -""" - ) - -# ╔═╡ fb113692-f00c-4b48-85cc-d7bba88c7099 -keyconcept("", md"For an ordinary linear regression task, with inputs ``x``, outputs ``y``, and weights ``w``, placing a Gaussian prior on the weights ``w`` leads to both a Gaussian posterior over the weights and a Gaussian predictive distribution for the outputs. Importantly, both distributions can be computed in closed form. ") - -# ╔═╡ f600c228-e048-42aa-b79a-60592b367dec -challenge_solution("Finding a Secret Function" , color="green", header_level=1) - -# ╔═╡ c0c57aa6-155a-49a9-9ed2-d568de1b5be2 -md""" -We can use this model to approximate the secret function! Let's see it in action: -""" - -# ╔═╡ b48b93c3-1ff2-4be0-8fad-181035f3e50e -md""" -We also have a _prior_ for the weights: ``w \sim \mathcal{N}(0,σ_{prior}^2)``: -""" - -# ╔═╡ 3fe01c67-6f95-4f6d-8c7f-5a389272ff65 -@bindname σ_prior² Slider([(2.0 .^ (-14:2))..., 1e10]; show_value=true, default=0.5) - -# ╔═╡ 018b6c7b-36bc-4867-a058-3802b43fd1eb - - -# ╔═╡ 90cb881a-7b5d-44e3-a7d1-bb93bef4a82b -md""" -## Implementation Issues - -#### Basic functions - -See the [Mini about Basis Functions](https://bmlip.github.io/course/minis/Basis%20Functions.html) to learn more! -""" - -# ╔═╡ 22e76656-b9f4-463e-9bf8-bd383e92948b -const Layout = PlutoUI.ExperimentalLayout - -# ╔═╡ 9fd4a9b4-3296-4fe3-931f-17744bc4df81 -Layout.vbox([ - secret_function_bond, - N_bond, - σ_noise_bond, -]) - -# ╔═╡ 338ee8e9-b786-48e1-b084-a0e8a6d12118 -baseplot(args...; kwargs...) = plot(args...; size=(650,400), xlim=(-0.0, 1.0), ylim=(-1.2,1.2), kwargs...) - -# ╔═╡ 0e9435fc-3206-4249-b5ff-42cc35c98d47 -function plot_data!(D) - plot!(; legend=:bottomleft) - plot!(secret_function; - label="True function", - color=3, - lw=3, - linestyle=:dash, - ) - scatter!( - D; - label="Observations", - color=1, - # markerstrokewidth=0, - ) -end - -# ╔═╡ 88a2bd82-6663-48cc-a535-5b3e47d814a9 -const deterministic_randomness = MersenneTwister - -# ╔═╡ 68141653-e444-4e29-bbec-4cd7359cb84c -σ_data_noise² = σ_data_noise^2 - -# ╔═╡ 72fcb6a3-36ee-4840-bdc3-ddb743e5c149 -D = let - xs = rand(deterministic_randomness(19), Uniform(0,1), N) - - ys_exact = secret_function.(xs) - - rng = deterministic_randomness(37) - ys = [ - rand(rng, Normal(y, sqrt(σ_data_noise²))) - for y in ys_exact - ] - - collect(zip(xs, ys)) -end - -# ╔═╡ 5d48e25f-9a98-43ce-8f23-d9ab28f69996 -let - baseplot() - plot_data!(D) -end - -# ╔═╡ 70ca3a3f-ee1c-4f3d-9d77-bf55e8e808c1 -μ_basis = range(0.0, 1.0; length=10); - -# ╔═╡ 142f4700-ccf4-4019-b3a9-57035c458276 -σ_basis² = 0.01; - -# ╔═╡ 3a3b7ff2-68aa-411c-b7fb-c6cd00d0dd7b -ϕ(μ, x) = exp(-(x - μ)^2 / σ_basis²); - -# ╔═╡ 290bc994-d0f9-4af3-bd63-78de1640c85c -function f(w, x) - sum(enumerate(μ_basis)) do (i, μ) - w[i] * ϕ(μ, x) - end -end; - -# ╔═╡ 8a2730b8-3262-48cc-81f0-777cf85b9836 -# This is called the "design matrix" -Φ = [ - ϕ(μ, datum[1]) - for datum in D, μ in μ_basis -]; - -# ╔═╡ 98d729ab-79f8-4a0f-9db5-387f488fc19d -weights_posterior = MvNormalCanon( - # Posterior potential vector - Φ' * last.(D) / σ_data_noise², - # Posterior precision matrix (inverse covariance) - Φ' * Φ / σ_data_noise² + I / σ_prior² -); - -# ╔═╡ f9a5c91e-12be-4e8b-930d-74e46e39ea58 -let - baseplot() - if true - for i in 1:40 - w = rand(weights_posterior) - plot!( - x -> f(w, x); - opacity=.3, - color=2, - label=i==1 ? "Posterior samples" : nothing, - ) - end - end - - plot_data!(D) -end - -# ╔═╡ ec0ccf94-e12e-422d-b4d2-dcb933453146 -md""" -# Special Cases -""" - -# ╔═╡ 234da212-d294-11ef-1fdc-c38e13cb41db -md""" -## Maximum Likelihood Estimation for Linear Regression Model - -Recall the posterior mean for the weight vector - -```math -m_N = \left(\frac{\alpha}{\beta}I + X^T X \right)^{-1} X^T y -``` - -where ``\alpha`` is the prior precision for the weights. - -""" - -# ╔═╡ 234dab5e-d294-11ef-30b4-39c5e05dfb31 -md""" -The Maximum Likelihood solution for ``w`` is obtained by letting ``\alpha \rightarrow 0``, which leads to - -```math -\begin{equation*} -\hat w_{\text{ML}} = (X^T X)^{-1} X^T y -\end{equation*} -``` - -""" - -# ╔═╡ 234dbda6-d294-11ef-05fe-bd3d1320470a -md""" -The matrix ``X^\dagger \equiv (X^T X)^{-1}X^T`` is also known as the **Moore-Penrose pseudo-inverse** (which is sort-of-an-inverse for non-square matrices). - -""" - -# ╔═╡ 234dc704-d294-11ef-158b-a9ae9e157251 -md""" -Note that if we have fewer training samples than input dimensions, i.e., if ``N [frontmatter] -#> image = "https://github.com/bmlip/course/blob/v2/assets/figures/fig-linear-system.png?raw=true" -#> description = "Review of information processing with Gaussian distributions in linear systems." -#> -#> [[frontmatter.author]] -#> name = "BMLIP" -#> url = "https://github.com/bmlip" - -using Markdown -using InteractiveUtils - -# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). -macro bind(def, element) - #! format: off - return quote - local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end - local el = $(esc(element)) - global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : iv(el) - el - end - #! format: on -end - -# ╔═╡ 9edd80d4-d088-4b2f-8843-abaa7a5d9c5e -using Random - -# ╔═╡ 5638c1d0-db95-49e4-bd80-528f79f2947e -using HCubature, LinearAlgebra# Numerical integration package - -# ╔═╡ 03a36e87-2378-4efc-bcac-9c0609b52784 -using MarkdownLiteral: @mdx - -# ╔═╡ c97c495c-f7fe-4552-90df-e2fb16f81d15 -using BmlipTeachingTools - -# ╔═╡ 3ec821fd-cf6c-4603-839d-8c59bb931fa9 -using Distributions, Plots, LaTeXStrings - -# ╔═╡ 00482666-0772-4e5d-bb35-df7b6fb67a1b -using SpecialFunctions - -# ╔═╡ b9a38e20-d294-11ef-166b-b5597125ed6d -title("Continuous Data and the Gaussian Distribution") - -# ╔═╡ 5e9a51b1-c6e5-4fb5-9df3-9b189f3302e8 -PlutoUI.TableOfContents() - -# ╔═╡ b9a46c3e-d294-11ef-116f-9b97e0118e5b -md""" -## Preliminaries - -##### Goal - - * Review of information processing with Gaussian distributions in linear systems - -##### Materials - - * Mandatory - - * These lecture notes - * Optional - - * [Bishop PRML book](https://www.microsoft.com/en-us/research/wp-content/uploads/2006/01/Bishop-Pattern-Recognition-and-Machine-Learning-2006.pdf) (2006), pp. 85-93 - - * [MacKay - 2006 - The Humble Gaussian Distribution](https://github.com/bmlip/course/blob/main/assets/files/Mackay-2006-The-humble-Gaussian-distribution.pdf) (highly recommended!) - * [Ariel Caticha - 2012 - Entropic Inference and the Foundations of Physics](https://github.com/bmlip/course/blob/main/assets/files/Caticha-2012-Entropic-Inference-and-the-Foundations-of-Physics.pdf), pp.30-34, section 2.8, the Gaussian distribution - * References - - * [E.T. Jaynes - 2003 - The central, Gaussian or normal distribution, ch.7 in: Probability Theory, The Logic of Science](https://github.com/bmlip/course/blob/main/assets/files/Jaynes%20-%202003%20-%20Probability%20theory%20-%20ch-7%20-%20Gaussian%20distribution.pdf) (Very insightful chapter in Jaynes' book on the Gaussian distribution.) - -""" - -# ╔═╡ 8e436806-af9d-4aa4-88a4-d37e10b69c36 -challenge_statement("Gaussian Density Estimation",header_level=1) - -# ╔═╡ b9a48c60-d294-11ef-3b90-03053fcd82fb -md""" - -Consider a data set as shown in the figure below - -""" - - -# ╔═╡ 3200f4f9-4c43-46c0-8bdb-9afc95d116e0 -md""" - -##### Setup - -We have a dataset `D` of observations. `D` is a Matrix, where each column is an observation ``\in \mathbb{R}^2``: -""" - -# ╔═╡ 4e6c4e40-f744-49e7-9d67-cf982c9fc58d -md""" -We now draw an extra observation ``x_\bullet = (a,b)`` from the same data-generating process: -""" - -# ╔═╡ 148f82be-5012-4c12-9002-6a8bcbf5ad08 -md""" -``D`` and ``x_\bullet`` are shown in the plot above. -""" - -# ╔═╡ b1b9bc8f-2653-42af-ad49-6aaaba2ae70e - - -# ╔═╡ c2208520-020b-400a-8bb4-c8fb6786ccf3 -md""" -##### Problem - -What is the probability that ``x_\bullet`` lies within the shaded rectangle ``S = \{ (x,y) \in \mathbb{R}^2 | 0 \leq x \leq 2, 1 \leq y \leq 2 \} ``? -""" - -# ╔═╡ 3d05a2eb-87aa-4d6a-9caf-feb5758e000a -S = [[0.0, 2.0], [1.0, 2.0]] - -# ╔═╡ 55380883-d269-4f61-bec6-2944765db271 - - -# ╔═╡ 02853a5c-f6aa-4af8-8a25-bfffd4b96afc -md""" - -##### Solution - -- See [later in this lecture](#Challenge-Revisited:-Gaussian-Density-Estimation). -""" - -# ╔═╡ 71f1c8ee-3b65-4ef8-b36f-3822837de410 -md""" -# The Gaussian Distribution -""" - -# ╔═╡ b9a4eb62-d294-11ef-06fa-af1f586cbc15 -md""" -## The Moment Parameterization - -Consider a random (vector) variable ``x \in \mathbb{R}^M`` that is "normally" (i.e., Gaussian) distributed. The *moment* parameterization of the Gaussian distribution is completely specified by its *mean* ``\mu`` and *variance* ``\Sigma`` parameters, and given by - -```math -p(x | \mu, \Sigma) = \mathcal{N}(x|\mu,\Sigma) \triangleq \frac{1}{\sqrt{(2\pi)^M |\Sigma|}} \,\exp\left(-\frac{1}{2}(x-\mu)^T \Sigma^{-1} (x-\mu) \right)\,, -``` - -where ``|\Sigma| \triangleq \mathrm{det}(\Sigma)`` is the determinant of ``\Sigma``. - -For a scalar real variable ``x \in \mathbb{R}``, this works out to - -```math -p(x | \mu, \sigma^2) = \frac{1}{\sqrt{2\pi\sigma^2 }} \,\exp\left(-\frac{(x-\mu)^2}{2 \sigma^2} \right)\,. -``` - -It is common to write the (scalar) variance parameter as `` \sigma^2 `` to emphasize that the variance is non-negative. - -""" - -# ╔═╡ b9a50d0c-d294-11ef-0e60-2386cf289478 -md""" - -## The Canonical (Natural) Parameterization - -Alternatively, the $(HTML(""))*canonical* (a.k.a. *natural* or *information* ) parameterization of the Gaussian distribution is given by - -```math -\begin{equation*} -p(x | \eta, \Lambda) = \mathcal{N}_c(x|\eta,\Lambda) = \exp\left( a + \eta^T x - \frac{1}{2}x^T \Lambda x \right) \,, -\end{equation*} -``` -where -```math -a = -\frac{1}{2} \left( M \log(2 \pi) - \log |\Lambda| + \eta^T \Lambda \eta\right) -``` - -is the *normalizing* constant that ensures that ``\int p(x)\mathrm{d}x = 1``, and - -```math -\Lambda = \Sigma^{-1} -``` - -is called the *precision* matrix. The parameter - -```math -\eta = \Sigma^{-1} \mu -``` - -is the *natural* mean, or for clarity, often called the *precision-weighted* mean. - -The Gaussian distribution can be expressed in both moment and natural parameterizations, which are mathematically equivalent but differ in how the parameters are defined. - -""" - -# ╔═╡ b9a52b18-d294-11ef-2d42-19c5e3ef3549 -md""" -## Why the Gaussian? -""" - -# ╔═╡ b9a5589a-d294-11ef-3fc3-0552a69df7b2 -md""" - -Why is the Gaussian distribution so ubiquitously used in science and engineering? - -1. Operations on probability distributions tend to lead to Gaussian distributions: - - * Any smooth function with a single rounded maximum goes into a Gaussian function, if raised to higher and higher powers. This is particularly useful in sequential Bayesian inference where repeated updates leads to Gaussian posteriors. (See also this [tweet](https://x.com/Almost_Sure/status/1745480056288186768)). - * The [Gaussian distribution has higher entropy](https://en.wikipedia.org/wiki/Differential_entropy#Maximization_in_the_normal_distribution) than any other with the same variance. - * Therefore, any operation on a probability distribution that discards information but preserves variance gets us closer to a Gaussian. - * As an example, see [Jaynes, section 7.1.4](https://github.com/bmlip/course/blob/main/assets/files/Jaynes%20-%202003%20-%20Probability%20theory%20-%20ch-7%20-%20Gaussian%20distribution.pdf) for how this leads to the [Central Limit Theorem](https://en.wikipedia.org/wiki/Central_limit_theorem), which results from performing convolution operations on distributions. - - -2. Once the Gaussian has been attained, this form tends to be preserved. e.g., - - * The convolution of two Gaussian functions is another Gaussian function (useful in the sum of 2 variables and linear transformations) - * The product of two Gaussian functions is another Gaussian function (useful in Bayes rule). - * The Fourier transform of a Gaussian function is another Gaussian function. - -See also [Jaynes, section 7.14](https://github.com/bmlip/course/blob/main/assets/files/Jaynes%20-%202003%20-%20Probability%20theory%20-%20ch-7%20-%20Gaussian%20distribution.pdf), and the whole chapter 7 in his book for more details on why the Gaussian distribution is so useful. - -""" - -# ╔═╡ 085233ee-f5ad-4731-89bb-84773182bba6 -keyconcept("", -md""" -Why is the Gaussian distribution so ubiquitously used in science and engineering? - - - Operations on probability distributions tend to lead to Gaussian distributions. - - Once the Gaussian has been attained, this form tends to be preserved. - -""") - -# ╔═╡ 9501922f-b928-46e2-8f23-8eb9c64f6198 -md""" -# Computing with Gaussians -""" - -# ╔═╡ b9a5889c-d294-11ef-266e-d90225222e10 -md""" -## Linear Transformations of Gaussian Variables - -As shown in the [probability theory lecture](https://bmlip.github.io/course/lectures/Probability%20Theory%20Review.html#linear-transformation), under the linear transformation - -```math -z = Ax + b \,, -``` -for given ``A`` and ``b``, the mean and covariance of ``z`` are given by ``\mu_z = A\mu_x + b`` and ``\Sigma_z = A\Sigma_x A^\top``, regardless of the distribution of ``x``. - -Since a Gaussian distribution is fully specified by its mean and covariance matrix, it follows that a linear transformation ``z=Ax+b`` of a Gaussian variable ``x \sim \mathcal{N}(\mu_x,\Sigma_x)`` is Gaussian distributed as - -```math -p(z) = \mathcal{N} \left(z \,|\, A\mu_x+b, A\Sigma_x A^T \right) \,. -``` - -In case ``x`` is not Gaussian, higher order moments may be needed to specify the distribution for ``z``. - - -""" - -# ╔═╡ 56510a09-073c-4fc8-b0b7-17b20dbb95f0 -section_outline("Exercises:", "Linear Transformations" , color= "yellow" ) - -# ╔═╡ a82378ae-d1be-43f9-b63a-2f897767d1fb -md""" -##### The Sum of Gaussian Variables - -A commonly occurring example of a linear transformation is the *sum of two independent Gaussian variables*: - -Let ``x \sim \mathcal{N} \left(\mu_x, \sigma_x^2 \right)`` and ``y \sim \mathcal{N} \left(\mu_y, \sigma_y^2 \right)``. Prove that the PDF for ``z=x+y`` is given by - -```math -p(z) = \mathcal{N} \left(z\,|\,\mu_x+\mu_y, \sigma_x^2 +\sigma_y^2 \right) -``` - - -""" - -# ╔═╡ 36eff7bc-72f2-4b48-a109-1861af6834aa -hide_proof( -md""" -First, recognize that ``z=x+y`` can be written as a linear transformation ``z=A w``, where -```math -A = \begin{bmatrix} 1 & 1\end{bmatrix} -``` -and -```math -w = \begin{bmatrix} x \\ y\end{bmatrix} \sim \mathcal{N}\left( \begin{bmatrix} \mu_x \\ \mu_y\end{bmatrix}, \begin{bmatrix} \sigma_x^2 & 0 \\ 0 & \sigma_y^2\end{bmatrix}\right) \,. -``` - -Making use of the above formula for linear transformations, it follows that -```math -\begin{align*} -p(z) &= \mathcal{N}\big(z\,\big|\,A \mu_w, A \Sigma_w A^T \big) \\ - &= \mathcal{N}\bigg(z\, \bigg|\,\begin{bmatrix} 1 & 1 \end{bmatrix} \begin{bmatrix} \mu_x \\ \mu_y \end{bmatrix}, \begin{bmatrix} 1 & 1 \end{bmatrix} \begin{bmatrix} \sigma_x^2 & 0 \\ 0 & \sigma_y^2 \end{bmatrix} \begin{bmatrix} 1 \\ 1 \end{bmatrix} \bigg) \\ - &= \mathcal{N} \left(z\,|\,\mu_x+\mu_y, \sigma_x^2 +\sigma_y^2 \right) -\end{align*} -``` - """ - ) - -# ╔═╡ 87f400ac-36f2-4778-a3ba-06dd7652e279 -md""" -Following the example above, now compute the PDF for ``z`` if ``x`` and ``y`` were *dependent* Gaussian variables? -""" - -# ╔═╡ 9c2bf0a2-4bb6-4769-b47b-6a02c4e73044 -hide_solution( -md""" -In this case, we assume that -```math -w = \begin{bmatrix} x \\ y\end{bmatrix} \sim \mathcal{N}\Big( \begin{bmatrix} x \\ y\end{bmatrix}, \begin{bmatrix} \sigma_x^2 & \sigma_{xy} \\ \sigma_{xy} & \sigma_y^2\end{bmatrix}\Big) \,. -``` -This leads to -```math -\begin{align*} -p(z) &= \mathcal{N}\big(z\,\big|\,A \mu_w, A \Sigma_w A^T \big) \\ - - &= \mathcal{N} \left(z\,|\,\mu_x+\mu_y, \sigma_x^2 +\sigma_y^2 + 2\sigma_{xy} \right) -\end{align*} -``` - """ - ) - -# ╔═╡ 8f7ecb91-d251-4ac9-bb32-0dd7215382e3 -md""" - -Consequently, the sum of two independent Gaussian random variables remains Gaussian, with its mean given by the sum of the means and its variance given by the sum of the variances. - -A common mistake is to confuse the *sum of two Gaussian-distributed variables*, which remains Gaussian-distributed (see above), with the *sum of two Gaussian distributions*, which is typically not a Gaussian distribution. -""" - -# ╔═╡ 1df7a10d-c4f6-40d6-8f5a-cbd79ef1d415 -TwoColumn( -md""" -#### Gaussian Signals in a Linear System (**) - -Given independent variables ``x \sim \mathcal{N}(\mu_x, \sigma_x^2)`` and ``y \sim \mathcal{N}(\mu_y, \sigma_x^y)``, what is the PDF for - -```math -z =a \cdot (x-y) + b \,\text{?} -``` - -""", -@htl """ - - - -""") - -# ╔═╡ 673360e8-27ed-471c-a866-15af550df5e7 -hide_solution( -md""" - - -Let ``z \sim \mathcal{N}(\mu_z, \sigma_z^2)``. We proceed by working out the mean and variance for ``z`` explicitly, yielding - - -```math -\begin{align} -\mu_z &= \mathrm{E}\left[ z\right] \\ -&= \mathrm{E}\left[ a\cdot(x -y) + b\right] \\ -&= a\cdot\mathrm{E}\left[ (x -y)\right] + b \\ -&= a\cdot(\mu_x -\mu_y) + b -\end{align} -``` -and -```math -\begin{align} -\sigma_z^2 &= \mathrm{E}\left[ (z-\mu_z)(z-\mu_z)^T\right] \\ -&= \mathrm{E}\left[ a\cdot \big( (x - \mu_x) - (y - \mu_y) \big) \big( (x - \mu_x) - (y - \mu_y) \big)^T \cdot a^T\right] \\ -&= a\cdot(\sigma_x^2 - 2 \underbrace{\sigma_{xy}}_{-0} + \sigma_y^2) \cdot a^T \\ -&= a^2\cdot(\sigma_x^2 + \sigma_y^2) -\end{align} -``` - - - - """ - ) - -# ╔═╡ 9eb3e920-fab5-4a6a-8fe1-5734ebc6b25c -md""" -# Maximum Likelihood Estimation -""" - -# ╔═╡ 883e8244-270e-4c6c-874b-b69d8989c24c - -md""" - -## MLE for a Gaussian - -We are given an IID data set ``D = \{x_1,x_2,\ldots,x_N\}``, where ``x_n \in \mathbb{R}^M``. Assume that the data were drawn from a multivariate Gaussian (MVG) - -```math -p(x_n|\theta) = \mathcal{N}(x_n|\,\mu,\Sigma) \,. -``` - -Let us derive the maximum likelihood estimates for the parameters ``\mu`` and ``\Sigma``. -""" - -# ╔═╡ f02aa0b1-2261-4f65-9bd0-3be33230e0d6 -md""" - -##### Evaluation of log-likelihood function -Let ``\theta =\{\mu,\Sigma\}``. Prove that the log-likelihood (LLH) function ``\log p(D|\theta)`` can be worked out to - -```math -\log p(D|\theta) = - \frac{N}{2}\log |\Sigma|^{-1} - \frac{1}{2}\sum_n (x_n-\mu)^T \Sigma^{-1}(x_n-\mu) + \mathrm{const.} - -``` - -""" - -# ╔═╡ f008a742-6900-4e18-ab4e-b5da53fb64a6 -hide_proof( - md""" -Hint: it may be helpful here to use the matrix calculus rules from the [5SSD0 Formula Sheet](https://github.com/bmlip/course/blob/main/assets/files/5SSD0_formula_sheet.pdf). - - ```math -\begin{align*} -\log p(D|\theta) &= \log \prod_n p(x_n|\theta) \\ - &= \log \prod_n \mathcal{N}(x_n|\mu, \Sigma) \\ -&= \log \prod_n (2\pi)^{-M/2} |\Sigma|^{-1/2} \exp\left\{ -\frac{1}{2}(x_n-\mu)^T \Sigma^{-1}(x_n-\mu)\right\} \\ -&= \sum_n \left( \log (2\pi)^{-M/2} + \log |\Sigma|^{-1/2} -\frac{1}{2}(x_n-\mu)^T \Sigma^{-1}(x_n-\mu)\right) \\ -&= \frac{N}{2}\log |\Sigma|^{-1} - \frac{1}{2}\sum_n (x_n-\mu)^T \Sigma^{-1}(x_n-\mu) + \mathrm{const.} -\end{align*} -``` -""" ) - -# ╔═╡ 75e35350-af22-42b1-bb55-15e16cb9c375 -md""" -##### Maximum likelihood estimate of mean - -Prove that the maximum likelihood estimate of the mean is given by -```math -\hat{\mu} = \frac{1}{N}\sum_n x_n \,. -``` - -""" - -# ╔═╡ 8d2732e8-479f-4744-9b1f-d0364f0c6488 -hide_proof( -md""" -```math -\begin{align*} -\nabla_{\mu} \log p(D|\theta) &\propto - \sum_n \nabla_{\mu} \left(x_n-\mu \right)^T\Sigma^{-1}\left(x_n-\mu \right) \\ -&= - \sum_n \nabla_{\mu} \left(-2 \mu^T\Sigma^{-1}x_n + \mu^T \Sigma^{-1}\mu \right) \\ -&= - \sum_n \left(-2 \Sigma^{-1}x_n + 2\Sigma^{-1}\mu \right) \\ -&= -2 \Sigma^{-1} \sum_n (x_n - \mu) \\ -&= -2 \Sigma^{-1} \Big( \sum_n x_n - N \mu \Big) -\end{align*} -``` - -Since the map ``Ax=0`` for invertible ``A`` can only be true if ``x=0``, it follows that setting the gradient to ``0`` leads to -```math - \hat{\mu} = \frac{1}{N}\sum_n x_n \,. -``` - -""") - -# ╔═╡ 0f9feb8d-971e-4a94-8c70-3e1f0d284314 -md""" -##### Maximum likelihood estimate of variance - -The gradient of the LLH with respect to the variance ``\Sigma`` is a bit more involved. It's actually easier to estimate ``\Sigma`` by taking the derivative to the precision. Compute ``\nabla_{\Sigma^{-1}} \log p(D|\theta)``, and show that the maximum likelihood estimate for ``\Sigma`` is given by - -```math -\hat{\Sigma} = \frac{1}{N}\sum_n (x_n-\hat{\mu}) (x_n-\hat{\mu})^T -``` -""" - - -# ╔═╡ 2767b364-6f9a-413d-aa9e-88741cd2bbb1 -hide_proof( -md""" -```math -\begin{align*} -\nabla_{\Sigma^{-1}} \log p(D|\theta) &= \nabla_{\Sigma^{-1}} \left( \frac{N}{2} \log |\Sigma| ^{-1} -\frac{1}{2}\sum_n (x_n-\mu)^T -\Sigma^{-1} (x_n-\mu)\right) \\ -&= \nabla_{\Sigma^{-1}} \left( \frac{N}{2} \log |\Sigma| ^{-1} - \frac{1}{2}\sum_n \mathrm{Tr}\left[(x_n-\mu) -(x_n-\mu)^T \Sigma^{-1} \right]\right) \\ -&=\frac{N}{2}\Sigma - \frac{1}{2}\sum_n (x_n-\mu) -(x_n-\mu)^T -\end{align*} -``` - -Setting the derivative to zero leads to ``\hat{\Sigma} = \frac{1}{N}\sum_n (x_n-\hat{\mu}) -(x_n-\hat{\mu})^T``. - -""") - - -# ╔═╡ c6753ff3-7b5e-45b8-8adc-e0bbaa6be7d3 -md""" -# Simple Bayesian Inference -""" - -# ╔═╡ b9a5cbc2-d294-11ef-214a-c71fb1272326 -md""" -## Bayesian Inference for Estimation of a Constant - -##### Problem - -Let's estimate a constant ``\theta`` from one ''noisy'' measurement ``x`` about that constant. - -We assume the following measurement equations (the tilde ``\sim`` means: 'is distributed as'): - -```math -\begin{align*} -x &= \theta + \epsilon \\ -\epsilon &\sim \mathcal{N}(0,\sigma^2) -\end{align*} -``` - -Also, let's assume a Gaussian prior for ``\theta`` - -```math -\begin{align*} -\theta &\sim \mathcal{N}(\mu_0,\sigma_0^2) \\ -\end{align*} -``` - -For simplicity, we will assume that ``\sigma^2``, ``\mu_0`` and ``\sigma_0^2`` are given. - -What is the PDF for the posterior ``p(\theta|x)`` ? -""" - -# ╔═╡ b9a5dcc0-d294-11ef-2c85-657a460db5cd -md""" -#### Model specification - -Note that you can rewrite these specifications in probabilistic notation as follows: - -```math -\begin{align*} - p(x|\theta) &= \mathcal{N}(x|\theta,\sigma^2) \\ - p(\theta) &=\mathcal{N}(\theta|\mu_0,\sigma_0^2) -\end{align*} -``` - -""" - -# ╔═╡ 7b415578-10fa-4eb1-ab1f-ce3ff57dcf45 -md""" -#### Inference -""" - -# ╔═╡ b9a67d06-d294-11ef-297b-eb9039786ea7 -md""" -Let's do Bayes rule for the posterior PDF ``p(\theta|x)``. - -```math -\begin{align*} -p(\theta|x) &= \frac{p(x|\theta) p(\theta)}{p(x)} \propto p(x|\theta) p(\theta) \\ - &= \mathcal{N}(x|\theta,\sigma^2) \mathcal{N}(\theta|\mu_0,\sigma_0^2) \\ - &\propto \exp \left\{ -\frac{(x-\theta)^2}{2\sigma^2} - \frac{(\theta-\mu_0)^2}{2\sigma_0^2} \right\} \\ - &\propto \exp \left\{ \theta^2 \cdot \left( -\frac{1}{2 \sigma_0^2} - \frac{1}{2\sigma^2} \right) + \theta \cdot \left( \frac{\mu_0}{\sigma_0^2} + \frac{x}{\sigma^2}\right) \right\} \\ - &= \exp\left\{ -\frac{\sigma_0^2 + \sigma^2}{2 \sigma_0^2 \sigma^2} \left( \theta - \frac{\sigma_0^2 x + \sigma^2 \mu_0}{\sigma^2 + \sigma_0^2}\right)^2 \right\} -\end{align*} -``` - -which we recognize as a Gaussian distribution w.r.t. ``\theta``. - -""" - -# ╔═╡ b9a68d3a-d294-11ef-2335-093a39648007 -md""" -(Just as an aside,) this computational 'trick' for multiplying two Gaussians is called **completing the square**. The procedure makes use of the equality - -```math -ax^2+bx+c_1 = a\left(x+\frac{b}{2a}\right)^2+c_2 -``` - -""" - -# ╔═╡ b9a697fa-d294-11ef-3a57-7b7ba1f4fd70 -md""" -In particular, it follows that the posterior for ``\theta`` is - -```math -\begin{equation*} - p(\theta|x) = \mathcal{N} (\theta |\, \mu_1, \sigma_1^2) -\end{equation*} -``` - -where - -```math -\begin{align*} - \frac{1}{\sigma_1^2} &= \frac{\sigma_0^2 + \sigma^2}{\sigma^2 \sigma_0^2} = \frac{1}{\sigma_0^2} + \frac{1}{\sigma^2} \\ - \mu_1 &= \frac{\sigma_0^2 x + \sigma^2 \mu_0}{\sigma^2 + \sigma_0^2} = \sigma_1^2 \, \left( \frac{1}{\sigma_0^2} \mu_0 + \frac{1}{\sigma^2} x \right) -\end{align*} -``` - -So, multiplication of two Gaussian distributions yields another (unnormalized) Gaussian with - - * posterior precision equals **sum of prior precisions** - * posterior precision-weighted mean equals **sum of prior precision-weighted means** - - -""" - -# ╔═╡ b9a6b7b2-d294-11ef-06dc-4de5ef25c1fd -md""" - -## Conjugate Distributions - -As we just saw, a Gaussian prior, combined with a Gaussian likelihood, makes Bayesian inference analytically solvable (!), since - -```math -\begin{equation*} -\underbrace{\text{Gaussian}}_{\text{posterior}} - \propto \underbrace{\text{Gaussian}}_{\text{likelihood}} \times \underbrace{\text{Gaussian}}_{\text{prior}} \,. -\end{equation*} -``` - - -""" - -# ╔═╡ 702e7b10-14a4-42da-a192-f7c02a3d470a -md""" -When applying Bayes rule, if the posterior distribution belongs to the same family as the prior (e.g., both are Gaussian distributions), we say that the prior and the likelihood form a conjugate pair. -""" - -# ╔═╡ 51d81901-213f-42ce-b77e-10f7ca4a4145 - -keyconcept("", md"In Bayesian inference, a Gaussian prior distribution is **conjugate** to a Gaussian likelihood (when the variance is known), which ensures that the posterior distribution remains Gaussian. This conjugacy greatly simplifies calculation of Bayes rule.") - - -# ╔═╡ b9a6c7b6-d294-11ef-0446-c372aa610df8 -md""" - -## (Multivariate) Gaussian Multiplication - - -$(HTML("")) In general, the multiplication of two multi-variate Gaussians over ``x`` yields an (unnormalized) Gaussian over ``x``: - -```math -\begin{equation*} -\mathcal{N}(x|\mu_a,\Sigma_a) \cdot \mathcal{N}(x|\mu_b,\Sigma_b) = \underbrace{\mathcal{N}(\mu_a|\, \mu_b, \Sigma_a + \Sigma_b)}_{\text{normalization constant}} \cdot \mathcal{N}(x|\mu_c,\Sigma_c) -\end{equation*} -``` - -where - -```math -\begin{align*} -\Sigma_c^{-1} &= \Sigma_a^{-1} + \Sigma_b^{-1} \\ -\Sigma_c^{-1} \mu_c &= \Sigma_a^{-1}\mu_a + \Sigma_b^{-1}\mu_b -\end{align*} -``` - -""" - -# ╔═╡ b9a6ecd2-d294-11ef-02af-37c977f2814b -md""" -Check out that normalization constant ``\mathcal{N}(\mu_a|\, \mu_b, \Sigma_a + \Sigma_b)``. Amazingly, this constant can also be expressed by a Gaussian! - -""" - -# ╔═╡ b9a6f916-d294-11ef-38cb-b78c0c448550 -md""" - -Also note that Bayesian inference is trivial in the [*canonical* parameterization of the Gaussian](#natural-parameterization), where we would get - -```math -\begin{align*} - \Lambda_c &= \Lambda_a + \Lambda_b \quad &&\text{(precisions add)}\\ - \eta_c &= \eta_a + \eta_b \quad &&\text{(precision-weighted means add)} -\end{align*} -``` - -This property is an important reason why the canonical parameterization of the Gaussian distribution is useful in Bayesian data processing. - -""" - -# ╔═╡ d2bedf5f-a0ea-4604-b5da-adf9f11e80be -md""" -It is important to distinguish between two concepts: the *product of Gaussian distributions*, which results in a (possibly unnormalized) Gaussian distribution, and the *product of Gaussian-distributed variables*, which generally does not yield a Gaussian-distributed variable. See the [optional slides below](#OPTIONAL-SLIDES) for further discussion. -""" - -# ╔═╡ b9a7073a-d294-11ef-2330-49ffa7faff21 -md""" -$(code_example("Product of Two Gaussian PDFs")) - -Let's plot the exact product of two Gaussian PDFs as well as the normalized product according to the above derivation. -""" - -# ╔═╡ 45c2fb37-a078-4284-9e04-176156cffb1e -begin - d1 = Normal(0.0, 1); # μ=0, σ^2=1 - d2 = Normal(2.5, 2); # μ=2.5, σ^2=4 - s2_prod = (d1.σ^-2 + d2.σ^-2)^-1 - m_prod = s2_prod * ((d1.σ^-2)*d1.μ + (d2.σ^-2)*d2.μ) - d_prod = Normal(m_prod, sqrt(s2_prod)) # (Note that we neglect the normalization constant.) -end; - -# ╔═╡ df8867ed-0eff-4a52-8f5e-2472467e1aa2 -let - x = range(-4, stop=8, length=100) - fill = (0, 0.1) - - # Plot the first Gaussian - plot(x, pdf.(d1,x); label=L"\mathcal{N}(0,1)", fill) - - # Plot the second Gaussian - plot!(x, pdf.(d2,x); label=L"\mathcal{N}(3,4)", fill) - - # Plot the exact product - plot!(x, pdf.(d1,x) .* pdf.(d2,x); label=L"\mathcal{N}(0,1) \mathcal{N}(3,4)", fill) - - # Plot the normalized Gaussian product - plot!(x, pdf.(d_prod,x); label=L"Z^{-1} \mathcal{N}(0,1) \mathcal{N}(3,4)", fill) -end - -# ╔═╡ 3a0f7324-0955-4c1c-8acc-0d33ebd16f78 -md""" -Check out this mini lecture to learn more about this topic! -""" - -# ╔═╡ db730ca7-4850-49c7-a93d-746d393b509b -NotebookCard("https://bmlip.github.io/course/minis/Sum%20and%20product%20of%20Gaussians.html") - -# ╔═╡ b9a885a8-d294-11ef-079e-411d3f1cda03 -md""" -## Conditioning and Marginalization of a Gaussian - -Let ``z = \begin{bmatrix} x \\ y \end{bmatrix}`` be jointly normal distributed as - -```math -\begin{align*} -p(z) &= \mathcal{N}(z | \mu, \Sigma) - =\mathcal{N} \left( \begin{bmatrix} x \\ y \end{bmatrix} \left| \begin{bmatrix} \mu_x \\ \mu_y \end{bmatrix}, - \begin{bmatrix} \Sigma_x & \Sigma_{xy} \\ \Sigma_{yx} & \Sigma_y \end{bmatrix} \right. \right) -\end{align*} -``` - -Since covariance matrices are by definition symmetric, it follows that ``\Sigma_x`` and ``\Sigma_y`` are symmetric and ``\Sigma_{xy} = \Sigma_{yx}^T``. - -Let's factorize ``p(z) = p(x,y)`` as ``p(x,y) = p(y|x) p(x)`` through conditioning and marginalization. - -##### conditioning -```math -\begin{equation*} -p(y|x) = \mathcal{N}\left(y\,|\,\mu_y + \Sigma_{yx}\Sigma_x^{-1}(x-\mu_x),\, \Sigma_y - \Sigma_{yx}\Sigma_x^{-1}\Sigma_{xy} \right) -\end{equation*} -``` - -##### marginalization -```math -\begin{equation*} - p(x) = \mathcal{N}\left( x|\mu_x, \Sigma_x \right) -\end{equation*} -``` - -**proof**: in [Bishop](https://www.microsoft.com/en-us/research/wp-content/uploads/2006/01/Bishop-Pattern-Recognition-and-Machine-Learning-2006.pdf) pp.87-89 - -Hence, conditioning and marginalization in Gaussians lead to Gaussians again. This is very useful for applications in Bayesian inference in jointly Gaussian systems. - -With a natural parameterization of the Gaussian ``p(z) = \mathcal{N}_c(z|\eta,\Lambda)`` with precision matrix ``\Lambda = \Sigma^{-1} = \begin{bmatrix} \Lambda_x & \Lambda_{xy} \\ \Lambda_{yx} & \Lambda_y \end{bmatrix}``, the conditioning operation results in a simpler result, see Bishop pg.90, eqs. 2.96 and 2.97. - -As an exercise, interpret the formula for the conditional mean (``\mathbb{E}[y|x]=\mu_y + \Sigma_{yx}\Sigma_x^{-1}(x-\mu_x)``) as a prediction-correction operation. - -""" - -# ╔═╡ b9a9565c-d294-11ef-1b67-83d1ab18035b -md""" -$(code_example("Joint, Marginal, and Conditional Gaussian Distributions")) - -Let's plot the joint, marginal, and conditional distributions for some Gaussians. - -""" - -# ╔═╡ 59599e04-3e81-4518-b232-3264d9bde4f7 -let - - # up_or_down_one_order_of_magnitude = 10 .^ (-1.0:0.1:1.0) - range = [(0:.1:1)..., (1.2:.2:2)..., (2.5:.5:10)...] - - Σb11 = @bind example_Σ_11 Scrubbable(range; default=0.3) - Σb12 = @bind example_Σ_12 Scrubbable(range; default=0.7) - Σb22 = @bind example_Σ_22 Scrubbable(range; default=2.0) - - - μb1 = @bind example_μ_1 Scrubbable(range; default=1.0) - μb2 = @bind example_μ_2 Scrubbable(range; default=2.0) - - - - grid2(xs...) = @htl """
$(xs)
""" - - - a(s) = @htl """$s""" - - - - @htl """ - $(a(:μ)) = $( - grid2(μb1, μb2) - ), $(a(:Σ)) = $( - grid2(Σb11, Σb12, Σb12, Σb22) - ) - - - - """ -end - -# ╔═╡ b9a99fcc-d294-11ef-3de4-5369d9796de7 -let - # Define the joint distribution p(x,y) - μ = [example_μ_1, example_μ_2] - Σ = [ - example_Σ_11 example_Σ_12 - example_Σ_12 example_Σ_22 - ] - - ohno = [:😔, :😤, :😖, :🥶] - - try - - - joint = MvNormal(μ,Σ) - - # Define the marginal distribution p(x) - marginal_x = Normal(μ[1], sqrt(Σ[1,1])) - - # Plot p(x,y) - x_range = y_range = range(-2,stop=5,length=100) - - joint_pdf = [ pdf(joint, [x_range[i];y_range[j]]) for j=1:length(y_range), i=1:length(x_range)] - plot_1 = heatmap(x_range, y_range, joint_pdf, title = L"p(x, y)") - - # Plot p(x) - plot_2 = plot(range(-2,stop=5,length=1000), pdf.(marginal_x, range(-2,stop=5,length=1000)), title = L"p(x)", label="", fill=(0, 0.1)) - - # Plot p(y|x = 0.1) - x = 0.1 - conditional_y_m = μ[2]+Σ[2,1]*inv(Σ[1,1])*(x-μ[1]) - conditional_y_s2 = Σ[2,2] - Σ[2,1]*inv(Σ[1,1])*Σ[1,2] - conditional_y = Normal(conditional_y_m, sqrt.(conditional_y_s2)) - plot_3 = plot(range(-2,stop=5,length=1000), pdf.(conditional_y, range(-2,stop=5,length=1000)), title = L"p(y|x = %$x)", label="", fill=(0, 0.1)) - - # Combined - plot(plot_1, plot_2, plot_3, layout=(1,3), size=(1200,300)) - - catch e - str = sprint(showerror, e) - Text("$str $(rand(ohno))") - end - -end - -# ╔═╡ b9a9b8e0-d294-11ef-348d-c197c4ce2b8c -md""" -As is clear from the plots, the conditional distribution is a renormalized slice from the joint distribution. - -""" - -# ╔═╡ b9a9dca8-d294-11ef-04ec-a9202c319f89 -md""" -## Gaussian Conditioning Revisited - -Consider (again) the system - -```math -\begin{align*} -p(x\,|\,\theta) &= \mathcal{N}(x\,|\,\theta,\sigma^2) \\ -p(\theta) &= \mathcal{N}(\theta\,|\,\mu_0,\sigma_0^2) -\end{align*} -``` - -""" - -# ╔═╡ b9a9f98e-d294-11ef-193a-0dbdbfffa86f -md""" -Let ``z = \begin{bmatrix} x \\ \theta \end{bmatrix}``. The distribution for ``z`` is then given by (see [exercise below](#Conversion-to-Joint-Distribution-(**))) - -```math -p(z) = p\left(\begin{bmatrix} x \\ \theta \end{bmatrix}\right) = \mathcal{N} \left( \begin{bmatrix} x\\ - \theta \end{bmatrix} - \,\left|\, \begin{bmatrix} \mu_0\\ - \mu_0\end{bmatrix}, - \begin{bmatrix} \sigma_0^2+\sigma^2 & \sigma_0^2\\ - \sigma_0^2 &\sigma_0^2 - \end{bmatrix} - \right. \right) -``` - -""" - -# ╔═╡ b9aa27da-d294-11ef-0780-af9d89f9f599 -md""" -Direct substitution of the rule for Gaussian conditioning leads to the $(HTML("posterior")) (derivation as an Exercise): - -```math -\begin{align*} -p(\theta|x) &= \mathcal{N} \left( \theta\,|\,\mu_1, \sigma_1^2 \right)\,, -\end{align*} -``` - -with - -```math -\begin{align*} -K &= \frac{\sigma_0^2}{\sigma_0^2+\sigma^2} \qquad \text{($K$ is called: Kalman gain)}\\ -\mu_1 &= \mu_0 + K \cdot (x-\mu_0)\\ -\sigma_1^2 &= \left( 1-K \right) \sigma_0^2 -\end{align*} -``` - -Hence, for jointly Gaussian systems, inference can be performed in a single step using closed-form expressions for conditioning and marginalization of (multivariate) Gaussian distributions. -""" - -# ╔═╡ b426f9c8-4506-43ef-92fa-2ee30be621ca -md""" -# Inference with Multiple Observations -""" - - -# ╔═╡ b9a80522-d294-11ef-39d8-53a536d66bf9 - -md""" - -## Estimation of a Constant - -#### model specification - -Now consider that we measure a data set ``D = \{x_1, x_2, \ldots, x_N\}``, with measurements - -```math -\begin{aligned} -x_n &= \theta + \epsilon_n \\ -\epsilon_n &\sim \mathcal{N}(0,\sigma^2) \,, -\end{aligned} -``` - -and the same prior for ``\theta``: - -```math -\theta \sim \mathcal{N}(\mu_0,\sigma_0^2) \\ -``` - -Let's derive the predictive distribution ``p(x_{N+1}|D)`` for the next sample. - - -#### inference - -First, we derive the posterior for ``\theta``: - -```math -\begin{align*} -p(\theta|D) \propto \underbrace{\mathcal{N}(\theta|\mu_0,\sigma_0^2)}_{\text{prior}} \cdot \underbrace{\prod_{n=1}^N \mathcal{N}(x_n|\theta,\sigma^2)}_{\text{likelihood}} \,. -\end{align*} -``` - -Since the posterior is formed by multiplying ``N+1`` Gaussian distributions in ``\theta``, the result is also Gaussian in ``\theta``, due to the closure of the Gaussian family under multiplication (up to a normalization constant). - -Using the property that precisions and precision-weighted means add when Gaussians are multiplied, we can immediately write the posterior as - -```math -p(\theta|D) = \mathcal{N} (\theta |\, \mu_N, \sigma_N^2) -``` - -where - -```math -\begin{align*} - \frac{1}{\sigma_N^2} &= \frac{1}{\sigma_0^2} + \sum_n \frac{1}{\sigma^2} \tag{B-2.142} \\ - \mu_N &= \sigma_N^2 \, \left( \frac{1}{\sigma_0^2} \mu_0 + \sum_n \frac{1}{\sigma^2} x_n \right) \tag{B-2.141} -\end{align*} -``` - - -""" - -# ╔═╡ 364cd002-92ee-4fb6-b89a-3251eff7502c -md""" -#### application: prediction of future sample - -With the posterior over the model parameters in hand, we can now evaluate the posterior predictive distribution for the next sample ``x_{N+1}``. Proof for yourself that - -```math -\begin{align*} - p(x_{N+1}|D) &= \int p(x_{N+1}|\theta) p(\theta|D)\mathrm{d}\theta \\ - &=\mathcal{N}(x_{N+1}|\mu_N, \sigma^2_N +\sigma^2 ) -\end{align*} -``` - -Note that uncertainty about ``x_{N+1}`` involves both uncertainty about the parameter (``\sigma_N^2``) and observation noise ``\sigma^2``. - -""" - -# ╔═╡ 922f0eb6-9e29-4b6c-9701-cb7b2f07bb7a -hide_solution( -md""" -```math -\begin{align*} - p(x_{N+1}|D) &= \int p(x_{N+1}|\theta) p(\theta|D)\mathrm{d}\theta \\ - &= \int \mathcal{N}(x_{N+1}|\theta,\sigma^2) \mathcal{N}(\theta|\mu_N,\sigma^2_N) \mathrm{d}\theta \\ - &\stackrel{1}{=} \int \mathcal{N}(\theta|x_{N+1},\sigma^2) \mathcal{N}(\theta|\mu_N,\sigma^2_N) \mathrm{d}\theta \\ - &\stackrel{2}{=} \int \mathcal{N}(x_{N+1}|\mu_N, \sigma^2_N +\sigma^2 ) \mathcal{N}(\theta|\cdot,\cdot)\mathrm{d}\theta \\ - &= \mathcal{N}(x_{N+1}|\mu_N, \sigma^2_N +\sigma^2 ) \underbrace{\int \mathcal{N}(\theta|\cdot,\cdot)\mathrm{d}\theta}_{=1} \\ - &=\mathcal{N}(x_{N+1}|\mu_N, \sigma^2_N +\sigma^2 ) -\end{align*} -``` - -To follow the above derivation of ``p(x_{N+1}|D)``, note that transition ``1`` relies on the identity -```math -\mathcal{N}(x|\mu,\Sigma) = \mathcal{N}(\mu|x,\Sigma) -``` -and transition ``2`` derives from using the multiplication rule for Gaussians. -""") - -# ╔═╡ 9bd38e28-73d4-4c6c-a1fe-35c7a0e750b3 -challenge_solution("Gaussian Density Estimation", header_level=1) - -# ╔═╡ b9ac2d3c-d294-11ef-0d37-65a65525ad28 -md""" - -Let's solve the challenge from the beginning of the lecture. We apply maximum likelihood estimation to fit a 2-dimensional Gaussian model (``m``) to data set ``D``. Next, we evaluate ``p(x_\bullet \in S | m)`` by (numerical) integration of the Gaussian pdf over ``S``: ``p(x_\bullet \in S | m) = \int_S p(x|m) \mathrm{d}x``. - -""" - -# ╔═╡ b9a85716-d294-11ef-10e0-a7b08b800a98 -md""" -## Maximum Likelihood Estimation (MLE) Revisited - -##### MLE as a special case of Bayesian Inference - -To determine the MLE of ``\mu`` as a special case of Bayesian inference, we let ``\sigma_0^2 \rightarrow \infty`` in the Bayesian posterior for ``\mu`` (Eq. B-2.141) to get a uniform prior for ``\mu``. This yields - -```math -\begin{align} - \mu_{\text{ML}} = \left.\mu_N\right\vert_{\sigma_0^2 \rightarrow \infty} = \frac{1}{N} \sum_{n=1}^N x_n -\end{align} -``` - - -""" - -# ╔═╡ 0d303dba-51d4-4413-8001-73ed98bf74df -hide_proof( -md""" -```math -\begin{align} - \mu_{\text{ML}} &= \left.\mu_N\right\vert_{\sigma_0^2 \rightarrow \infty} = \Bigg. \underbrace{\left(\frac{1}{\sigma_0^2} + \sum_n \frac{1}{\sigma^2}\right)^{-1}}_{\text{Eq. B-2.142}} \cdot \underbrace{\left( \frac{1}{\sigma_0^2} \mu_0 + \sum_n \frac{1}{\sigma^2} x_n \right)}_{\text{Eq. B-2.141 }} \Bigg\vert_{\sigma_0^2 \rightarrow \infty} \\ -&= \left(\sum_n \frac{1}{\sigma^2}\right)^{-1} \cdot \left( \sum_n \frac{1}{\sigma^2} x_n \right) \\ -&= \left(\frac{N}{\sigma^2}\right)^{-1} \cdot \left( \frac{1}{\sigma^2} \sum_n x_n \right) \\ -&= \frac{1}{N} \sum_{n=1}^N x_n -\end{align} -``` - """) - -# ╔═╡ 4a2cd378-0960-4089-81ad-87bf1be9a3b2 -md""" -This is a reassuring result: it matches the maximum likelihood estimate for ``\mu`` that we [previously derived by setting the gradient of the log-likelihood function to zero](#Maximum-Likelihood-Estimation). - -Of course, in practical applications, the maximum likelihood estimate is not obtained by first computing the full Bayesian posterior and then applying simplifications. This derivation (see proof) is included solely to illuminate the connection between Bayesian inference and maximum likelihood estimation. - -""" - -# ╔═╡ 50d90759-8e7f-4da5-a741-89b997eae40b -md""" -##### A prediction-correction decomposition - -Having an expression for the maximum likelihood estimate, it is now possible to rewrite the (Bayesian) posterior mean for ``\mu`` as the combination of a prior-based prediction and likelihood-based (data-based) correction. - -Prove that - -```math -\underbrace{\mu_N}_{\substack{\text{posterior} \\ \text{mean}}}= \overbrace{\underbrace{\mu_0}_{\substack{\text{prior} \\ \text{mean}}}}^{\substack{\text{prior-based} \\ \text{prediction}}} + \overbrace{\underbrace{\frac{N \sigma_0^2}{N \sigma_0^2 + \sigma^2}}_{\text{gain}}\cdot \underbrace{\left(\mu_{\text{ML}} - \mu_0 \right)}_{\text{prediction error}}}^{\text{data-based correction}}\tag{B-2.141} -``` - - -""" - -# ╔═╡ d05975bb-c5cc-470a-a6f3-60bc43c51e89 -hide_proof( -md""" -```math -\begin{align*} -\mu_N &= \sigma_N^2 \, \left( \frac{1}{\sigma_0^2} \mu_0 + \sum_n \frac{1}{\sigma^2} x_n \right) \tag{B-2.141 } \\ - &= \frac{\sigma_0^2 \sigma^2}{N\sigma_0^2 + \sigma^2} \, \left( \frac{1}{\sigma_0^2} \mu_0 + \sum_n \frac{1}{\sigma^2} x_n \right) \tag{used B-2.142}\\ - &= \frac{ \sigma^2}{N\sigma_0^2 + \sigma^2} \mu_0 + \frac{N \sigma_0^2}{N\sigma_0^2 + \sigma^2} \mu_{\text{ML}} \\ - &= \mu_0 + \frac{N \sigma_0^2}{N \sigma_0^2 + \sigma^2}\cdot \left(\mu_{\text{ML}} - \mu_0 \right) -\end{align*} -``` -""") - -# ╔═╡ e8e26e57-ae94-478a-8bb2-2868de5d99e0 -md""" - -Hence, the posterior mean always lies somewhere between the prior mean ``\mu_0`` and the maximum likelihood estimate (the "data" mean) ``\mu_{\text{ML}}``. - -""" - -# ╔═╡ cfa0d29a-ffd8-4e14-b3fd-03c824db395f -md""" -# Recursive Bayesian Inference -""" - -# ╔═╡ b9aa930a-d294-11ef-37ec-8d17be226c74 -md""" -## Kalman Filtering (simple case) - -##### Problem - -Consider a signal - -```math -x_t=\theta+\epsilon_t \, \text{, with } \epsilon_t \sim \mathcal{N}(0,\sigma^2)\,, -``` -where ``D_t= \left\{x_1,\ldots,x_t\right\}`` is observed *sequentially* (over time). Derive a **recursive** algorithm for -```math -p(\theta|D_t) \,, -``` -i.e., an update rule for (posterior) ``p(\theta|D_t)``, based on (prior) ``p(\theta|D_{t-1})`` and (a new observation) ``x_t``. - -""" - -# ╔═╡ b9aabe9a-d294-11ef-2489-e9fc0dbb760a -md""" -#### Model specification - -The data-generating distribution is given as -```math -p(x_t|\theta) = \mathcal{N}(x_t\,|\, \theta,\sigma^2)\,. -``` - -For a given new measurement ``x_t`` and given ``\sigma^2``, this equation can also be read as a likelihood function for $\theta$. - -We now need a prior for $\theta$. Let's define the estimate for $\theta$ after ``t`` observations (i.e., our *solution* ) as ``p(\theta|D_t) = \mathcal{N}(\theta\,|\,\mu_t,\sigma_t^2)``. The prior is then given by - -```math -p(\theta|D_{t-1}) = \mathcal{N}(\theta\,|\,\mu_{t-1},\sigma_{t-1}^2)\,. -``` - -""" - -# ╔═╡ b9aad50e-d294-11ef-23d2-8d2bb3b47574 -md""" -#### Inference - -Use Bayes rule, - -```math -\begin{align*} -p(\theta|D_t) &= p(\theta|x_t,D_{t-1}) \\ - &\propto p(x_t,\theta | D_{t-1}) \\ - &= p(x_t|\theta) \, p(\theta|D_{t-1}) \\ - &= \mathcal{N}(x_t|\theta,\sigma^2) \, \mathcal{N}(\theta\,|\,\mu_{t-1},\sigma_{t-1}^2) \\ - &= \mathcal{N}(\theta|x_t,\sigma^2) \, \mathcal{N}(\theta\,|\,\mu_{t-1},\sigma_{t-1}^2) \;\;\text{(note this trick)}\\ - &\propto \mathcal{N}(\theta|\mu_t,\sigma_t^2) \;\;\text{(use Gaussian multiplication formula)} -\end{align*} -``` - -with - -```math -\begin{align*} -K_t &= \frac{\sigma_{t-1}^2}{\sigma_{t-1}^2+\sigma^2} \qquad \text{(Kalman gain)}\\ -\mu_t &= \mu_{t-1} + K_t \cdot (x_t-\mu_{t-1})\\ -\sigma_t^2 &= \left( 1-K_t \right) \sigma_{t-1}^2 -\end{align*} -``` - -""" - -# ╔═╡ b9aaee4a-d294-11ef-2ed7-0dcb360d8bb7 -md""" -This online (recursive) estimator of the mean and variance of Gaussian observations is known as the **Kalman filter**. - -In this simplified case, the process mean (``\theta``) is assumed to remain constant. In the general Kalman filter, however, the mean may evolve over time; see the [Dynamic Models lecture](https://bmlip.github.io/course/lectures/Dynamic%20Models.html) for details. - - - -""" - -# ╔═╡ b9aafc6e-d294-11ef-1b1a-df718c1f1a58 -md""" -Note that the so-called Kalman gain ``K_t`` serves as a "learning rate" (step size) in the update equation for the posterior mean ``\mu_t``. - -""" - -# ╔═╡ e2fc4945-4f88-4520-b56c-c7208b62c29d -keyconcept("", md"Bayesian inference does not require manual tuning of a learning rate; instead, it adapts its own effective learning rate via balancing prior beliefs with incoming evidence.") - - -# ╔═╡ b9ab0b46-d294-11ef-13c5-8314655f7867 -md""" -Note that the uncertainty about ``\theta`` decreases over time (since ``0<(1-K_t)<1``). If we assume that the statistics of the system do not change (stationarity), each new sample provides new information about the process, so the uncertainty decreases. - -""" - -# ╔═╡ b9ab1dd4-d294-11ef-2e86-31c4a4389475 -md""" -Recursive Bayesian estimation as discussed here is the basis for **adaptive signal processing** algorithms such as the [Least Mean Squares](https://en.wikipedia.org/wiki/Least_mean_squares_filter) (LMS) filter and the [Recursive Least Squares](https://en.wikipedia.org/wiki/Recursive_least_squares_filter) (RLS) filter. Both RLS and LMS are special cases of Recursive Bayesian estimation. - -""" - -# ╔═╡ b9ab2e32-d294-11ef-2ccc-9760ead59972 -md""" -$(code_example("Kalman Filtering")) - -Let's implement the Kalman filter described above. We'll use it to recursively estimate the value of ``\theta`` based on noisy observations. - -""" - -# ╔═╡ 3a53f67c-f291-4530-a2ba-f95a97b27960 -@bindname N_data_kalman Slider(1:100; default=100, show_value=true) - -# ╔═╡ b9ab9e28-d294-11ef-3a73-1f5cefdab3d8 -md""" -The shaded area represents 2 standard deviations of posterior ``p(\theta|D)``. The variance of the posterior is guaranteed to decrease monotonically for the standard Kalman filter. - -""" - -# ╔═╡ ffa570a9-ceda-4a21-80a7-a193de12fa2c -md""" -### Implementation -Here is the implementation, but feel free to skip this part. -""" - -# ╔═╡ 85b15f0a-650f-44be-97ab-55d52cb817ed -begin - n = N_data_kalman # number of observations - θ = 2.0 # true value of the parameter we would like to estimate - noise_σ2 = 0.3 # variance of observation noise - observations = noise_σ2 * randn(MersenneTwister(1), n) .+ θ -end; - -# ╔═╡ 115eabf2-c476-40f8-8d7b-868a7359c1b6 -function perform_kalman_step(prior :: Normal, x :: Float64, noise_σ2 :: Float64) - K = prior.σ / (noise_σ2 + prior.σ) # compute the Kalman gain - posterior_μ = prior.μ + K*(x - prior.μ) # update the posterior mean - posterior_σ = prior.σ * (1.0 - K) # update the posterior standard deviation - return Normal(posterior_μ, posterior_σ) # return the posterior -end; - -# ╔═╡ 61764e4a-e5ef-4744-8c71-598b2155f4d9 -begin - post_μ = fill!(Vector{Float64}(undef,n + 1), NaN) # means of p(θ|D) over time - post_σ2 = fill!(Vector{Float64}(undef,n + 1), NaN) # variances of p(θ|D) over time - - # specify the prior distribution (you can play with the parameterization of this to get a feeling of how the Kalman filter converges) - prior = Normal(0, 1) - - # save prior mean and variance to show these in plot - post_μ[1] = prior.μ - post_σ2[1] = prior.σ - - - # note that this loop demonstrates Bayesian learning on streaming data; we update the prior distribution using observation(s), after which this posterior becomes the new prior for future observations - for (i, x) in enumerate(observations) - # compute the posterior distribution given the observation - posterior = perform_kalman_step(prior, x, noise_σ2) - # save the mean of the posterior distribution - post_μ[i + 1] = posterior.μ - # save the variance of the posterior distribution - post_σ2[i + 1] = posterior.σ - # the posterior becomes the prior for future observations - prior = posterior - end -end - -# ╔═╡ 661082eb-f0c9-49a9-b046-8705f4342b37 -let - obs_scale = collect(2:n+1) - # scatter the observations - scatter(obs_scale, observations, label=L"D", ) - post_scale = collect(1:n+1) - # lineplot our estimated means of intermediate posterior distributions - plot!(post_scale, post_μ, ribbon=sqrt.(post_σ2), linewidth=3, label=L"p(θ | D_t)") - # plot the true value of θ - plot!(post_scale, θ*ones(n + 1), linewidth=2, label=L"θ") -end - -# ╔═╡ b9ac7486-d294-11ef-13e5-29b7ffb440bc -md""" -# Summary - -A **linear transformation** ``z=Ax+b`` of a Gaussian variable ``x \sim \mathcal{N}(\mu_x,\Sigma_x)`` is Gaussian distributed as - -```math -p(z) = \mathcal{N} \left(z \,|\, A\mu_x+b, A\Sigma_x A^T \right) -``` - -Bayesian inference with a Gaussian prior and Gaussian likelihood leads to an analytically computable Gaussian posterior, because of the **multiplication rule for Gaussians**: - -```math -\begin{equation*} -\mathcal{N}(x|\mu_a,\Sigma_a) \cdot \mathcal{N}(x|\mu_b,\Sigma_b) = \underbrace{\mathcal{N}(\mu_a|\, \mu_b, \Sigma_a + \Sigma_b)}_{\text{normalization constant}} \cdot \mathcal{N}(x|\mu_c,\Sigma_c) -\end{equation*} -``` - -where - -```math -\begin{align*} -\Sigma_c^{-1} &= \Sigma_a^{-1} + \Sigma_b^{-1} \\ -\Sigma_c^{-1} \mu_c &= \Sigma_a^{-1}\mu_a + \Sigma_b^{-1}\mu_b -\end{align*} -``` - -**Conditioning and marginalization** of a multivariate Gaussian distribution yields Gaussian distributions. In particular, the joint distribution - -```math -\mathcal{N} \left( \begin{bmatrix} x \\ y \end{bmatrix} \left| \begin{bmatrix} \mu_x \\ \mu_y \end{bmatrix}, - \begin{bmatrix} \Sigma_x & \Sigma_{xy} \\ \Sigma_{yx} & \Sigma_y \end{bmatrix} \right. \right) -``` - -can be decomposed as - -```math -\begin{align*} - p(y|x) &= \mathcal{N}\left(y\,|\,\mu_y + \Sigma_{yx}\Sigma_x^{-1}(x-\mu_x),\, \Sigma_y - \Sigma_{yx}\Sigma_x^{-1}\Sigma_{xy} \right) \\ -p(x) &= \mathcal{N}\left( x|\mu_x, \Sigma_x \right) -\end{align*} -``` - -Here's a nice [summary of Gaussian calculations](https://github.com/bertdv/AIP-5SSB0/raw/master/lessons/notebooks/files/RoweisS-gaussian_formulas.pdf) by Sam Roweis. - -""" - -# ╔═╡ b89360b8-39fa-46e9-96c8-7eece50fcb90 -md""" -# Summary -""" - -# ╔═╡ a439c0a7-afa1-4d9a-8737-58d341744016 -keyconceptsummary() - -# ╔═╡ 79a99a22-3bb5-431b-bf84-5dce5cccfe25 -exercises(header_level=1) - -# ╔═╡ 14b3edcc-0d16-4055-9b1c-7f324514a0a9 -md""" -#### Gaussian Message Passing (**) - -This exercise is a continuation of the [exercise on message passing for an addition node](https://bmlip.github.io/course/lectures/Factor%20Graphs.html#Messages-for-the-Addition-Node-(*)). -""" - -# ╔═╡ dd7786e2-d6ac-4dba-abca-3686242c067d -TwoColumn( -md""" -Consider an addition node - -```math -f_+(x,y,z) = \delta(z-x-y) -``` -Assume that both incoming messages are Gaussian, namely ``\overrightarrow{\mu}_{X}(x) \sim \mathcal{N}(\overrightarrow{m}_X,\overrightarrow{V}_X)`` and ``\overrightarrow{\mu}_{Y}(y) \sim \mathcal{N}(\overrightarrow{m}_Y,\overrightarrow{V}_Y)``. - -""", - -@htl """ - - - -""") - -# ╔═╡ b7a810a3-dc38-4e72-ab10-2ad2f064bdbb -md""" - -- (a) Evaluate the outgoing message ``\overrightarrow{\mu}_{Z}(z)``. - -- (b) For the same summation node, work out the SP update rule for the backward message ``\overleftarrow{\mu}_{X}(x)`` as a function of ``\overrightarrow{\mu}_{Y}(y)`` and ``\overleftarrow{\mu}_{Z}(z)``. And further refine the answer for Gaussian messages. - - -""" - -# ╔═╡ f711b053-dccf-4bf1-b285-e8da94a48b68 -hide_solution( -md""" - -- (a) Evaluate the outgoing message ``\overrightarrow{\mu}_{Z}(z)``. - -In the [exercise on message passing for an addition node](https://bmlip.github.io/course/lectures/Factor%20Graphs.html#Messages-for-the-Addition-Node-(*)), we found that the outgoing message is given by - -```math -\begin{align*} - \overrightarrow{\mu}_{Z}(z) &= \iint \overrightarrow{\mu}_{X}(x) \overrightarrow{\mu}_{Y}(y) \,\delta(z-x-y) \,\mathrm{d}x \mathrm{d}y \\ - &= \int \overrightarrow{\mu}_{X}(x) \overrightarrow{\mu}_{Y}(z-x) \,\mathrm{d}x \,, - \end{align*} -``` - - -For Gaussian incoming messages, these update rules evaluate to ``\overrightarrow{\mu}_{Z}(z) \sim \mathcal{N}(\overrightarrow{m}_Z,\overrightarrow{V}_Z)`` with - - -```math -\begin{align*} - \overrightarrow{m}_Z &= \overrightarrow{m}_X + \overrightarrow{m}_Y \\ - \overrightarrow{V}_z &= \overrightarrow{V}_X + \overrightarrow{V}_Y \,. -\end{align*} -``` - -- (b) For the same summation node, work out the SP update rule for the backward message ``\overleftarrow{\mu}_{X}(x)`` as a function of ``\overrightarrow{\mu}_{Y}(y)`` and ``\overleftarrow{\mu}_{Z}(z)``. And further refine the answer for Gaussian messages. - -```math -\begin{align*} - \overleftarrow{\mu}_{X}(x) &= \iint \overrightarrow{\mu}_{Y}(y) \overleftarrow{\mu}_{Z}(z) \,\delta(z-x-y) \,\mathrm{d}y \mathrm{d}z \\ - &= \int \overrightarrow{\mu}_{Y}(z-x) \overleftarrow{\mu}_{Z}(z) \,\mathrm{d}z - \end{align*} -``` - -and now further with Gaussian messages, - - -```math -\begin{align*} - \overleftarrow{\mu}_{X}(x) &= \int \mathcal{N}(z-x | m_y,V_y) \mathcal{N}(z | m_z,V_z)\,\mathrm{d}z \\ - &= \int \mathcal{N}(z | x+ m_y,V_y) \mathcal{N}(z | m_z,V_z)\,\mathrm{d}z \\ - &= \int \mathcal{N}(x+m_y | m_z,V_y+V_z) \mathcal{N}(z | \cdot,\cdot)\,\mathrm{d}z \\ - &= \mathcal{N}(x | m_z-m_y, V_y+V_z) -\end{align*} -``` - - -""") - -# ╔═╡ 22539cfe-3694-4100-8120-ca6ac1e66b31 -md""" -#### Estimation of a Constant (**) - -We make ``N`` IID observations ``D=\{x_1 \dots x_N\}`` and assume the following model - -```math -\begin{align} -x_k &= A + \epsilon_k \\ -A &\sim \mathcal{N}(m_A,v_A) \\ -\epsilon_k &\sim \mathcal{N}(0,\sigma^2) \,. -\end{align} -``` - -We assume that ``\sigma`` has a known value and are interested in deriving an estimator for ``A``. - -- (a) Derive the Bayesian (posterior) estimate ``p(A|D)``. - -- (b) Derive the Maximum Likelihood estimate for ``A``. - -- (c) Derive the MAP estimates for ``A``. - -- (d) Now assume that we do not know the variance of the noise term? Describe the procedure for Bayesian estimation of both ``A`` and ``\sigma^2`` (No need to fully work out to closed-form estimates). - -""" - -# ╔═╡ fa197526-6706-47ce-b84b-5675eee00610 -hide_solution( -md""" -- (a) Derive the Bayesian (posterior) estimate ``p(A|D)``. - -Since ``p(D|A) = \prod_k \mathcal{N}(x_k|A,\sigma^2)`` is a Gaussian likelihood and ``p(A)`` is a Gaussian prior, their multiplication is proportional to a Gaussian. We will work this out with the canonical parameterization of the Gaussian since it is easier to multiply Gaussians in that domain. This means the posterior ``p(A|D)`` is - - -```math -\begin{align*} - p(A|D) &\propto p(A) p(D|A) \\ - &= \mathcal{N}(A|m_A,v_A) \prod_{k=1}^N \mathcal{N}(x_k|A,\sigma^2) \\ - &= \mathcal{N}(A|m_A,v_A) \prod_{k=1}^N \mathcal{N}(A|x_k,\sigma^2) \\ - &= \mathcal{N}_c\big(A \Bigm|\frac{m_A}{v_A},\frac{1}{v_A}\big)\prod_{k=1}^N \mathcal{N}_c\big(A\Bigm| \frac{x_k}{\sigma^2},\frac{1}{\sigma^2}\big) \\ - &\propto \mathcal{N}_c\big(A \Bigm| \frac{m_A}{v_A} + \frac{1}{\sigma^2} \sum_k x_k , \frac{1}{v_A} + \frac{N}{\sigma^2} \big) \,, - \end{align*} -``` - -where we have made use of the fact that precision-weighted means and precisions add when multiplying Gaussians. In principle, this description of the posterior completes the answer. - -- (b) Derive the Maximum Likelihood estimate for ``A``. - -The ML estimate can be found by - - -```math -\begin{align*} - \nabla \log p(D|A) &=0\\ - \nabla \sum_k \log \mathcal{N}(x_k|A,\sigma^2) &= 0 \\ - \nabla \frac{-1}{2}\sum_k \frac{(x_k-A)^2}{\sigma^2} &=0\\ - \sum_k(x_k-A) &= 0 \\ - \Rightarrow \hat{A}_{ML} = \frac{1}{N}\sum_{k=1}^N x_k -\end{align*} -``` - -- (c) Derive the MAP estimates for ``A``. - -The MAP is simply the location where the posterior has its maximum value, which for a Gaussian posterior is its mean value. We computed in (a) the precision-weighted mean, so we need to divide by precision (or multiply by variance) to get the location of the mean: - - -```math -\begin{align*} -\hat{A}_{MAP} &= \left( \frac{m_A}{v_A} + \frac{1}{\sigma^2} \sum_k x_k\right)\cdot \left( \frac{1}{v_A} + \frac{N}{\sigma^2} \right)^{-1} \\ -&= \frac{v_A \sum_k x_k + \sigma^2 m_A}{N v_A + \sigma^2} -\end{align*} -``` - -- (d) Now assume that we do not know the variance of the noise term? Describe the procedure for Bayesian estimation of both ``A`` and ``\sigma^2`` (No need to fully work out to closed-form estimates). - -A Bayesian treatment requires putting a prior on the unknown variance. The variance is constrained to be positive; hence the support of the prior distribution needs to be on the positive reals. (In a multivariate case, positivity needs to be extended to symmetric positive definiteness.) Choosing a conjugate prior will simplify matters greatly. In this scenerio, the inverse Gamma distribution is the conjugate prior for the unknown variance. In the literature, this model is called a Normal-Gamma distribution. See [Murphy (2007)](https://www.seas.harvard.edu/courses/cs281/papers/murphy-2007.pdf) for the analytical treatment. -""") - -# ╔═╡ 645308ac-c9e3-4d6f-bcff-82327fbb8edf -md""" -#### Conversion to Joint Distribution (**) - -Show that the system - -```math -\begin{align*} -p(x\,|\,\theta) &= \mathcal{N}(x\,|\,\theta,\sigma^2) \\ -p(\theta) &= \mathcal{N}(\theta\,|\,\mu_0,\sigma_0^2) -\end{align*} -``` - -can be written as - -```math -p(z) = p\left(\begin{bmatrix} x \\ \theta \end{bmatrix}\right) = \mathcal{N} \left( \begin{bmatrix} x\\ - \theta \end{bmatrix} - \,\left|\, \begin{bmatrix} \mu_0\\ - \mu_0\end{bmatrix}, - \begin{bmatrix} \sigma_0^2+\sigma^2 & \sigma_0^2\\ - \sigma_0^2 &\sigma_0^2 - \end{bmatrix} - \right. \right) -``` - -""" - -# ╔═╡ 03c399e1-d0d8-493a-9f95-4209918d132a -hide_solution( -md""" -Let's first compute the moments for the marginals ``p(x)`` and ``p(\theta)``: - - -```math -\begin{align*} -p(x) &= \int p(x|\theta) p(\theta) \mathrm{d}\theta \\ - &= \int \mathcal{N}(x|\theta,\sigma^2) \mathcal{N}(\theta|\mu_0,\sigma_0^2) \mathrm{d}\theta \\ - &= \int \mathcal{N}(\theta|x,\sigma^2) \mathcal{N}(\theta|\mu_0,\sigma_0^2) \mathrm{d}\theta \\ - &= \mathcal{N}(x|\mu_0,\sigma^2+\sigma_0^2) \underbrace{\int \mathcal{N}(\theta| \cdot,\cdot) \mathrm{d}\theta}_{=1} \\ - &= \mathcal{N}(x|\mu_0,\sigma^2+\sigma_0^2) -\end{align*} -``` - -and for ``p(\theta)``: - - -```math -\begin{align*} -p(\theta) &= \int p(x|\theta) p(\theta) \mathrm{d}x \\ - &= \mathcal{N}(\theta|\mu_0,\sigma_0^2) \underbrace{\int \mathcal{N}(x|\theta,\sigma^2) \mathrm{d}x}_{=1} \\ - &= \mathcal{N}(\theta|\mu_0,\sigma_0^2) -\end{align*} -``` - -With this information, we have - - -```math -p(z) = p\left(\begin{bmatrix} x \\ \theta \end{bmatrix}\right) = \mathcal{N} \left( \begin{bmatrix} x\\ - \theta \end{bmatrix} - \,\left|\, \begin{bmatrix} \mu_0\\ - \mu_0\end{bmatrix}, - \begin{bmatrix} \sigma_0^2+\sigma^2 & \cdot \\ - \cdot &\sigma_0^2 - \end{bmatrix} - \right. \right) -``` - -So, we only need to compute ``\Sigma_{x\theta} = \Sigma_{\theta x}^T``. It helps here to write the system as - - -```math -\begin{align*} -x &= \theta + \epsilon \\ -\theta &\sim \mathcal{N}(\mu_0,\sigma_0^2) \\ -\epsilon &\sim \mathcal{N}(0,\sigma^2) -\end{align*} -``` - -Now we work out ``\Sigma_{x\theta}``: - - -```math -\begin{align*} -\Sigma_{x\theta} &= E[(x-E[x])(\theta-E[\theta])^T] \\ -&= E[(x-\mu_0)(\theta-\mu_0)^T] \\ -&= E[x\theta^T] - \mu_0 E[\theta^T] - E[x]\mu_0^T + \mu_0 \mu_0^T \\ -&= E[x\theta^T] - \mu_0 \mu_0^T \\ -&= E[(\theta + \epsilon)\theta^T] - \mu_0 \mu_0^T \\ -&= E[\theta \theta^T] + \underbrace{E[\epsilon]}_{=0} E[\theta^T] - \mu_0 \mu_0^T \\ -&= Var[\theta] + E[\theta] E[\theta]^T - \mu_0 \mu_0^T \\ -&= \sigma_0^2 + \mu_0 \mu_0^T - \mu_0 \mu_0^T \\ -&= \sigma_0^2 -\end{align*} -``` -( I am sure one of you can do it simpler and faster. Let me know:) - - -""") - -# ╔═╡ 6dfc31a0-d0d7-4901-a876-890df9ab4258 -md""" -# Optional Slides -""" - -# ╔═╡ b9acd5d4-d294-11ef-1ae5-ed4e13d238ef -md""" -## $(HTML("Inference for the Precision Parameter of the Gaussian")) - - - -""" - - - -# ╔═╡ b9acf7a8-d294-11ef-13d9-81758355cb1e -md""" - -#### Problem - - - -Consider again a Gaussian data-generating (measurement) model - -```math -\mathcal{N}\left(x_n \,|\, \mu, \lambda^{-1} \right) \,. -``` - -(We express here the variance as the inverse of a precision parameter ``\lambda``, rather than using ``\sigma^2``, since this simplifies the subsequent Bayesian computations.) - -Earlier in this lecture, we discussed Bayesian inference from a data set for the mean ``\mu``, when the variance ``\lambda^{-1}`` was given. - -We now derive the posterior distribution over the precision parameter ``\lambda``, assuming that the mean ``\mu`` is known. We omit the more general case in which both ``\mu`` and ``\lambda`` are treated as unknowns, since the resulting calculations are considerably more involved (but still result in a closed-form solution). - - -""" - -# ╔═╡ b9ad0842-d294-11ef-2035-31bceab4ace1 -md""" -#### model specification - -The likelihood for the precision parameter is - -```math -\begin{align*} -p(D|\lambda) &= \prod_{n=1}^N \mathcal{N}\left(x_n \,|\, \mu, \lambda^{-1} \right) \\ - &\propto \lambda^{N/2} \exp\left\{ -\frac{\lambda}{2}\sum_{n=1}^N \left(x_n - \mu \right)^2\right\} \tag{B-2.145} -\end{align*} -``` - -""" - -# ╔═╡ b9ad1b70-d294-11ef-3931-d1dcd2343ac9 -md""" -The conjugate distribution for this function of ``\lambda`` is the [*Gamma* distribution](https://en.wikipedia.org/wiki/Gamma_distribution), given by - -```math -p(\lambda\,|\,a,b) = \mathrm{Gam}\left( \lambda\,|\,a,b \right) \triangleq \frac{1}{\Gamma(a)} b^{a} \lambda^{a-1} \exp\left\{ -b \lambda\right\}\,, \tag{B-2.146} -``` - -where ``a>0`` and ``b>0`` are known as the *shape* and *rate* parameters, respectively. - -![](https://github.com/bmlip/course/blob/v2/assets/figures/B-fig-2.13.png?raw=true) - -(Bishop fig.2.13). Plots of the Gamma distribution ``\mathrm{Gam}\left( \lambda\,|\,a,b \right)`` for different values of ``a`` and ``b``. - -""" - -# ╔═╡ b9ad299e-d294-11ef-36d7-2f73d3cd1fa7 -md""" -The mean and variance of the Gamma distribution evaluate to ``\mathrm{E}\left( \lambda\right) = \frac{a}{b}`` and ``\mathrm{var}\left[\lambda\right] = \frac{a}{b^2}``. - -For this example, we consider a prior -```math -p(\lambda) = \mathrm{Gam}\left( \lambda\,|\,a_0, b_0\right) \,. -``` - -""" - -# ╔═╡ b9ad5100-d294-11ef-0e8b-3f67ddb2d86d -md""" -#### inference - -The posterior is given by Bayes rule, - -```math -\begin{align*} -p(\lambda\,|\,D) &\propto \underbrace{\lambda^{N/2} \exp\left\{ -\frac{\lambda}{2}\sum_{n=1}^N \left(x_n - \mu \right)^2\right\} }_{\text{likelihood}} \cdot \underbrace{\frac{1}{\Gamma(a_0)} b_0^{a_0} \lambda^{a_0-1} \exp\left\{ -b_0 \lambda\right\}}_{\text{prior}} \\ - &\propto \mathrm{Gam}\left( \lambda\,|\,a_N,b_N \right) -\end{align*} -``` - -with - -```math -\begin{align*} -a_N &= a_0 + \frac{N}{2} \qquad &&\text{(B-2.150)} \\ -b_N &= b_0 + \frac{1}{2}\sum_n \left( x_n-\mu\right)^2 \qquad &&\text{(B-2.151)} -\end{align*} -``` - -""" - -# ╔═╡ b9ad6238-d294-11ef-3fed-bbcc7d7443ee -md""" -Hence the **posterior is again a Gamma distribution**. By inspection of B-2.150 and B-2.151, we deduce that we can interpret ``2a_0`` as the number of a priori (pseudo-)observations. - -""" - -# ╔═╡ b9ad71a6-d294-11ef-185f-f1f6e6ac4464 -md""" -Since the most uninformative prior is given by ``a_0=b_0 \rightarrow 0``, we can derive the **maximum likelihood estimate** for the precision as - -```math -\lambda_{\text{ML}} = \left.\mathrm{E}\left[ \lambda\right]\right\vert_{a_0=b_0\rightarrow 0} = \left. \frac{a_N}{b_N}\right\vert_{a_0=b_0\rightarrow 0} = \frac{N}{\sum_{n=1}^N \left(x_n-\mu \right)^2} -``` - -""" - -# ╔═╡ b9ad85a4-d294-11ef-2af2-953ac0ab8927 -md""" -In short, if we do density estimation with a Gaussian distribution ``\mathcal{N}\left(x_n\,|\,\mu,\sigma^2 \right)`` for an observed data set ``D = \{x_1, x_2, \ldots, x_N\}``, the $(HTML("maximum likelihood estimates")) for ``\mu`` and ``\sigma^2`` are given by - -```math -\begin{align*} -\mu_{\text{ML}} &= \frac{1}{N} \sum_{n=1}^N x_n \qquad &&\text{(B-2.121)} \\ -\sigma^2_{\text{ML}} &= \frac{1}{N} \sum_{n=1}^N \left(x_n - \mu_{\text{ML}} \right)^2 \qquad &&\text{(B-2.122)} -\end{align*} -``` - -These estimates are also known as the *sample mean* and *sample variance* respectively. - -""" - -# ╔═╡ b9abadce-d294-11ef-14a6-9131c5b1b802 -md""" -## $(HTML("Product of Normally Distributed Variables")) - -(We've seen that) the sum of two Gausssian-distributed variables is also Gaussian distributed. - -Has the *product* of two Gaussian distributed variables also a Gaussian distribution? - -**No**! In general, this is a difficult computation. As an example, let's compute ``p(z)`` for ``Z=XY`` for the special case that ``X\sim \mathcal{N}(0,1)`` and ``Y\sim \mathcal{N}(0,1)``. - -```math -\begin{align*} -p(z) &= \int_{X,Y} p(z|x,y)\,p(x,y)\,\mathrm{d}x\mathrm{d}y \\ - &= \frac{1}{2 \pi}\int \delta(z-xy) \, e^{-(x^2+y^2)/2} \, \mathrm{d}x\mathrm{d}y \\ - &= \frac{1}{\pi} \int_0^\infty \frac{1}{x} e^{-(x^2+z^2/x^2)/2} \, \mathrm{d}x \\ - &= \frac{1}{\pi} \mathrm{K}_0( \lvert z\rvert )\,. -\end{align*} -``` - -where ``\mathrm{K}_n(z)`` is a [modified Bessel function of the second kind](http://mathworld.wolfram.com/ModifiedBesselFunctionoftheSecondKind.html). - -""" - -# ╔═╡ b9abdc7e-d294-11ef-394a-a708c96c86fc -md""" -$(code_example("Product of Gaussian Distributions")) - - -We plot ``p(Z=XY)`` and ``p(X)p(Y)`` for ``X\sim\mathcal{N}(0,1)`` and ``Y \sim \mathcal{N}(0,1)`` to give an idea of how these distributions differ. - -""" - - -# ╔═╡ b9abf984-d294-11ef-1eaa-3358379f8b44 -let - X = Normal(0, 1) - Y = Normal(0, 1) - pdf_product_std_normals(z::Real) = besselk(0, abs(z))/π - - range1 = range(-4,stop=4,length=100) - plot(range1, t -> pdf(X, t); label=L"p(X)=p(Y)=\mathcal{N}(0,1)", fill=(0, 0.1)) - plot!(range1, t -> pdf(X,t)*pdf(Y,t); label=L"p(X)*p(Y)", fill=(0, 0.1)) - plot!(range1, pdf_product_std_normals; label=L"p(Z=X*Y)", fill=(0, 0.1)) -end - -# ╔═╡ b9ac09c4-d294-11ef-2cb8-270289d01f25 -md""" -In short, Gaussian-distributed variables remain Gaussian in linear systems, but this is not the case in non-linear systems. - -""" - -# ╔═╡ f78bc1f5-cf7b-493f-9c5c-c2fbd6788616 -md""" -# Code -""" - -# ╔═╡ 026da6b9-dee1-485e-af00-3b9e35f71b6b -md""" -#### Introduction -""" - -# ╔═╡ 6ffabd68-4c38-4024-a21b-1d6fa7c3a6d7 -d(x; kwargs...) = PlutoUI.ExperimentalLayout.Div([x]; kwargs...) - -# ╔═╡ 7a8e77b8-1692-41b7-88ef-26560aad5f08 -begin - intro_bonds = PlutoUI.ExperimentalLayout.Div([ - d(@bindname(N, Slider(3:100; default=90, show_value=true)); style="flex: 1 0 max-content"), - d(@bind(redraw_button_clicked_count, CounterButton("Redraw x.")); style="flex: 1 1 50%") -]; - style="display: flex; flex-drection: row; flex-wrap: wrap; - ") -end - -# ╔═╡ 9fc14c8b-98bc-4fe9-9b58-6c5774ac5f64 -intro_bonds - -# ╔═╡ ce16666b-aa90-42ae-b3a7-690e71301024 -# macro StableRandom(x=nothing) -# :(MersenneTwister($(hash(__source__)) + hash($(esc(x))))) -# end - -# ╔═╡ 724cac08-a54d-4dea-8416-0bce33c75405 -stable_rand(args...; seed=nothing) = rand(MersenneTwister(543432 + hash(seed)), args...) - -# ╔═╡ 92efa7c1-dde6-4b21-bf3b-0fa91931620c -secret_generative_dist = MvNormal([0,1.], [0.8 0.5; 0.5 1.0]); - -# ╔═╡ 46465948-90e1-480f-b656-74bf542756ef -D = stable_rand(secret_generative_dist, N) - -# ╔═╡ c48bd024-4afb-4e5e-af2d-56b2466511c7 -x_dot = stable_rand(secret_generative_dist; seed=redraw_button_clicked_count) - -# ╔═╡ 3d0f7af2-082d-4305-a271-349d41fcd166 -md""" -#### Challenge solution -""" - -# ╔═╡ eaf6794e-66a1-45f0-95ff-7d13983aafa2 -baseplot() = plot(; xlim=(-3,3), ylim=(-2,3)) - -# ╔═╡ ba57ecbb-b64e-4dd8-8398-a90af1ac71f3 -let - baseplot() - scatter!(D[1,:], D[2,:], marker=:x, markerstrokewidth=3, label=L"D") - scatter!([x_dot[1]], [x_dot[2]], label=L"x_\bullet") - plot!(S[1], fill(S[2][1], 2), fillrange=S[2][2], alpha=0.4, color=:gray,label=L"S") -end - -# ╔═╡ b9ac5190-d294-11ef-0a99-a9d369b34045 -let - baseplot() - - # Maximum likelihood estimation of 2D Gaussian - μ = 1/N * sum(D,dims=2)[:,1] - D_min_μ = D - repeat(μ, 1, N) - Σ = Hermitian(1/N * D_min_μ*D_min_μ') - global m = MvNormal(μ, convert(Matrix, Σ)); - - contour!(range(-3, 4, length=100), range(-3, 4, length=100), (x, y) -> pdf(m, [x, y])) - scatter!(D[1,:], D[2,:]; marker=:x, markerstrokewidth=3, label=L"D") - scatter!([x_dot[1]], [x_dot[2]]; label=L"x_\bullet") - plot!(range(0, 2), [1., 1., 1.]; fillrange=2, alpha=0.4, color=:gray, label=L"S") -end - -# ╔═╡ dbf97d8d-62f2-4996-a6aa-5ae4601d456b -let - # We can use HCubature.jl to numerically evaluate the integral and get a good approximation. - - (val,err) = hcubature( - (x)->pdf(m,x), # function to integrate - first.(S), last.(S), # start and end coordinates - ) - - @mdx "Answer: ``p(x_⋅ ∈ S | m) ≈ $(round(val; digits=4))``" -end - -# ╔═╡ bc7a875f-e4fa-43fd-b001-cec6aadea3bc -md""" -#### Packages -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000001 -PLUTO_PROJECT_TOML_CONTENTS = """ -[deps] -BmlipTeachingTools = "656a7065-6f73-6c65-7465-6e646e617262" -Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" -HCubature = "19dc6840-f33b-545b-b366-655c7e3ffd49" -LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -MarkdownLiteral = "736d6165-7244-6769-4267-6b50796e6954" -Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" - -[compat] -BmlipTeachingTools = "~1.3.1" -Distributions = "~0.25.122" -HCubature = "~1.7.0" -LaTeXStrings = "~1.4.0" -MarkdownLiteral = "~0.1.2" -Plots = "~1.40.17" -SpecialFunctions = "~2.6.1" -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000002 -PLUTO_MANIFEST_TOML_CONTENTS = """ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.12.1" -manifest_format = "2.0" -project_hash = "94302a71d22ef6fb75344b8281a09b73c9d325dc" - -[[deps.AbstractPlutoDingetjes]] -deps = ["Pkg"] -git-tree-sha1 = "6e1d2a35f2f90a4bc7c2ed98079b2ba09c35b83a" -uuid = "6e696c72-6542-2067-7265-42206c756150" -version = "1.3.2" - -[[deps.AliasTables]] -deps = ["PtrArrays", "Random"] -git-tree-sha1 = "9876e1e164b144ca45e9e3198d0b689cadfed9ff" -uuid = "66dad0bd-aa9a-41b7-9441-69ab47430ed8" -version = "1.1.3" - -[[deps.ArgTools]] -uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.2" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -version = "1.11.0" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -version = "1.11.0" - -[[deps.BitFlags]] -git-tree-sha1 = "0691e34b3bb8be9307330f88d1a3c3f25466c24d" -uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" -version = "0.1.9" - -[[deps.BmlipTeachingTools]] -deps = ["HypertextLiteral", "InteractiveUtils", "Markdown", "PlutoTeachingTools", "PlutoUI", "Reexport"] -git-tree-sha1 = "806eadb642467b05f9d930f0d127f1e6fa5130f0" -uuid = "656a7065-6f73-6c65-7465-6e646e617262" -version = "1.3.1" - -[[deps.Bzip2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1b96ea4a01afe0ea4090c5c8039690672dd13f2e" -uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" -version = "1.0.9+0" - -[[deps.Cairo_jll]] -deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "fde3bf89aead2e723284a8ff9cdf5b551ed700e8" -uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" -version = "1.18.5+0" - -[[deps.CodecZlib]] -deps = ["TranscodingStreams", "Zlib_jll"] -git-tree-sha1 = "962834c22b66e32aa10f7611c08c8ca4e20749a9" -uuid = "944b1d66-785c-5afd-91f1-9de20f533193" -version = "0.7.8" - -[[deps.ColorSchemes]] -deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"] -git-tree-sha1 = "b0fd3f56fa442f81e0a47815c92245acfaaa4e34" -uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" -version = "3.31.0" - -[[deps.ColorTypes]] -deps = ["FixedPointNumbers", "Random"] -git-tree-sha1 = "67e11ee83a43eb71ddc950302c53bf33f0690dfe" -uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -version = "0.12.1" -weakdeps = ["StyledStrings"] - - [deps.ColorTypes.extensions] - StyledStringsExt = "StyledStrings" - -[[deps.ColorVectorSpace]] -deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "Requires", "Statistics", "TensorCore"] -git-tree-sha1 = "8b3b6f87ce8f65a2b4f857528fd8d70086cd72b1" -uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" -version = "0.11.0" -weakdeps = ["SpecialFunctions"] - - [deps.ColorVectorSpace.extensions] - SpecialFunctionsExt = "SpecialFunctions" - -[[deps.Colors]] -deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] -git-tree-sha1 = "37ea44092930b1811e666c3bc38065d7d87fcc74" -uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" -version = "0.13.1" - -[[deps.Combinatorics]] -git-tree-sha1 = "8010b6bb3388abe68d95743dcbea77650bb2eddf" -uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" -version = "1.0.3" - -[[deps.CommonMark]] -deps = ["PrecompileTools"] -git-tree-sha1 = "351d6f4eaf273b753001b2de4dffb8279b100769" -uuid = "a80b9123-70ca-4bc0-993e-6e3bcb318db6" -version = "0.9.1" - -[[deps.Compat]] -deps = ["TOML", "UUIDs"] -git-tree-sha1 = "9d8a54ce4b17aa5bdce0ea5c34bc5e7c340d16ad" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.18.1" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.3.0+1" - -[[deps.ConcurrentUtilities]] -deps = ["Serialization", "Sockets"] -git-tree-sha1 = "d9d26935a0bcffc87d2613ce14c527c99fc543fd" -uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" -version = "2.5.0" - -[[deps.Contour]] -git-tree-sha1 = "439e35b0b36e2e5881738abc8857bd92ad6ff9a8" -uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" -version = "0.6.3" - -[[deps.DataAPI]] -git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" -uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.16.0" - -[[deps.DataStructures]] -deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "4e1fe97fdaed23e9dc21d4d664bea76b65fc50a0" -uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.22" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -version = "1.11.0" - -[[deps.Dbus_jll]] -deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "473e9afc9cf30814eb67ffa5f2db7df82c3ad9fd" -uuid = "ee1fde0b-3d02-5ea6-8484-8dfef6360eab" -version = "1.16.2+0" - -[[deps.DelimitedFiles]] -deps = ["Mmap"] -git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" -uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" -version = "1.9.1" - -[[deps.Distributions]] -deps = ["AliasTables", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] -git-tree-sha1 = "3bc002af51045ca3b47d2e1787d6ce02e68b943a" -uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.122" - - [deps.Distributions.extensions] - DistributionsChainRulesCoreExt = "ChainRulesCore" - DistributionsDensityInterfaceExt = "DensityInterface" - DistributionsTestExt = "Test" - - [deps.Distributions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - DensityInterface = "b429d917-457f-4dbc-8f4c-0cc954292b1d" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.DocStringExtensions]] -git-tree-sha1 = "7442a5dfe1ebb773c29cc2962a8980f47221d76c" -uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.5" - -[[deps.Downloads]] -deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] -uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -version = "1.6.0" - -[[deps.EpollShim_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "8a4be429317c42cfae6a7fc03c31bad1970c310d" -uuid = "2702e6a9-849d-5ed8-8c21-79e8b8f9ee43" -version = "0.0.20230411+1" - -[[deps.ExceptionUnwrapping]] -deps = ["Test"] -git-tree-sha1 = "d36f682e590a83d63d1c7dbd287573764682d12a" -uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" -version = "0.1.11" - -[[deps.Expat_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "27af30de8b5445644e8ffe3bcb0d72049c089cf1" -uuid = "2e619515-83b5-522b-bb60-26c02a35a201" -version = "2.7.3+0" - -[[deps.FFMPEG]] -deps = ["FFMPEG_jll"] -git-tree-sha1 = "83dc665d0312b41367b7263e8a4d172eac1897f4" -uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" -version = "0.4.4" - -[[deps.FFMPEG_jll]] -deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] -git-tree-sha1 = "3a948313e7a41eb1db7a1e733e6335f17b4ab3c4" -uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" -version = "7.1.1+0" - -[[deps.FileWatching]] -uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" -version = "1.11.0" - -[[deps.FillArrays]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "173e4d8f14230a7523ae11b9a3fa9edb3e0efd78" -uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.14.0" -weakdeps = ["PDMats", "SparseArrays", "Statistics"] - - [deps.FillArrays.extensions] - FillArraysPDMatsExt = "PDMats" - FillArraysSparseArraysExt = "SparseArrays" - FillArraysStatisticsExt = "Statistics" - -[[deps.FixedPointNumbers]] -deps = ["Statistics"] -git-tree-sha1 = "05882d6995ae5c12bb5f36dd2ed3f61c98cbb172" -uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" -version = "0.8.5" - -[[deps.Fontconfig_jll]] -deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Zlib_jll"] -git-tree-sha1 = "f85dac9a96a01087df6e3a749840015a0ca3817d" -uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" -version = "2.17.1+0" - -[[deps.Format]] -git-tree-sha1 = "9c68794ef81b08086aeb32eeaf33531668d5f5fc" -uuid = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8" -version = "1.3.7" - -[[deps.FreeType2_jll]] -deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "2c5512e11c791d1baed2049c5652441b28fc6a31" -uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" -version = "2.13.4+0" - -[[deps.FriBidi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "7a214fdac5ed5f59a22c2d9a885a16da1c74bbc7" -uuid = "559328eb-81f9-559d-9380-de523a88c83c" -version = "1.0.17+0" - -[[deps.GLFW_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll", "libdecor_jll", "xkbcommon_jll"] -git-tree-sha1 = "fcb0584ff34e25155876418979d4c8971243bb89" -uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" -version = "3.4.0+2" - -[[deps.GR]] -deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Preferences", "Printf", "Qt6Wayland_jll", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "p7zip_jll"] -git-tree-sha1 = "1828eb7275491981fa5f1752a5e126e8f26f8741" -uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" -version = "0.73.17" - -[[deps.GR_jll]] -deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "FreeType2_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "27299071cc29e409488ada41ec7643e0ab19091f" -uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" -version = "0.73.17+0" - -[[deps.GettextRuntime_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll"] -git-tree-sha1 = "45288942190db7c5f760f59c04495064eedf9340" -uuid = "b0724c58-0f36-5564-988d-3bb0596ebc4a" -version = "0.22.4+0" - -[[deps.Ghostscript_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Zlib_jll"] -git-tree-sha1 = "38044a04637976140074d0b0621c1edf0eb531fd" -uuid = "61579ee1-b43e-5ca0-a5da-69d92c66a64b" -version = "9.55.1+0" - -[[deps.Glib_jll]] -deps = ["Artifacts", "GettextRuntime_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "50c11ffab2a3d50192a228c313f05b5b5dc5acb2" -uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" -version = "2.86.0+0" - -[[deps.Graphite2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "8a6dbda1fd736d60cc477d99f2e7a042acfa46e8" -uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" -version = "1.3.15+0" - -[[deps.Grisu]] -git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" -uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" -version = "1.0.2" - -[[deps.HCubature]] -deps = ["Combinatorics", "DataStructures", "LinearAlgebra", "QuadGK", "StaticArrays"] -git-tree-sha1 = "19ef9f0cb324eed957b7fe7257ac84e8ed8a48ec" -uuid = "19dc6840-f33b-545b-b366-655c7e3ffd49" -version = "1.7.0" - -[[deps.HTTP]] -deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "PrecompileTools", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "5e6fe50ae7f23d171f44e311c2960294aaa0beb5" -uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.10.19" - -[[deps.HarfBuzz_jll]] -deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll"] -git-tree-sha1 = "f923f9a774fcf3f5cb761bfa43aeadd689714813" -uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" -version = "8.5.1+0" - -[[deps.HypergeometricFunctions]] -deps = ["LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] -git-tree-sha1 = "68c173f4f449de5b438ee67ed0c9c748dc31a2ec" -uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" -version = "0.3.28" - -[[deps.Hyperscript]] -deps = ["Test"] -git-tree-sha1 = "179267cfa5e712760cd43dcae385d7ea90cc25a4" -uuid = "47d2ed2b-36de-50cf-bf87-49c2cf4b8b91" -version = "0.0.5" - -[[deps.HypertextLiteral]] -deps = ["Tricks"] -git-tree-sha1 = "7134810b1afce04bbc1045ca1985fbe81ce17653" -uuid = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2" -version = "0.9.5" - -[[deps.IOCapture]] -deps = ["Logging", "Random"] -git-tree-sha1 = "b6d6bfdd7ce25b0f9b2f6b3dd56b2673a66c8770" -uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" -version = "0.2.5" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -version = "1.11.0" - -[[deps.IrrationalConstants]] -git-tree-sha1 = "b2d91fe939cae05960e760110b328288867b5758" -uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.6" - -[[deps.JLFzf]] -deps = ["REPL", "Random", "fzf_jll"] -git-tree-sha1 = "82f7acdc599b65e0f8ccd270ffa1467c21cb647b" -uuid = "1019f520-868f-41f5-a6de-eb00f4b6a39c" -version = "0.1.11" - -[[deps.JLLWrappers]] -deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "0533e564aae234aff59ab625543145446d8b6ec2" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.7.1" - -[[deps.JSON]] -deps = ["Dates", "Mmap", "Parsers", "Unicode"] -git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" -uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.21.4" - -[[deps.JpegTurbo_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "4255f0032eafd6451d707a51d5f0248b8a165e4d" -uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "3.1.3+0" - -[[deps.JuliaSyntaxHighlighting]] -deps = ["StyledStrings"] -uuid = "ac6e5ff7-fb65-4e79-a425-ec3bc9c03011" -version = "1.12.0" - -[[deps.LAME_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "059aabebaa7c82ccb853dd4a0ee9d17796f7e1bc" -uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" -version = "3.100.3+0" - -[[deps.LERC_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "aaafe88dccbd957a8d82f7d05be9b69172e0cee3" -uuid = "88015f11-f218-50d7-93a8-a6af411a945d" -version = "4.0.1+0" - -[[deps.LLVMOpenMP_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "eb62a3deb62fc6d8822c0c4bef73e4412419c5d8" -uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" -version = "18.1.8+0" - -[[deps.LZO_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1c602b1127f4751facb671441ca72715cc95938a" -uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" -version = "2.10.3+0" - -[[deps.LaTeXStrings]] -git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" -uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.4.0" - -[[deps.Latexify]] -deps = ["Format", "Ghostscript_jll", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Requires"] -git-tree-sha1 = "44f93c47f9cd6c7e431f2f2091fcba8f01cd7e8f" -uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" -version = "0.16.10" - - [deps.Latexify.extensions] - DataFramesExt = "DataFrames" - SparseArraysExt = "SparseArrays" - SymEngineExt = "SymEngine" - TectonicExt = "tectonic_jll" - - [deps.Latexify.weakdeps] - DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - SymEngine = "123dc426-2d89-5057-bbad-38513e3affd8" - tectonic_jll = "d7dd28d6-a5e6-559c-9131-7eb760cdacc5" - -[[deps.LibCURL]] -deps = ["LibCURL_jll", "MozillaCACerts_jll"] -uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.4" - -[[deps.LibCURL_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll", "Zlib_jll", "nghttp2_jll"] -uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.11.1+1" - -[[deps.LibGit2]] -deps = ["LibGit2_jll", "NetworkOptions", "Printf", "SHA"] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -version = "1.11.0" - -[[deps.LibGit2_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll"] -uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.9.0+0" - -[[deps.LibSSH2_jll]] -deps = ["Artifacts", "Libdl", "OpenSSL_jll"] -uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.11.3+1" - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -version = "1.11.0" - -[[deps.Libffi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c8da7e6a91781c41a863611c7e966098d783c57a" -uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" -version = "3.4.7+0" - -[[deps.Libglvnd_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll", "Xorg_libXext_jll"] -git-tree-sha1 = "d36c21b9e7c172a44a10484125024495e2625ac0" -uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" -version = "1.7.1+1" - -[[deps.Libiconv_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "be484f5c92fad0bd8acfef35fe017900b0b73809" -uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" -version = "1.18.0+0" - -[[deps.Libmount_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "3acf07f130a76f87c041cfb2ff7d7284ca67b072" -uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" -version = "2.41.2+0" - -[[deps.Libtiff_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] -git-tree-sha1 = "f04133fe05eff1667d2054c53d59f9122383fe05" -uuid = "89763e89-9b03-5906-acba-b20f662cd828" -version = "4.7.2+0" - -[[deps.Libuuid_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "2a7a12fc0a4e7fb773450d17975322aa77142106" -uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" -version = "2.41.2+0" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -version = "1.12.0" - -[[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" -uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.29" - - [deps.LogExpFunctions.extensions] - LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" - LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" - LogExpFunctionsInverseFunctionsExt = "InverseFunctions" - - [deps.LogExpFunctions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -version = "1.11.0" - -[[deps.LoggingExtras]] -deps = ["Dates", "Logging"] -git-tree-sha1 = "f00544d95982ea270145636c181ceda21c4e2575" -uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.2.0" - -[[deps.MIMEs]] -git-tree-sha1 = "c64d943587f7187e751162b3b84445bbbd79f691" -uuid = "6c6e2e6c-3030-632d-7369-2d6c69616d65" -version = "1.1.0" - -[[deps.MacroTools]] -git-tree-sha1 = "1e0228a030642014fe5cfe68c2c0a818f9e3f522" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.16" - -[[deps.Markdown]] -deps = ["Base64", "JuliaSyntaxHighlighting", "StyledStrings"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -version = "1.11.0" - -[[deps.MarkdownLiteral]] -deps = ["CommonMark", "HypertextLiteral"] -git-tree-sha1 = "f7d73634acd573bf3489df1ee0d270a5d6d3a7a3" -uuid = "736d6165-7244-6769-4267-6b50796e6954" -version = "0.1.2" - -[[deps.MbedTLS]] -deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] -git-tree-sha1 = "c067a280ddc25f196b5e7df3877c6b226d390aaf" -uuid = "739be429-bea8-5141-9913-cc70e7f3736d" -version = "1.1.9" - -[[deps.MbedTLS_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "3cce3511ca2c6f87b19c34ffc623417ed2798cbd" -uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.10+0" - -[[deps.Measures]] -git-tree-sha1 = "c13304c81eec1ed3af7fc20e75fb6b26092a1102" -uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" -version = "0.3.2" - -[[deps.Missings]] -deps = ["DataAPI"] -git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d" -uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" -version = "1.2.0" - -[[deps.Mmap]] -uuid = "a63ad114-7e13-5084-954f-fe012c677804" -version = "1.11.0" - -[[deps.MozillaCACerts_jll]] -uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2025.5.20" - -[[deps.NaNMath]] -deps = ["OpenLibm_jll"] -git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" -uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.1.3" - -[[deps.NetworkOptions]] -uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -version = "1.3.0" - -[[deps.Ogg_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "b6aa4566bb7ae78498a5e68943863fa8b5231b59" -uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" -version = "1.3.6+0" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.29+0" - -[[deps.OpenLibm_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.7+0" - -[[deps.OpenSSL]] -deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] -git-tree-sha1 = "f1a7e086c677df53e064e0fdd2c9d0b0833e3f6e" -uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" -version = "1.5.0" - -[[deps.OpenSSL_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "3.5.1+0" - -[[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" -uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.6+0" - -[[deps.Opus_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c392fc5dd032381919e3b22dd32d6443760ce7ea" -uuid = "91d4177d-7536-5919-b921-800302f37372" -version = "1.5.2+0" - -[[deps.OrderedCollections]] -git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.8.1" - -[[deps.PCRE2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" -version = "10.44.0+1" - -[[deps.PDMats]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "d922b4d80d1e12c658da7785e754f4796cc1d60d" -uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" -version = "0.11.36" -weakdeps = ["StatsBase"] - - [deps.PDMats.extensions] - StatsBaseExt = "StatsBase" - -[[deps.Pango_jll]] -deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1f7f9bbd5f7a2e5a9f7d96e51c9754454ea7f60b" -uuid = "36c8627f-9965-5494-a995-c6b170f724f3" -version = "1.56.4+0" - -[[deps.Parsers]] -deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "7d2f8f21da5db6a806faf7b9b292296da42b2810" -uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.8.3" - -[[deps.Pixman_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl"] -git-tree-sha1 = "db76b1ecd5e9715f3d043cec13b2ec93ce015d53" -uuid = "30392449-352a-5448-841d-b1acce4e97dc" -version = "0.44.2+0" - -[[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.12.0" -weakdeps = ["REPL"] - - [deps.Pkg.extensions] - REPLExt = "REPL" - -[[deps.PlotThemes]] -deps = ["PlotUtils", "Statistics"] -git-tree-sha1 = "41031ef3a1be6f5bbbf3e8073f210556daeae5ca" -uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a" -version = "3.3.0" - -[[deps.PlotUtils]] -deps = ["ColorSchemes", "Colors", "Dates", "PrecompileTools", "Printf", "Random", "Reexport", "StableRNGs", "Statistics"] -git-tree-sha1 = "3ca9a356cd2e113c420f2c13bea19f8d3fb1cb18" -uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" -version = "1.4.3" - -[[deps.Plots]] -deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "TOML", "UUIDs", "UnicodeFun", "UnitfulLatexify", "Unzip"] -git-tree-sha1 = "bfe839e9668f0c58367fb62d8757315c0eac8777" -uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -version = "1.40.20" - - [deps.Plots.extensions] - FileIOExt = "FileIO" - GeometryBasicsExt = "GeometryBasics" - IJuliaExt = "IJulia" - ImageInTerminalExt = "ImageInTerminal" - UnitfulExt = "Unitful" - - [deps.Plots.weakdeps] - FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" - GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326" - IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a" - ImageInTerminal = "d8c32880-2388-543b-8c61-d9f865259254" - Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - -[[deps.PlutoTeachingTools]] -deps = ["Downloads", "HypertextLiteral", "Latexify", "Markdown", "PlutoUI"] -git-tree-sha1 = "dacc8be63916b078b592806acd13bb5e5137d7e9" -uuid = "661c6b06-c737-4d37-b85c-46df65de6f69" -version = "0.4.6" - -[[deps.PlutoUI]] -deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "Downloads", "FixedPointNumbers", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "MIMEs", "Markdown", "Random", "Reexport", "URIs", "UUIDs"] -git-tree-sha1 = "3faff84e6f97a7f18e0dd24373daa229fd358db5" -uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" -version = "0.7.73" - -[[deps.PrecompileTools]] -deps = ["Preferences"] -git-tree-sha1 = "07a921781cab75691315adc645096ed5e370cb77" -uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.3.3" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "0f27480397253da18fe2c12a4ba4eb9eb208bf3d" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.5.0" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -version = "1.11.0" - -[[deps.PtrArrays]] -git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" -uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" -version = "1.3.0" - -[[deps.Qt6Base_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Vulkan_Loader_jll", "Xorg_libSM_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_cursor_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "libinput_jll", "xkbcommon_jll"] -git-tree-sha1 = "34f7e5d2861083ec7596af8b8c092531facf2192" -uuid = "c0090381-4147-56d7-9ebc-da0b1113ec56" -version = "6.8.2+2" - -[[deps.Qt6Declarative_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6ShaderTools_jll"] -git-tree-sha1 = "da7adf145cce0d44e892626e647f9dcbe9cb3e10" -uuid = "629bc702-f1f5-5709-abd5-49b8460ea067" -version = "6.8.2+1" - -[[deps.Qt6ShaderTools_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll"] -git-tree-sha1 = "9eca9fc3fe515d619ce004c83c31ffd3f85c7ccf" -uuid = "ce943373-25bb-56aa-8eca-768745ed7b5a" -version = "6.8.2+1" - -[[deps.Qt6Wayland_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6Declarative_jll"] -git-tree-sha1 = "8f528b0851b5b7025032818eb5abbeb8a736f853" -uuid = "e99dba38-086e-5de3-a5b1-6e4c66e897c3" -version = "6.8.2+2" - -[[deps.QuadGK]] -deps = ["DataStructures", "LinearAlgebra"] -git-tree-sha1 = "9da16da70037ba9d701192e27befedefb91ec284" -uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" -version = "2.11.2" - - [deps.QuadGK.extensions] - QuadGKEnzymeExt = "Enzyme" - - [deps.QuadGK.weakdeps] - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - -[[deps.REPL]] -deps = ["InteractiveUtils", "JuliaSyntaxHighlighting", "Markdown", "Sockets", "StyledStrings", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" -version = "1.11.0" - -[[deps.Random]] -deps = ["SHA"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -version = "1.11.0" - -[[deps.RecipesBase]] -deps = ["PrecompileTools"] -git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" -uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "1.3.4" - -[[deps.RecipesPipeline]] -deps = ["Dates", "NaNMath", "PlotUtils", "PrecompileTools", "RecipesBase"] -git-tree-sha1 = "45cf9fd0ca5839d06ef333c8201714e888486342" -uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" -version = "0.6.12" - -[[deps.Reexport]] -git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" -uuid = "189a3867-3050-52da-a836-e630ba90ab69" -version = "1.2.2" - -[[deps.RelocatableFolders]] -deps = ["SHA", "Scratch"] -git-tree-sha1 = "ffdaf70d81cf6ff22c2b6e733c900c3321cab864" -uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" -version = "1.0.1" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.1" - -[[deps.Rmath]] -deps = ["Random", "Rmath_jll"] -git-tree-sha1 = "4395a4cad612f95c1d08352f8c53811d6af3060b" -uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" -version = "0.8.1" - -[[deps.Rmath_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "58cdd8fb2201a6267e1db87ff148dd6c1dbd8ad8" -uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" -version = "0.5.1+0" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.Scratch]] -deps = ["Dates"] -git-tree-sha1 = "9b81b8393e50b7d4e6d0a9f14e192294d3b7c109" -uuid = "6c6a2e73-6563-6170-7368-637461726353" -version = "1.3.0" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -version = "1.11.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 = "f305871d2f381d21527c770d4788c06c097c9bc1" -uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" -version = "1.2.0" - -[[deps.Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -version = "1.11.0" - -[[deps.SortingAlgorithms]] -deps = ["DataStructures"] -git-tree-sha1 = "64d974c2e6fdf07f8155b5b2ca2ffa9069b608d9" -uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" -version = "1.2.2" - -[[deps.SparseArrays]] -deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.12.0" - -[[deps.SpecialFunctions]] -deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "f2685b435df2613e25fc10ad8c26dddb8640f547" -uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.6.1" - - [deps.SpecialFunctions.extensions] - SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" - - [deps.SpecialFunctions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - -[[deps.StableRNGs]] -deps = ["Random"] -git-tree-sha1 = "95af145932c2ed859b63329952ce8d633719f091" -uuid = "860ef19b-820b-49d6-a774-d7a799459cd3" -version = "1.0.3" - -[[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "b8693004b385c842357406e3af647701fe783f98" -uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.15" - - [deps.StaticArrays.extensions] - StaticArraysChainRulesCoreExt = "ChainRulesCore" - StaticArraysStatisticsExt = "Statistics" - - [deps.StaticArrays.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - -[[deps.StaticArraysCore]] -git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" -uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.3" - -[[deps.Statistics]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.Statistics.extensions] - SparseArraysExt = ["SparseArrays"] - -[[deps.StatsAPI]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9d72a13a3f4dd3795a195ac5a44d7d6ff5f552ff" -uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" -version = "1.7.1" - -[[deps.StatsBase]] -deps = ["AliasTables", "DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "2c962245732371acd51700dbb268af311bddd719" -uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.34.6" - -[[deps.StatsFuns]] -deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] -git-tree-sha1 = "8e45cecc66f3b42633b8ce14d431e8e57a3e242e" -uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" -version = "1.5.0" - - [deps.StatsFuns.extensions] - StatsFunsChainRulesCoreExt = "ChainRulesCore" - StatsFunsInverseFunctionsExt = "InverseFunctions" - - [deps.StatsFuns.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.StyledStrings]] -uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b" -version = "1.11.0" - -[[deps.SuiteSparse]] -deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] -uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" - -[[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] -uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.8.3+2" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[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" -version = "1.11.0" - -[[deps.TranscodingStreams]] -git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742" -uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" -version = "0.11.3" - -[[deps.Tricks]] -git-tree-sha1 = "372b90fe551c019541fafc6ff034199dc19c8436" -uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" -version = "0.1.12" - -[[deps.URIs]] -git-tree-sha1 = "bef26fb046d031353ef97a82e3fdb6afe7f21b1a" -uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -version = "1.6.1" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -version = "1.11.0" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -version = "1.11.0" - -[[deps.UnicodeFun]] -deps = ["REPL"] -git-tree-sha1 = "53915e50200959667e78a92a418594b428dffddf" -uuid = "1cfade01-22cf-5700-b092-accc4b62d6e1" -version = "0.4.1" - -[[deps.Unitful]] -deps = ["Dates", "LinearAlgebra", "Random"] -git-tree-sha1 = "6258d453843c466d84c17a58732dda5deeb8d3af" -uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" -version = "1.24.0" - - [deps.Unitful.extensions] - ConstructionBaseUnitfulExt = "ConstructionBase" - ForwardDiffExt = "ForwardDiff" - InverseFunctionsUnitfulExt = "InverseFunctions" - PrintfExt = "Printf" - - [deps.Unitful.weakdeps] - ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[deps.UnitfulLatexify]] -deps = ["LaTeXStrings", "Latexify", "Unitful"] -git-tree-sha1 = "af305cc62419f9bd61b6644d19170a4d258c7967" -uuid = "45397f5d-5981-4c77-b2b3-fc36d6e9b728" -version = "1.7.0" - -[[deps.Unzip]] -git-tree-sha1 = "ca0969166a028236229f63514992fc073799bb78" -uuid = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" -version = "0.2.0" - -[[deps.Vulkan_Loader_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Wayland_jll", "Xorg_libX11_jll", "Xorg_libXrandr_jll", "xkbcommon_jll"] -git-tree-sha1 = "2f0486047a07670caad3a81a075d2e518acc5c59" -uuid = "a44049a8-05dd-5a78-86c9-5fde0876e88c" -version = "1.3.243+0" - -[[deps.Wayland_jll]] -deps = ["Artifacts", "EpollShim_jll", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll"] -git-tree-sha1 = "96478df35bbc2f3e1e791bc7a3d0eeee559e60e9" -uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" -version = "1.24.0+0" - -[[deps.XZ_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "fee71455b0aaa3440dfdd54a9a36ccef829be7d4" -uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" -version = "5.8.1+0" - -[[deps.Xorg_libICE_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a3ea76ee3f4facd7a64684f9af25310825ee3668" -uuid = "f67eecfb-183a-506d-b269-f58e52b52d7c" -version = "1.1.2+0" - -[[deps.Xorg_libSM_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libICE_jll"] -git-tree-sha1 = "9c7ad99c629a44f81e7799eb05ec2746abb5d588" -uuid = "c834827a-8449-5923-a945-d239c165b7dd" -version = "1.2.6+0" - -[[deps.Xorg_libX11_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] -git-tree-sha1 = "b5899b25d17bf1889d25906fb9deed5da0c15b3b" -uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" -version = "1.8.12+0" - -[[deps.Xorg_libXau_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "aa1261ebbac3ccc8d16558ae6799524c450ed16b" -uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" -version = "1.0.13+0" - -[[deps.Xorg_libXcursor_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] -git-tree-sha1 = "6c74ca84bbabc18c4547014765d194ff0b4dc9da" -uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" -version = "1.2.4+0" - -[[deps.Xorg_libXdmcp_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "52858d64353db33a56e13c341d7bf44cd0d7b309" -uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" -version = "1.1.6+0" - -[[deps.Xorg_libXext_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "a4c0ee07ad36bf8bbce1c3bb52d21fb1e0b987fb" -uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" -version = "1.3.7+0" - -[[deps.Xorg_libXfixes_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "75e00946e43621e09d431d9b95818ee751e6b2ef" -uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" -version = "6.0.2+0" - -[[deps.Xorg_libXi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] -git-tree-sha1 = "a376af5c7ae60d29825164db40787f15c80c7c54" -uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" -version = "1.8.3+0" - -[[deps.Xorg_libXinerama_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll"] -git-tree-sha1 = "a5bc75478d323358a90dc36766f3c99ba7feb024" -uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" -version = "1.1.6+0" - -[[deps.Xorg_libXrandr_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXrender_jll"] -git-tree-sha1 = "aff463c82a773cb86061bce8d53a0d976854923e" -uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" -version = "1.5.5+0" - -[[deps.Xorg_libXrender_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "7ed9347888fac59a618302ee38216dd0379c480d" -uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" -version = "0.9.12+0" - -[[deps.Xorg_libxcb_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXau_jll", "Xorg_libXdmcp_jll"] -git-tree-sha1 = "bfcaf7ec088eaba362093393fe11aa141fa15422" -uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" -version = "1.17.1+0" - -[[deps.Xorg_libxkbfile_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "e3150c7400c41e207012b41659591f083f3ef795" -uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" -version = "1.1.3+0" - -[[deps.Xorg_xcb_util_cursor_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_jll", "Xorg_xcb_util_renderutil_jll"] -git-tree-sha1 = "9750dc53819eba4e9a20be42349a6d3b86c7cdf8" -uuid = "e920d4aa-a673-5f3a-b3d7-f755a4d47c43" -version = "0.1.6+0" - -[[deps.Xorg_xcb_util_image_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] -git-tree-sha1 = "f4fc02e384b74418679983a97385644b67e1263b" -uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b" -version = "0.4.1+0" - -[[deps.Xorg_xcb_util_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll"] -git-tree-sha1 = "68da27247e7d8d8dafd1fcf0c3654ad6506f5f97" -uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5" -version = "0.4.1+0" - -[[deps.Xorg_xcb_util_keysyms_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] -git-tree-sha1 = "44ec54b0e2acd408b0fb361e1e9244c60c9c3dd4" -uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7" -version = "0.4.1+0" - -[[deps.Xorg_xcb_util_renderutil_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] -git-tree-sha1 = "5b0263b6d080716a02544c55fdff2c8d7f9a16a0" -uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e" -version = "0.3.10+0" - -[[deps.Xorg_xcb_util_wm_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] -git-tree-sha1 = "f233c83cad1fa0e70b7771e0e21b061a116f2763" -uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361" -version = "0.4.2+0" - -[[deps.Xorg_xkbcomp_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxkbfile_jll"] -git-tree-sha1 = "801a858fc9fb90c11ffddee1801bb06a738bda9b" -uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" -version = "1.4.7+0" - -[[deps.Xorg_xkeyboard_config_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xkbcomp_jll"] -git-tree-sha1 = "00af7ebdc563c9217ecc67776d1bbf037dbcebf4" -uuid = "33bec58e-1273-512f-9401-5d533626f822" -version = "2.44.0+0" - -[[deps.Xorg_xtrans_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a63799ff68005991f9d9491b6e95bd3478d783cb" -uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" -version = "1.6.0+0" - -[[deps.Zlib_jll]] -deps = ["Libdl"] -uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.3.1+2" - -[[deps.Zstd_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "446b23e73536f84e8037f5dce465e92275f6a308" -uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" -version = "1.5.7+1" - -[[deps.eudev_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c3b0e6196d50eab0c5ed34021aaa0bb463489510" -uuid = "35ca27e7-8b34-5b7f-bca9-bdc33f59eb06" -version = "3.2.14+0" - -[[deps.fzf_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "b6a34e0e0960190ac2a4363a1bd003504772d631" -uuid = "214eeab7-80f7-51ab-84ad-2988db7cef09" -version = "0.61.1+0" - -[[deps.libaom_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "371cc681c00a3ccc3fbc5c0fb91f58ba9bec1ecf" -uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" -version = "3.13.1+0" - -[[deps.libass_jll]] -deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "125eedcb0a4a0bba65b657251ce1d27c8714e9d6" -uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" -version = "0.17.4+0" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.15.0+0" - -[[deps.libdecor_jll]] -deps = ["Artifacts", "Dbus_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pango_jll", "Wayland_jll", "xkbcommon_jll"] -git-tree-sha1 = "9bf7903af251d2050b467f76bdbe57ce541f7f4f" -uuid = "1183f4f0-6f2a-5f1a-908b-139f9cdfea6f" -version = "0.2.2+0" - -[[deps.libevdev_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "56d643b57b188d30cccc25e331d416d3d358e557" -uuid = "2db6ffa8-e38f-5e21-84af-90c45d0032cc" -version = "1.13.4+0" - -[[deps.libfdk_aac_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "646634dd19587a56ee2f1199563ec056c5f228df" -uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" -version = "2.0.4+0" - -[[deps.libinput_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "eudev_jll", "libevdev_jll", "mtdev_jll"] -git-tree-sha1 = "91d05d7f4a9f67205bd6cf395e488009fe85b499" -uuid = "36db933b-70db-51c0-b978-0f229ee0e533" -version = "1.28.1+0" - -[[deps.libpng_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "07b6a107d926093898e82b3b1db657ebe33134ec" -uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -version = "1.6.50+0" - -[[deps.libvorbis_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll"] -git-tree-sha1 = "11e1772e7f3cc987e9d3de991dd4f6b2602663a5" -uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" -version = "1.3.8+0" - -[[deps.mtdev_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "b4d631fd51f2e9cdd93724ae25b2efc198b059b1" -uuid = "009596ad-96f7-51b1-9f1b-5ce2d5e8a71e" -version = "1.1.7+0" - -[[deps.nghttp2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.64.0+1" - -[[deps.p7zip_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.5.0+2" - -[[deps.x264_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "14cc7083fc6dff3cc44f2bc435ee96d06ed79aa7" -uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a" -version = "10164.0.1+0" - -[[deps.x265_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "e7b67590c14d487e734dcb925924c5dc43ec85f3" -uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" -version = "4.1.0+0" - -[[deps.xkbcommon_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] -git-tree-sha1 = "fbf139bce07a534df0e699dbb5f5cc9346f95cc1" -uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" -version = "1.9.2+0" -""" - -# ╔═╡ Cell order: -# ╟─b9a38e20-d294-11ef-166b-b5597125ed6d -# ╟─5e9a51b1-c6e5-4fb5-9df3-9b189f3302e8 -# ╟─b9a46c3e-d294-11ef-116f-9b97e0118e5b -# ╟─8e436806-af9d-4aa4-88a4-d37e10b69c36 -# ╟─b9a48c60-d294-11ef-3b90-03053fcd82fb -# ╟─7a8e77b8-1692-41b7-88ef-26560aad5f08 -# ╟─ba57ecbb-b64e-4dd8-8398-a90af1ac71f3 -# ╟─3200f4f9-4c43-46c0-8bdb-9afc95d116e0 -# ╠═46465948-90e1-480f-b656-74bf542756ef -# ╟─4e6c4e40-f744-49e7-9d67-cf982c9fc58d -# ╠═c48bd024-4afb-4e5e-af2d-56b2466511c7 -# ╟─148f82be-5012-4c12-9002-6a8bcbf5ad08 -# ╟─b1b9bc8f-2653-42af-ad49-6aaaba2ae70e -# ╟─c2208520-020b-400a-8bb4-c8fb6786ccf3 -# ╠═3d05a2eb-87aa-4d6a-9caf-feb5758e000a -# ╟─55380883-d269-4f61-bec6-2944765db271 -# ╟─02853a5c-f6aa-4af8-8a25-bfffd4b96afc -# ╟─71f1c8ee-3b65-4ef8-b36f-3822837de410 -# ╟─b9a4eb62-d294-11ef-06fa-af1f586cbc15 -# ╟─b9a50d0c-d294-11ef-0e60-2386cf289478 -# ╟─b9a52b18-d294-11ef-2d42-19c5e3ef3549 -# ╟─b9a5589a-d294-11ef-3fc3-0552a69df7b2 -# ╟─085233ee-f5ad-4731-89bb-84773182bba6 -# ╟─9501922f-b928-46e2-8f23-8eb9c64f6198 -# ╟─b9a5889c-d294-11ef-266e-d90225222e10 -# ╟─56510a09-073c-4fc8-b0b7-17b20dbb95f0 -# ╟─a82378ae-d1be-43f9-b63a-2f897767d1fb -# ╟─36eff7bc-72f2-4b48-a109-1861af6834aa -# ╟─87f400ac-36f2-4778-a3ba-06dd7652e279 -# ╟─9c2bf0a2-4bb6-4769-b47b-6a02c4e73044 -# ╟─8f7ecb91-d251-4ac9-bb32-0dd7215382e3 -# ╟─1df7a10d-c4f6-40d6-8f5a-cbd79ef1d415 -# ╟─673360e8-27ed-471c-a866-15af550df5e7 -# ╟─9eb3e920-fab5-4a6a-8fe1-5734ebc6b25c -# ╟─883e8244-270e-4c6c-874b-b69d8989c24c -# ╟─f02aa0b1-2261-4f65-9bd0-3be33230e0d6 -# ╟─f008a742-6900-4e18-ab4e-b5da53fb64a6 -# ╟─75e35350-af22-42b1-bb55-15e16cb9c375 -# ╟─8d2732e8-479f-4744-9b1f-d0364f0c6488 -# ╟─0f9feb8d-971e-4a94-8c70-3e1f0d284314 -# ╟─2767b364-6f9a-413d-aa9e-88741cd2bbb1 -# ╟─c6753ff3-7b5e-45b8-8adc-e0bbaa6be7d3 -# ╟─b9a5cbc2-d294-11ef-214a-c71fb1272326 -# ╟─b9a5dcc0-d294-11ef-2c85-657a460db5cd -# ╟─7b415578-10fa-4eb1-ab1f-ce3ff57dcf45 -# ╟─b9a67d06-d294-11ef-297b-eb9039786ea7 -# ╟─b9a68d3a-d294-11ef-2335-093a39648007 -# ╟─b9a697fa-d294-11ef-3a57-7b7ba1f4fd70 -# ╟─b9a6b7b2-d294-11ef-06dc-4de5ef25c1fd -# ╟─702e7b10-14a4-42da-a192-f7c02a3d470a -# ╟─51d81901-213f-42ce-b77e-10f7ca4a4145 -# ╟─b9a6c7b6-d294-11ef-0446-c372aa610df8 -# ╟─b9a6ecd2-d294-11ef-02af-37c977f2814b -# ╟─b9a6f916-d294-11ef-38cb-b78c0c448550 -# ╟─d2bedf5f-a0ea-4604-b5da-adf9f11e80be -# ╟─b9a7073a-d294-11ef-2330-49ffa7faff21 -# ╟─45c2fb37-a078-4284-9e04-176156cffb1e -# ╟─df8867ed-0eff-4a52-8f5e-2472467e1aa2 -# ╟─3a0f7324-0955-4c1c-8acc-0d33ebd16f78 -# ╟─db730ca7-4850-49c7-a93d-746d393b509b -# ╟─b9a885a8-d294-11ef-079e-411d3f1cda03 -# ╟─b9a9565c-d294-11ef-1b67-83d1ab18035b -# ╟─59599e04-3e81-4518-b232-3264d9bde4f7 -# ╟─b9a99fcc-d294-11ef-3de4-5369d9796de7 -# ╟─b9a9b8e0-d294-11ef-348d-c197c4ce2b8c -# ╟─b9a9dca8-d294-11ef-04ec-a9202c319f89 -# ╟─b9a9f98e-d294-11ef-193a-0dbdbfffa86f -# ╟─b9aa27da-d294-11ef-0780-af9d89f9f599 -# ╟─b426f9c8-4506-43ef-92fa-2ee30be621ca -# ╟─b9a80522-d294-11ef-39d8-53a536d66bf9 -# ╟─364cd002-92ee-4fb6-b89a-3251eff7502c -# ╟─922f0eb6-9e29-4b6c-9701-cb7b2f07bb7a -# ╟─9bd38e28-73d4-4c6c-a1fe-35c7a0e750b3 -# ╟─b9ac2d3c-d294-11ef-0d37-65a65525ad28 -# ╟─9fc14c8b-98bc-4fe9-9b58-6c5774ac5f64 -# ╟─b9ac5190-d294-11ef-0a99-a9d369b34045 -# ╟─dbf97d8d-62f2-4996-a6aa-5ae4601d456b -# ╟─b9a85716-d294-11ef-10e0-a7b08b800a98 -# ╟─0d303dba-51d4-4413-8001-73ed98bf74df -# ╟─4a2cd378-0960-4089-81ad-87bf1be9a3b2 -# ╟─50d90759-8e7f-4da5-a741-89b997eae40b -# ╟─d05975bb-c5cc-470a-a6f3-60bc43c51e89 -# ╟─e8e26e57-ae94-478a-8bb2-2868de5d99e0 -# ╟─cfa0d29a-ffd8-4e14-b3fd-03c824db395f -# ╟─b9aa930a-d294-11ef-37ec-8d17be226c74 -# ╟─b9aabe9a-d294-11ef-2489-e9fc0dbb760a -# ╟─b9aad50e-d294-11ef-23d2-8d2bb3b47574 -# ╟─b9aaee4a-d294-11ef-2ed7-0dcb360d8bb7 -# ╟─b9aafc6e-d294-11ef-1b1a-df718c1f1a58 -# ╟─e2fc4945-4f88-4520-b56c-c7208b62c29d -# ╟─b9ab0b46-d294-11ef-13c5-8314655f7867 -# ╟─b9ab1dd4-d294-11ef-2e86-31c4a4389475 -# ╟─b9ab2e32-d294-11ef-2ccc-9760ead59972 -# ╟─3a53f67c-f291-4530-a2ba-f95a97b27960 -# ╟─661082eb-f0c9-49a9-b046-8705f4342b37 -# ╟─b9ab9e28-d294-11ef-3a73-1f5cefdab3d8 -# ╟─ffa570a9-ceda-4a21-80a7-a193de12fa2c -# ╠═9edd80d4-d088-4b2f-8843-abaa7a5d9c5e -# ╠═85b15f0a-650f-44be-97ab-55d52cb817ed -# ╠═115eabf2-c476-40f8-8d7b-868a7359c1b6 -# ╠═61764e4a-e5ef-4744-8c71-598b2155f4d9 -# ╟─b9ac7486-d294-11ef-13e5-29b7ffb440bc -# ╟─b89360b8-39fa-46e9-96c8-7eece50fcb90 -# ╟─a439c0a7-afa1-4d9a-8737-58d341744016 -# ╟─79a99a22-3bb5-431b-bf84-5dce5cccfe25 -# ╟─14b3edcc-0d16-4055-9b1c-7f324514a0a9 -# ╟─dd7786e2-d6ac-4dba-abca-3686242c067d -# ╟─b7a810a3-dc38-4e72-ab10-2ad2f064bdbb -# ╟─f711b053-dccf-4bf1-b285-e8da94a48b68 -# ╟─22539cfe-3694-4100-8120-ca6ac1e66b31 -# ╟─fa197526-6706-47ce-b84b-5675eee00610 -# ╟─645308ac-c9e3-4d6f-bcff-82327fbb8edf -# ╟─03c399e1-d0d8-493a-9f95-4209918d132a -# ╟─6dfc31a0-d0d7-4901-a876-890df9ab4258 -# ╟─b9acd5d4-d294-11ef-1ae5-ed4e13d238ef -# ╟─b9acf7a8-d294-11ef-13d9-81758355cb1e -# ╟─b9ad0842-d294-11ef-2035-31bceab4ace1 -# ╟─b9ad1b70-d294-11ef-3931-d1dcd2343ac9 -# ╟─b9ad299e-d294-11ef-36d7-2f73d3cd1fa7 -# ╟─b9ad5100-d294-11ef-0e8b-3f67ddb2d86d -# ╟─b9ad6238-d294-11ef-3fed-bbcc7d7443ee -# ╟─b9ad71a6-d294-11ef-185f-f1f6e6ac4464 -# ╟─b9ad85a4-d294-11ef-2af2-953ac0ab8927 -# ╟─b9abadce-d294-11ef-14a6-9131c5b1b802 -# ╟─b9abdc7e-d294-11ef-394a-a708c96c86fc -# ╟─b9abf984-d294-11ef-1eaa-3358379f8b44 -# ╟─b9ac09c4-d294-11ef-2cb8-270289d01f25 -# ╟─f78bc1f5-cf7b-493f-9c5c-c2fbd6788616 -# ╟─026da6b9-dee1-485e-af00-3b9e35f71b6b -# ╠═6ffabd68-4c38-4024-a21b-1d6fa7c3a6d7 -# ╠═ce16666b-aa90-42ae-b3a7-690e71301024 -# ╠═724cac08-a54d-4dea-8416-0bce33c75405 -# ╠═92efa7c1-dde6-4b21-bf3b-0fa91931620c -# ╟─3d0f7af2-082d-4305-a271-349d41fcd166 -# ╠═5638c1d0-db95-49e4-bd80-528f79f2947e -# ╠═eaf6794e-66a1-45f0-95ff-7d13983aafa2 -# ╠═03a36e87-2378-4efc-bcac-9c0609b52784 -# ╟─bc7a875f-e4fa-43fd-b001-cec6aadea3bc -# ╠═c97c495c-f7fe-4552-90df-e2fb16f81d15 -# ╠═3ec821fd-cf6c-4603-839d-8c59bb931fa9 -# ╠═00482666-0772-4e5d-bb35-df7b6fb67a1b -# ╟─00000000-0000-0000-0000-000000000001 -# ╟─00000000-0000-0000-0000-000000000002 diff --git a/mlss/archive/The Multinomial Distribution.jl b/mlss/archive/The Multinomial Distribution.jl deleted file mode 100644 index 115652f..0000000 --- a/mlss/archive/The Multinomial Distribution.jl +++ /dev/null @@ -1,940 +0,0 @@ -### A Pluto.jl notebook ### -# v0.20.21 - -#> [frontmatter] -#> description = "Bayesian and maximum likelihood density estimation for discretely valued data sets." -#> -#> [[frontmatter.author]] -#> name = "BMLIP" -#> url = "https://github.com/bmlip" - -using Markdown -using InteractiveUtils - -# ╔═╡ d3a4a1dc-3fdf-479d-a51c-a1e23073c556 -using BmlipTeachingTools - -# ╔═╡ d8422bf2-d294-11ef-0144-098f414c6454 -title("Discrete Data and the Multinomial Distribution") - -# ╔═╡ 1c6d16be-e8e8-45f1-aa32-c3fb08af19ce -PlutoUI.TableOfContents() - -# ╔═╡ d8424e52-d294-11ef-0083-fbb77df4d853 -md""" -## Preliminaries - -##### Goal - - * Simple Bayesian and maximum likelihood-based density estimation for discretely valued data sets - -##### Materials - - * Mandatory - - * These lecture notes - * Optional - - * [Bishop PRML book](https://www.microsoft.com/en-us/research/wp-content/uploads/2006/01/Bishop-Pattern-Recognition-and-Machine-Learning-2006.pdf) (2006), pp. 67-70, 74-76, 93-94 - -""" - -# ╔═╡ d842ad86-d294-11ef-3266-253f80ecf4b7 -md""" -## Discrete Data: the 1-of-K Coding Scheme - -Consider a coin-tossing experiment with outcomes ``x \in\{0,1\}`` (tail and head, respectively) and let ``0\leq \mu \leq 1`` represent the probability of heads. The data generating distribution for this model can written as a [**Bernoulli distribution**](https://en.wikipedia.org/wiki/Bernoulli_distribution): - -```math - -p(x|\mu) = \mu^{x}(1-\mu)^{1-x} -``` - -Note that the variable ``x`` acts as a (binary) **selector** for the tail or head probabilities. Think of this as an 'if'-statement in programming. - -""" - -# ╔═╡ d842d368-d294-11ef-024d-45e58ca994e0 -md""" -Now consider a ``K``-sided coin (e.g., a six-faced *die* (pl.: dice)). How should we encode outcomes? Two natural options present themselves: - -##### Option 1: label encoding - -```math -x \in \{1,2,\ldots,K\} \,. -``` - - E.g., for ``K=6``, if the die lands on the 3rd face, then ``x=3``. - - This coding scheme is called **label** (or **index**) encoding. - -##### Option 2: one-hot encoding - -```math -x = (x_1,\ldots,x_K)^T -``` -where ``x_k`` are **binary selection variables**, given by -```math -x_k = \begin{cases} 1 & \text{if die landed on $k$th face}\\ -0 & \text{otherwise} \end{cases} -``` - - For instance, for ``K=6``, if the die lands on the ``3``-rd face, then ``x=(0,0,1,0,0,0)^T``. - - - This coding scheme is called a **1-of-K** or **one-hot** coding scheme. - -It turns out that the one-hot coding scheme is mathematically more convenient! - -""" - -# ╔═╡ f9977fc0-0d3f-467e-822d-72f3a338f717 -keyconcept("", "Discrete event outcomes are typically represented via one-hot encoding, in which each outcome corresponds to a unique binary indicator vector.") - -# ╔═╡ d842fe4c-d294-11ef-15a9-a9a6e359f47d -md""" -## The Categorical Distribution - -Consider a toss with a ``K``-sided die. We use a one-hot coding scheme, i.e., the outcome is encoded as -```math -x_{k} = \begin{cases} 1 & \text{if the throw landed on $k$-th face}\\ -0 & \text{otherwise} \end{cases} \,. -``` - -Assume the probabilities - - -```math -p(x_{k}=1) = \mu_k \quad \text{with } \mu_k \geq 0 \text{ and }\sum_k \mu_k = 1 \,. -``` -The data generating distribution for one-hot encoded outcome ``x = (x_{1},x_{2},\ldots,x_{K})`` (and ``\mu = (\mu_1,\mu_2,\dots,\mu_k)^T``) is then given by - -```math -p(x|\mu) = \mu_1^{x_1} \mu_2^{x_2} \cdots \mu_K^{x_K}=\prod_{k=1}^K \mu_k^{x_k} \tag{B-2.26} -``` - -This generalized Bernoulli distribution is called the [**categorical distribution**](https://en.wikipedia.org/wiki/Categorical_distribution). - -""" - -# ╔═╡ d843540a-d294-11ef-3846-2bf27b7e9b30 -md""" -# Bayesian Density Estimation for a Loaded Die - -Now let's proceed with learning the parameters for a model for ``N`` independent-and-identically-distributed (IID) rolls of a ``K``-sided die, based on observed data set ``D=\{x_1,\ldots,x_N\}``. - - -""" - -# ╔═╡ d84369a4-d294-11ef-38f7-7f393869b705 -md""" -## Model specification - -#### data-generating distribution - -The outcomes ``x_n`` are encoded as -```math -x_{nk} = \begin{cases} 1 & \text{if the $n$-th throw landed on $k$-th face}\\ -0 & \text{otherwise} \end{cases} -``` - -and the likelihood function for ``\mu`` is now - -```math -p(D|\mu) = \prod_n \prod_k \mu_k^{x_{nk}} = \prod_k \mu_k^{\sum_n x_{nk}} = \prod_k \mu_k^{m_k} \tag{B-2.29} -``` - -where ``m_k= \sum_n x_{nk}`` is the total number of occurrences that the outcome landed on face ``k``. The vector ``m = (m_1,m_2, \ldots, m_K)^T`` is known as the **count vector**. Note that ``\sum_k m_k = N``. - -This distribution depends on the observations **only** through the ''observed'' counts ``\{m_k\}``. For given counts ``\{m_k\}``, ``p(D|\mu)`` can be interpreted as a likelihood function for ``\mu``. - -""" - -# ╔═╡ d8439866-d294-11ef-230b-dfde21aedfbf -md""" - -#### prior distribution - -Next, we need a prior for the parameters ``\mu = (\mu_1,\mu_2,\ldots,\mu_K)^T``. - -In the [binary coin toss example](https://bmlip.github.io/course/lectures/Bayesian%20Machine%20Learning.html#beta-prior), we used a [beta distribution](https://en.wikipedia.org/wiki/Beta_distribution) that was conjugate with the binomial and forced us to choose prior pseudo-counts. - -The generalization of the beta prior to ``K`` parameters ``\{\mu_k\}`` is the [Dirichlet distribution](https://en.wikipedia.org/wiki/Dirichlet_distribution): - -```math -p(\mu|\alpha) = \mathrm{Dir}(\mu|\alpha) = \frac{\Gamma\left(\sum_k \alpha_k\right)}{\Gamma(\alpha_1)\cdots \Gamma(\alpha_K)} \prod_{k=1}^K \mu_k^{\alpha_k-1} -``` - -where ``\Gamma(\cdot)`` is the [Gamma function](https://en.wikipedia.org/wiki/Gamma_function). - - - The Gamma function can be interpreted as a generalization of the factorial function to the real (``\mathbb{R}``) numbers. If ``n`` is a natural number (``1,2,3, \ldots $), then $\Gamma(n) = (n-1)!``, where ``(n-1)! = (n-1)\cdot (n-2) \cdot 1``. - -As before for the Beta distribution in the coin toss experiment, you can interpret ``\alpha_k`` as the prior number of (pseudo-)observations that the die landed on the ``k``-th face. - -""" - -# ╔═╡ d843a338-d294-11ef-2748-b95f2af1396b -md""" -## Inference for ``\{\mu_k\}`` - -The posterior for ``\{\mu_k\}`` can be obtained through Bayes rule: - -```math -\begin{align*} -p(\mu|D,\alpha) &\propto p(D|\mu) \cdot p(\mu|\alpha) \\ - &\propto \prod_k \mu_k^{m_k} \cdot \prod_k \mu_k^{\alpha_k-1} \\ - &= \prod_k \mu_k^{\alpha_k + m_k -1}\\ - &\propto \mathrm{Dir}\left(\mu\,|\,\alpha + m \right) \tag{B-2.41} \\ - &= \frac{\Gamma\left(\sum_k (\alpha_k + m_k) \right)}{\Gamma(\alpha_1+m_1) \Gamma(\alpha_2+m_2) \cdots \Gamma(\alpha_K + m_K)} \prod_{k=1}^K \mu_k^{\alpha_k + m_k -1} -\end{align*} -``` - -where ``m = (m_1,m_2,\ldots,m_K)^T`` is the count vector. - -""" - -# ╔═╡ d843b33c-d294-11ef-195d-2708fbfba49d -md""" -We recognize the ``(\alpha_k)``'s as prior pseudo-counts and the Dirichlet distribution shows to be a [conjugate prior](https://en.wikipedia.org/wiki/Conjugate_prior) to the categorical/multinomial: - -```math -\begin{align*} -\underbrace{\text{Dirichlet}}_{\text{posterior}} &\propto \underbrace{\text{categorical}}_{\text{likelihood}} \cdot \underbrace{\text{Dirichlet}}_{\text{prior}} -\end{align*} -``` - -""" - -# ╔═╡ d843c228-d294-11ef-0d34-3520dc97859c -md""" -This is actually a generalization of the conjugate relation that we found for the binary coin toss: - -```math -\begin{align*} -\underbrace{\text{beta}}_{\text{posterior}} &\propto \underbrace{\text{binomial}}_{\text{likelihood}} \cdot \underbrace{\text{beta}}_{\text{prior}} -\end{align*} -``` - -""" - -# ╔═╡ d843d0c4-d294-11ef-10b6-cb982615d58a -md""" -## $(HTML("Prediction of next toss for the loaded die")) - -Let's apply what we have learned about the loaded die to compute the probability that we throw the ``k``-th face at the next toss. - -```math -\begin{align*} -p(x_{\bullet,k}=1|D) &= \int p(x_{\bullet,k}=1|\mu)\,p(\mu|D) \,\mathrm{d}\mu \\ - &= \int_0^1 \mu_k \times \mathcal{Dir}(\mu|\,\alpha+m) \,\mathrm{d}\mu \\ - &= \mathrm{E}\left[ \mu_k | D\right] \\ - &= \frac{m_k + \alpha_k }{ N+ \sum_k \alpha_k} -\end{align*} -``` - -(You can find the mean of the Dirichlet distribution ``\mathrm{E}\left[ \mu_k \right]`` at its [Wikipedia site](https://en.wikipedia.org/wiki/Dirichlet_distribution)). - -This result is simply a generalization of [**Laplace's rule of succession**](https://en.wikipedia.org/wiki/Rule_of_succession). - -""" - -# ╔═╡ d843defc-d294-11ef-358b-f56f514dcf93 -md""" -## Categorical, Multinomial and Related Distributions - -In the above derivation, we noticed that the data generating distribution for ``N`` die tosses with data outcomes ``D=\{x_1,\ldots,x_N\}`` only depends on the **counts** ``m_k``: - -```math -p(D|\mu) = \prod_n \underbrace{\prod_k \mu_k^{x_{nk}}}_{\text{categorical dist.}} = \prod_k \mu_k^{\sum_n x_{nk}} = \prod_k \mu_k^{m_k} \tag{B-2.29} -``` - -""" - -# ╔═╡ d843efdc-d294-11ef-0f3a-630ecdd0acee -md""" -A related distribution is the distribution over count observations ``D_m=\{m_1,\ldots,m_K\}``, which is called the **multinomial distribution**, - -```math -p(D_m|\mu) =\frac{N!}{m_1! m_2!\ldots m_K!} \,\prod_k \mu_k^{m_k}\,. -``` - -""" - -# ╔═╡ d84422a6-d294-11ef-148b-c762a90cd620 -md""" -(We insert this slide only to alert you to the difference between using one-hot encoded outcomes ``D=\{x_1,x_2,\ldots,x_N\}`` as the data, versus using counts ``D_m = \{m_1,m_2,\ldots,m_K\}`` as the data. When used as a likelihood function for ``\mu``, it makes no difference whether you use ``p(D|\mu)`` or ``p(D_m|\mu)``.) - -""" - -# ╔═╡ d8449f1a-d294-11ef-3cfa-4fc33a5daa00 -md""" -## Maximum Likelihood Estimation for the Multinomial - -#### Maximum likelihood as a special case of Bayesian estimation - -We can obtain the maximum likelihood estimate for ``\mu_k`` based on ``N`` throws of a ``K``-sided die within the Bayesian framework by letting the prior for ``\mu`` approach a uniform distribution. For a Dirichlet prior ``\mathrm{Dir}(\mu | \alpha)``, this corresponds to setting -``\alpha \rightarrow (1, 1, \dots, 1)``. - - -Prove for yourself that - -```math -\begin{align*} -\hat{\mu}_k &= \arg\max_{\mu_k} p(D|\mu) = \frac{m_k}{N}\,. -\end{align*} -``` - -""" - -# ╔═╡ 4482e857-af6b-4459-a0a2-cd7ad57ed94f -hide_proof( -md""" -```math -\begin{align*} -\hat{\mu}_k &= \arg\max_{\mu_k} p(D|\mu) \\ -&= \arg\max_{\mu_k} p(D|\mu) \cdot \underbrace{\left.\mathrm{Dir}(\mu|\alpha)\right|_{\alpha=(1,1,\ldots,1)}}_{\text{uniform distr.}} \\ -&= \arg\max_{\mu_k} \left.p(\mu|D,\alpha)\right|_{\alpha=(1,1,\ldots,1)} \\ -&= \arg\max_{\mu_k} \left.\mathrm{Dir}\left( \mu | m + \alpha \right)\right|_{\alpha=(1,1,\ldots,1)} \\ -&= \frac{m_k}{\sum_k m_k} = \frac{m_k}{N} -\end{align*} -``` - -where we used the fact that the [maximum of the Dirichlet distribution](https://en.wikipedia.org/wiki/Dirichlet_distribution#Mode) ``\mathrm{Dir}(\{\alpha_1,\ldots,\alpha_K\})`` is obtained at ``(\alpha_k-1)/(\sum_k\alpha_k - K)``. - - """) - -# ╔═╡ d844bcfa-d294-11ef-0874-b154f3ed810b -md""" -#### $(HTML("Maximum likelihood estimation by optimizing a constrained log-likelihood")) - -Of course, we shouldn't have to go through the full Bayesian framework to get the maximum likelihood estimate. Alternatively, we can find the maximum likelihood (ML) solution directly by optimizing the (constrained) log-likelihood. - -The log-likelihood for the multinomial distribution is given by - -```math -\begin{align*} -\mathrm{L}(\mu) &\triangleq \log p(D_m|\mu) \propto \log \prod_k \mu_k^{m_k} = \sum_k m_k \log \mu_k -\end{align*} -``` - -""" - -# ╔═╡ d844d564-d294-11ef-0454-416352d43524 -md""" -When doing ML estimation, we must obey the constraint ``\sum_k \mu_k = 1``, which can be accomplished by a [Lagrange multiplier](https://en.wikipedia.org/wiki/Lagrange_multiplier). The **constrained log-likelihood** with Lagrange multiplier is then - -```math -\tilde{\mathrm{L}}(\mu) = \sum_k m_k \log \mu_k + \lambda \cdot \big(1 - \sum_k \mu_k \big) -``` - -The method of Lagrange multipliers is a mathematical method for transforming a constrained optimization problem to an unconstrained optimization problem (see [Bishop App.E](https://www.microsoft.com/en-us/research/wp-content/uploads/2006/01/Bishop-Pattern-Recognition-and-Machine-Learning-2006.pdf#page=727)). Unconstrained optimization problems can be solved by setting the derivative to zero. - -""" - -# ╔═╡ d844fa76-d294-11ef-172a-85e68842c252 -md""" -Setting the derivative of ``\tilde{\mathrm{L}}(\mu)`` to zero yields the **sample proportion** for ``\mu_k`` - -```math -\begin{equation*} -\nabla_{\mu_k} \tilde{\mathrm{L}}(\mu) = \frac{m_k } -{\hat\mu_k } - \lambda \overset{!}{=} 0 \; \Rightarrow \; \hat\mu_k = \frac{m_k }{N} -\end{equation*} -``` - -where we get ``\lambda`` from the constraint - -```math -\begin{equation*} -\sum_k \hat \mu_k = \sum_k \frac{m_k} -{\lambda} = \frac{N}{\lambda} \overset{!}{=} 1 -\end{equation*} -``` - - - -""" - -# ╔═╡ 63cc56b7-588a-43c3-8327-ad6367608601 -md""" -# Summary -""" - -# ╔═╡ acdc5bfa-7188-4a37-80e6-5026ecd1a813 -keyconceptsummary() - -# ╔═╡ 204bec3f-6fde-48c1-b2b6-9f88d484c130 -exercises(header_level=1) - -# ╔═╡ 62b42d1d-be91-4740-bac6-b4527494959d -md""" - -#### Maximum Likelihood estimation (**) - -We consider IID data ``D = \{x_1,x_2,\ldots,x_N\}`` obtained from tossing a ``K``-sided die. We use a *binary selection variable* - -```math -x_{nk} \equiv \begin{cases} 1 & \text{if $x_n$ lands on $k$-th face}\\ - 0 & \text{otherwise} -\end{cases} -``` - -with probabilities ``p(x_{nk} = 1)=\mu_k``. - -- (a) Derive the log-likelihood ``\log p(D|\mu)``. -- (b) Derive the maximum likelihood estimate for ``\mu``. - -""" - -# ╔═╡ 01c4c590-fece-49a5-8979-6e0d54f7850a -hide_solution( -md""" -Derivations are in the lecture notes. - -- (a) - - -```math -p(x_n|\mu) = \prod_k \mu_k^{x_{nk}} \quad \text{subject to} \quad \sum_k \mu_k = 1 \,. -``` - -```math -p(D|\mu) = \sum_k m_k \log \mu_k -``` - -where ``m_k = \sum_n x_{nk}``. - -- (b) - - -```math -\hat \mu = \frac{m_k}{N}\,, -``` - -which is the *sample proportion*. -""") - -# ╔═╡ d8443e38-d294-11ef-25db-b16df87850f4 -md""" -#### Discrete Distributions (*) - -Show that - -- (a) the categorial distribution is a special case of the multinomial for ``N=1``. - -- (b) the Bernoulli is a special case of the categorial distribution for ``K=2``. - -- (c) the binomial is a special case of the multinomial for ``K=2``. - -""" - -# ╔═╡ 448d0679-b47a-4db9-ad7d-a45786350fef -hide_solution( -md""" - -- (a) The probability mass function of a **multinomial distribution** is -```math - p(D_m|\mu) =\frac{N!}{m_1! m_2!\ldots m_K!} \,\prod_k \mu_k^{m_k} -``` -over the data frequencies ``D_m=\{m_1,\ldots,m_K\}`` with constraints that ``\sum_k \mu_k = 1`` and ``\sum_k m_k=N``. - -Setting ``N=1``, we see that ``p(D_m|\mu) \propto \prod_k \mu_k^{m_k}`` with ``\sum_k m_k=1``, making the sample-space one-hot coded. This is the **categorical distribution**. - -- (b) When ``K=2``, the constraint for the categorical distribution takes the form ``m_1=1-m_2`` leading to - -```math - p(D_m|\mu) \propto \mu_1^{m_1}(1-\mu_1)^{1-m_1} -``` -which is associated with the **Bernoulli distribution**. - -- (c) Plugging ``K=2`` into the multinomial distribution leads to ``p(D_m|\mu) =\frac{N!}{m_1! m_2!}\mu_1^{m_1}\left(\mu_2^{m_2}\right)`` with the constraints ``m_1+m_2=N`` and ``\mu_1+\mu_2=1``. Then plugging the constraints back in we obtain -```math - p(D_m|\mu) = \frac{N!}{m_1! (N-m1)!}\mu_1^{m_1}\left(1-\mu_1\right)^{N-m_1} -``` -which is the **binomial distribution**. - - -""") - -# ╔═╡ 72f24b54-ab22-4a54-9ece-7433048f4769 -md""" - -#### Laplace's Generalized Rule of Succession (**) - -Show that Laplace's generalized rule of succession can be worked out to a prediction that is composed of a prior prediction and data-based correction term. - - -""" - -# ╔═╡ 3c2ee96d-18a6-45d0-a2cf-f2ebbf5e22f0 -hide_solution( -md""" - -```math -\begin{align*} -p(&x_{\bullet,k}=1|D) = \frac{m_k + \alpha_k }{ N+ \sum_k \alpha_k} \\ -&= \frac{m_k}{N+\sum_k \alpha_k} + \frac{\alpha_k}{N+\sum_k \alpha_k}\\ -&= \frac{m_k}{N+\sum_k \alpha_k} \cdot \frac{N}{N} + \frac{\alpha_k}{N+\sum_k \alpha_k}\cdot \frac{\sum_k \alpha_k}{\sum_k\alpha_k} \\ -&= \frac{N}{N+\sum_k \alpha_k} \cdot \frac{m_k}{N} + \frac{\sum_k \alpha_k}{N+\sum_k \alpha_k} \cdot \frac{\alpha_k}{\sum_k\alpha_k} \\ -&= \frac{N}{N+\sum_k \alpha_k} \cdot \frac{m_k}{N} + \bigg( \frac{\sum_k \alpha_k}{N+\sum_k \alpha_k} + \underbrace{\frac{N}{N+\sum_k \alpha_k} - \frac{N}{N+\sum_k \alpha_k}}_{0}\bigg) \cdot \frac{\alpha_k}{\sum_k\alpha_k} \\ -&= \frac{N}{N+\sum_k \alpha_k} \cdot \frac{m_k}{N} + \bigg( 1 - \frac{N}{N+\sum_k \alpha_k}\bigg) \cdot \frac{\alpha_k}{\sum_k\alpha_k} \\ -&= \underbrace{\frac{\alpha_k}{\sum_k\alpha_k}}_{\text{prior prediction}} + \underbrace{\frac{N}{N+\sum_k \alpha_k} \cdot \underbrace{\left(\frac{m_k}{N} - \frac{\alpha_k}{\sum_k\alpha_k}\right)}_{\text{prediction error}}}_{\text{data-based correction}} -\end{align*} -``` - -(If you know how to do it shorter and more elegantly, please post in Piazza.) - -This decomposition is the natural consequence of doing Bayesian estimation, which always involves a prior-based prediction term and a likelihood-based (or data-based) correction term that can be interpreted as a (precision-weighted) prediction error. - - """) - -# ╔═╡ 93b8ac65-ac41-4a03-bddd-5f01ccb5b42d -md""" - -#### Evidence for the Multinomial-Dirichlet model (**) - -As above, consider the following model assumptions for $N$ tosses with a $K$-sided die with parameters $\mu = (\mu_1,\mu_2, \ldots,\mu_K)$. - -```math -\begin{align} -p(D|\mu) &= \prod_{n=1}^N \mathrm{Cat}(x_n|\mu) = \prod_{k=1}^{K} \mu_k^{m_k} \tag{likelihood}\\ -p(\mu|\alpha) &= \mathrm{Dir}(\mu|\alpha) = \frac{1}{B(\alpha)} \prod_{k=1}^{K} \mu_k^{\alpha_k -1} \tag{prior} -\end{align} -``` -where $B(\alpha) = \frac{\prod_k \Gamma(\alpha_k)}{\Gamma(\sum_k \alpha_k)}$ is known as the [Beta function](https://en.wikipedia.org/wiki/Beta_function). - -Work out both the model evidence and the posterior distribution for $\mu$. -""" - -# ╔═╡ 81b5aea0-8101-46e2-a875-1058029ebf99 -hide_solution( - md""" - - ```math - \begin{align} - \overbrace{\prod_{k=1}^{K} \mu_k^{m_k}}^{\text{likelihood }p(D|\mu)} \cdot \overbrace{\frac{1}{B(\alpha)} \prod_{k=1}^{K} \mu_k^{\alpha_k -1}}^{\text{prior }p(\mu|\alpha)} - &= \frac{1}{B(\alpha)} \prod_{k=1}^{K} \mu_k^{m_k + \alpha_k -1} \\ - &= \frac{B(m+\alpha)}{B(\alpha)} \frac{1}{B(m+\alpha)}\prod_{k=1}^{K} \mu_k^{m_k + \alpha_k -1} \\ - &= \underbrace{\frac{B(m+\alpha)}{B(\alpha)}}_{\text{evidence }p(D|\alpha)} \,\underbrace{\mathrm{Dir}(\mu|m+\alpha)}_{\text{posterior }p(\mu|D,\alpha)} - \end{align} - ``` - - This equation is the equivalent of the [Gaussian multiplication formula](https://bmlip.github.io/course/lectures/The%20Gaussian%20Distribution.html#(Multivariate)-Gaussian-Multiplication) for discrete data. Note that the evidence is a scalar normalizer for given observations $m$ and pseudo-observations ("prior" observations) $\alpha$. - """) - -# ╔═╡ 59fb1e66-cf05-4f2b-8027-7ff3b1a57c15 -md""" -# Code -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000001 -PLUTO_PROJECT_TOML_CONTENTS = """ -[deps] -BmlipTeachingTools = "656a7065-6f73-6c65-7465-6e646e617262" - -[compat] -BmlipTeachingTools = "~1.3.1" -""" - -# ╔═╡ 00000000-0000-0000-0000-000000000002 -PLUTO_MANIFEST_TOML_CONTENTS = """ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.12.1" -manifest_format = "2.0" -project_hash = "3e0db0a10f1d7687b8c53fc91306ce22ead0cdba" - -[[deps.AbstractPlutoDingetjes]] -deps = ["Pkg"] -git-tree-sha1 = "6e1d2a35f2f90a4bc7c2ed98079b2ba09c35b83a" -uuid = "6e696c72-6542-2067-7265-42206c756150" -version = "1.3.2" - -[[deps.ArgTools]] -uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.2" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -version = "1.11.0" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -version = "1.11.0" - -[[deps.BmlipTeachingTools]] -deps = ["HypertextLiteral", "InteractiveUtils", "Markdown", "PlutoTeachingTools", "PlutoUI", "Reexport"] -git-tree-sha1 = "806eadb642467b05f9d930f0d127f1e6fa5130f0" -uuid = "656a7065-6f73-6c65-7465-6e646e617262" -version = "1.3.1" - -[[deps.ColorTypes]] -deps = ["FixedPointNumbers", "Random"] -git-tree-sha1 = "67e11ee83a43eb71ddc950302c53bf33f0690dfe" -uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -version = "0.12.1" -weakdeps = ["StyledStrings"] - - [deps.ColorTypes.extensions] - StyledStringsExt = "StyledStrings" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.3.0+1" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -version = "1.11.0" - -[[deps.Downloads]] -deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] -uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -version = "1.6.0" - -[[deps.FileWatching]] -uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" -version = "1.11.0" - -[[deps.FixedPointNumbers]] -deps = ["Statistics"] -git-tree-sha1 = "05882d6995ae5c12bb5f36dd2ed3f61c98cbb172" -uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" -version = "0.8.5" - -[[deps.Format]] -git-tree-sha1 = "9c68794ef81b08086aeb32eeaf33531668d5f5fc" -uuid = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8" -version = "1.3.7" - -[[deps.Ghostscript_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Zlib_jll"] -git-tree-sha1 = "38044a04637976140074d0b0621c1edf0eb531fd" -uuid = "61579ee1-b43e-5ca0-a5da-69d92c66a64b" -version = "9.55.1+0" - -[[deps.Hyperscript]] -deps = ["Test"] -git-tree-sha1 = "179267cfa5e712760cd43dcae385d7ea90cc25a4" -uuid = "47d2ed2b-36de-50cf-bf87-49c2cf4b8b91" -version = "0.0.5" - -[[deps.HypertextLiteral]] -deps = ["Tricks"] -git-tree-sha1 = "7134810b1afce04bbc1045ca1985fbe81ce17653" -uuid = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2" -version = "0.9.5" - -[[deps.IOCapture]] -deps = ["Logging", "Random"] -git-tree-sha1 = "b6d6bfdd7ce25b0f9b2f6b3dd56b2673a66c8770" -uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" -version = "0.2.5" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -version = "1.11.0" - -[[deps.JLLWrappers]] -deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "0533e564aae234aff59ab625543145446d8b6ec2" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.7.1" - -[[deps.JSON]] -deps = ["Dates", "Mmap", "Parsers", "Unicode"] -git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" -uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.21.4" - -[[deps.JpegTurbo_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "4255f0032eafd6451d707a51d5f0248b8a165e4d" -uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "3.1.3+0" - -[[deps.JuliaSyntaxHighlighting]] -deps = ["StyledStrings"] -uuid = "ac6e5ff7-fb65-4e79-a425-ec3bc9c03011" -version = "1.12.0" - -[[deps.LaTeXStrings]] -git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" -uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.4.0" - -[[deps.Latexify]] -deps = ["Format", "Ghostscript_jll", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Requires"] -git-tree-sha1 = "44f93c47f9cd6c7e431f2f2091fcba8f01cd7e8f" -uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" -version = "0.16.10" - - [deps.Latexify.extensions] - DataFramesExt = "DataFrames" - SparseArraysExt = "SparseArrays" - SymEngineExt = "SymEngine" - TectonicExt = "tectonic_jll" - - [deps.Latexify.weakdeps] - DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - SymEngine = "123dc426-2d89-5057-bbad-38513e3affd8" - tectonic_jll = "d7dd28d6-a5e6-559c-9131-7eb760cdacc5" - -[[deps.LibCURL]] -deps = ["LibCURL_jll", "MozillaCACerts_jll"] -uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.4" - -[[deps.LibCURL_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll", "Zlib_jll", "nghttp2_jll"] -uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.11.1+1" - -[[deps.LibGit2]] -deps = ["LibGit2_jll", "NetworkOptions", "Printf", "SHA"] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -version = "1.11.0" - -[[deps.LibGit2_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll"] -uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.9.0+0" - -[[deps.LibSSH2_jll]] -deps = ["Artifacts", "Libdl", "OpenSSL_jll"] -uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.11.3+1" - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -version = "1.11.0" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -version = "1.12.0" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -version = "1.11.0" - -[[deps.MIMEs]] -git-tree-sha1 = "c64d943587f7187e751162b3b84445bbbd79f691" -uuid = "6c6e2e6c-3030-632d-7369-2d6c69616d65" -version = "1.1.0" - -[[deps.MacroTools]] -git-tree-sha1 = "1e0228a030642014fe5cfe68c2c0a818f9e3f522" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.16" - -[[deps.Markdown]] -deps = ["Base64", "JuliaSyntaxHighlighting", "StyledStrings"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -version = "1.11.0" - -[[deps.Mmap]] -uuid = "a63ad114-7e13-5084-954f-fe012c677804" -version = "1.11.0" - -[[deps.MozillaCACerts_jll]] -uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2025.5.20" - -[[deps.NetworkOptions]] -uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -version = "1.3.0" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.29+0" - -[[deps.OpenSSL_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "3.5.1+0" - -[[deps.OrderedCollections]] -git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.8.1" - -[[deps.Parsers]] -deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "7d2f8f21da5db6a806faf7b9b292296da42b2810" -uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.8.3" - -[[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.12.0" - - [deps.Pkg.extensions] - REPLExt = "REPL" - - [deps.Pkg.weakdeps] - REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" - -[[deps.PlutoTeachingTools]] -deps = ["Downloads", "HypertextLiteral", "Latexify", "Markdown", "PlutoUI"] -git-tree-sha1 = "dacc8be63916b078b592806acd13bb5e5137d7e9" -uuid = "661c6b06-c737-4d37-b85c-46df65de6f69" -version = "0.4.6" - -[[deps.PlutoUI]] -deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "Downloads", "FixedPointNumbers", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "MIMEs", "Markdown", "Random", "Reexport", "URIs", "UUIDs"] -git-tree-sha1 = "3faff84e6f97a7f18e0dd24373daa229fd358db5" -uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" -version = "0.7.73" - -[[deps.PrecompileTools]] -deps = ["Preferences"] -git-tree-sha1 = "07a921781cab75691315adc645096ed5e370cb77" -uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.3.3" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "0f27480397253da18fe2c12a4ba4eb9eb208bf3d" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.5.0" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -version = "1.11.0" - -[[deps.Random]] -deps = ["SHA"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -version = "1.11.0" - -[[deps.Reexport]] -git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" -uuid = "189a3867-3050-52da-a836-e630ba90ab69" -version = "1.2.2" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.1" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -version = "1.11.0" - -[[deps.Statistics]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.11.1" - - [deps.Statistics.extensions] - SparseArraysExt = ["SparseArrays"] - - [deps.Statistics.weakdeps] - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - -[[deps.StyledStrings]] -uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b" -version = "1.11.0" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[deps.Tar]] -deps = ["ArgTools", "SHA"] -uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.0" - -[[deps.Test]] -deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] -uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -version = "1.11.0" - -[[deps.Tricks]] -git-tree-sha1 = "372b90fe551c019541fafc6ff034199dc19c8436" -uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" -version = "0.1.12" - -[[deps.URIs]] -git-tree-sha1 = "bef26fb046d031353ef97a82e3fdb6afe7f21b1a" -uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -version = "1.6.1" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -version = "1.11.0" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -version = "1.11.0" - -[[deps.Zlib_jll]] -deps = ["Libdl"] -uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.3.1+2" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.15.0+0" - -[[deps.nghttp2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.64.0+1" - -[[deps.p7zip_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.5.0+2" -""" - -# ╔═╡ Cell order: -# ╟─d8422bf2-d294-11ef-0144-098f414c6454 -# ╟─1c6d16be-e8e8-45f1-aa32-c3fb08af19ce -# ╟─d8424e52-d294-11ef-0083-fbb77df4d853 -# ╟─d842ad86-d294-11ef-3266-253f80ecf4b7 -# ╟─d842d368-d294-11ef-024d-45e58ca994e0 -# ╟─f9977fc0-0d3f-467e-822d-72f3a338f717 -# ╟─d842fe4c-d294-11ef-15a9-a9a6e359f47d -# ╟─d843540a-d294-11ef-3846-2bf27b7e9b30 -# ╟─d84369a4-d294-11ef-38f7-7f393869b705 -# ╟─d8439866-d294-11ef-230b-dfde21aedfbf -# ╟─d843a338-d294-11ef-2748-b95f2af1396b -# ╟─d843b33c-d294-11ef-195d-2708fbfba49d -# ╟─d843c228-d294-11ef-0d34-3520dc97859c -# ╟─d843d0c4-d294-11ef-10b6-cb982615d58a -# ╟─d843defc-d294-11ef-358b-f56f514dcf93 -# ╟─d843efdc-d294-11ef-0f3a-630ecdd0acee -# ╟─d84422a6-d294-11ef-148b-c762a90cd620 -# ╟─d8449f1a-d294-11ef-3cfa-4fc33a5daa00 -# ╟─4482e857-af6b-4459-a0a2-cd7ad57ed94f -# ╟─d844bcfa-d294-11ef-0874-b154f3ed810b -# ╟─d844d564-d294-11ef-0454-416352d43524 -# ╟─d844fa76-d294-11ef-172a-85e68842c252 -# ╟─63cc56b7-588a-43c3-8327-ad6367608601 -# ╟─acdc5bfa-7188-4a37-80e6-5026ecd1a813 -# ╟─204bec3f-6fde-48c1-b2b6-9f88d484c130 -# ╟─62b42d1d-be91-4740-bac6-b4527494959d -# ╟─01c4c590-fece-49a5-8979-6e0d54f7850a -# ╟─d8443e38-d294-11ef-25db-b16df87850f4 -# ╟─448d0679-b47a-4db9-ad7d-a45786350fef -# ╟─72f24b54-ab22-4a54-9ece-7433048f4769 -# ╟─3c2ee96d-18a6-45d0-a2cf-f2ebbf5e22f0 -# ╟─93b8ac65-ac41-4a03-bddd-5f01ccb5b42d -# ╟─81b5aea0-8101-46e2-a875-1058029ebf99 -# ╟─59fb1e66-cf05-4f2b-8027-7ff3b1a57c15 -# ╠═d3a4a1dc-3fdf-479d-a51c-a1e23073c556 -# ╟─00000000-0000-0000-0000-000000000001 -# ╟─00000000-0000-0000-0000-000000000002