Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lf28 committed Nov 22, 2022
1 parent c6f5e4b commit 7fe8344
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 42 deletions.
22 changes: 11 additions & 11 deletions section0_julia.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### A Pluto.jl notebook ###
# v0.19.11
# v0.19.14

using Markdown
using InteractiveUtils
Expand Down Expand Up @@ -639,10 +639,10 @@ To plot a series of `sin` functions with different frequencies: ``\sin(k x)``

# ╔═╡ 8416fec3-5460-441a-b415-40d04075ccf3
let
plt = plot(-π: 0.01: π, sin, xlabel="x", ylabel="sin(x)", label="sin(x)", lw=1.5, legend=:outerbottom)
plt = plot(-π: 0.01: π, sin, xlabel=L"x", ylabel=L"\sin(x)", label=L"\sin(x)", lw=1.5, legend=:outerbottom)

for k in [2, 3]
plot!(-π: 0.01: π, (x) -> sin(k*x), label="sin($(k)x)", lw=1.5)
plot!(-π: 0.01: π, (x) -> sin(k*x), label=L"\sin(%$(k)x)", lw=1.5)
end
plt
end
Expand Down Expand Up @@ -704,7 +704,7 @@ let
xs = -π : 0.1: π
f, ∇f = sin, cos
anim = @animate for Δx in π:-0.1:0.0
plot(xs, sin, label="f(x)", ylim = [-1.5, 1.5], xlabel=L"x", lw=2, legend=:topleft)
plot(xs, sin, label=L"f(x)", ylim = [-1.5, 1.5], xlabel=L"x", lw=2, legend=:topleft)
df = f(x₀ + Δx)-f(x₀)
k = Δx == 0 ? ∇f(x₀) : df/Δx
b = f(x₀) - k * x₀
Expand Down Expand Up @@ -801,7 +801,7 @@ StatsPlots = "~0.15.1"
PLUTO_MANIFEST_TOML_CONTENTS = """
# This file is machine-generated - editing it directly is not advised
julia_version = "1.8.1"
julia_version = "1.8.2"
manifest_format = "2.0"
project_hash = "eecf0cae6fc8c0adb32e2f7d29a05c28aed97e5c"
Expand Down Expand Up @@ -1027,9 +1027,9 @@ version = "0.4.1"
[[deps.FFMPEG_jll]]
deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"]
git-tree-sha1 = "40c63abc94311b4e2bff4cd9a6a59bda1873c95b"
git-tree-sha1 = "74faea50c1d007c85837327f6775bea60b5492dd"
uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5"
version = "4.4.2+1"
version = "4.4.2+2"
[[deps.FFTW]]
deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"]
Expand Down Expand Up @@ -1546,9 +1546,9 @@ uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
[[deps.Qt5Base_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "xkbcommon_jll"]
git-tree-sha1 = "c6c0f690d0cc7caddb74cef7aa847b824a16b256"
git-tree-sha1 = "0c03844e2231e12fda4d0086fd7cbe4098ee8dc5"
uuid = "ea2cea3b-5b76-57ae-a6ef-0a8af62496e1"
version = "5.15.3+1"
version = "5.15.3+2"
[[deps.QuadGK]]
deps = ["DataStructures", "LinearAlgebra"]
Expand Down Expand Up @@ -1738,7 +1738,7 @@ version = "1.7.0"
[[deps.Tar]]
deps = ["ArgTools", "SHA"]
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
version = "1.10.0"
version = "1.10.1"
[[deps.TensorCore]]
deps = ["LinearAlgebra"]
Expand Down Expand Up @@ -2121,7 +2121,7 @@ version = "1.4.1+0"
# ╟─56961f01-40b2-4a18-90a2-a0ebeeebd16c
# ╠═e65a6edb-12ab-44c4-a1ff-94a457583c49
# ╟─c8ab39c8-a3e0-4ef5-8a47-365b5c484042
# ╟─9f420af3-f080-411d-bc14-e2e45572ac77
# ╠═9f420af3-f080-411d-bc14-e2e45572ac77
# ╟─da4fb082-1f42-41ac-a0eb-55a087b4b4a5
# ╠═d0646d89-64a4-4eb3-8739-2cac268abcf3
# ╟─a5212ff7-0416-440d-8ad6-9b6e0ac35a8d
Expand Down
10 changes: 5 additions & 5 deletions section1_introduction.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### A Pluto.jl notebook ###
# v0.19.11
# v0.19.14

using Markdown
using InteractiveUtils
Expand Down Expand Up @@ -895,7 +895,7 @@ StatsPlots = "~0.14.34"
PLUTO_MANIFEST_TOML_CONTENTS = """
# This file is machine-generated - editing it directly is not advised
julia_version = "1.8.1"
julia_version = "1.8.2"
manifest_format = "2.0"
project_hash = "ce70ec3d65e8ec0ccfd0a42d75cc8637eff8925b"
Expand Down Expand Up @@ -1622,9 +1622,9 @@ uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
[[deps.Qt5Base_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "xkbcommon_jll"]
git-tree-sha1 = "c6c0f690d0cc7caddb74cef7aa847b824a16b256"
git-tree-sha1 = "0c03844e2231e12fda4d0086fd7cbe4098ee8dc5"
uuid = "ea2cea3b-5b76-57ae-a6ef-0a8af62496e1"
version = "5.15.3+1"
version = "5.15.3+2"
[[deps.QuadGK]]
deps = ["DataStructures", "LinearAlgebra"]
Expand Down Expand Up @@ -1809,7 +1809,7 @@ version = "1.7.0"
[[deps.Tar]]
deps = ["ArgTools", "SHA"]
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
version = "1.10.0"
version = "1.10.1"
[[deps.TensorCore]]
deps = ["LinearAlgebra"]
Expand Down
21 changes: 13 additions & 8 deletions section5_regressions.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### A Pluto.jl notebook ###
# v0.19.11
# v0.19.14

using Markdown
using InteractiveUtils
Expand Down Expand Up @@ -1234,7 +1234,7 @@ Turing = "~0.21.9"
PLUTO_MANIFEST_TOML_CONTENTS = """
# This file is machine-generated - editing it directly is not advised
julia_version = "1.8.0"
julia_version = "1.8.2"
manifest_format = "2.0"
project_hash = "8d2af6f085a0ecd672124f45c5d4ae9bb678b37a"
Expand Down Expand Up @@ -1631,10 +1631,10 @@ uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a"
version = "0.4.1"
[[deps.FFMPEG_jll]]
deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"]
git-tree-sha1 = "ccd479984c7838684b3ac204b716c89955c76623"
deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"]
git-tree-sha1 = "74faea50c1d007c85837327f6775bea60b5492dd"
uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5"
version = "4.4.2+0"
version = "4.4.2+2"
[[deps.FFTW]]
deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"]
Expand Down Expand Up @@ -2210,6 +2210,11 @@ git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.4.1"
[[deps.PCRE2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15"
version = "10.40.0+0"
[[deps.PCRE_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "b2a7af664e098055a7529ad1a900ded962bca488"
Expand Down Expand Up @@ -2299,9 +2304,9 @@ version = "1.7.2"
[[deps.Qt5Base_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "xkbcommon_jll"]
git-tree-sha1 = "c6c0f690d0cc7caddb74cef7aa847b824a16b256"
git-tree-sha1 = "0c03844e2231e12fda4d0086fd7cbe4098ee8dc5"
uuid = "ea2cea3b-5b76-57ae-a6ef-0a8af62496e1"
version = "5.15.3+1"
version = "5.15.3+2"
[[deps.QuadGK]]
deps = ["DataStructures", "LinearAlgebra"]
Expand Down Expand Up @@ -2554,7 +2559,7 @@ version = "1.7.0"
[[deps.Tar]]
deps = ["ArgTools", "SHA"]
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
version = "1.10.0"
version = "1.10.1"
[[deps.TensorCore]]
deps = ["LinearAlgebra"]
Expand Down
23 changes: 14 additions & 9 deletions section6_logistic_regression.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### A Pluto.jl notebook ###
# v0.19.11
# v0.19.14

using Markdown
using InteractiveUtils
Expand Down Expand Up @@ -81,7 +81,7 @@ Note that no matter what the input is, the output is always between 0 and 1, whi
# ╔═╡ 793a70b2-af69-4b4c-b4c0-8eef3b4654e9
md"""
To put above steps together, we have the frequentist's probabilistic model for logistic regression:
To put the above steps together, we have the frequentist's probabilistic model for logistic regression:
!!! information "Logistic regression"
Expand Down Expand Up @@ -571,7 +571,7 @@ Turing = "~0.21.9"
PLUTO_MANIFEST_TOML_CONTENTS = """
# This file is machine-generated - editing it directly is not advised
julia_version = "1.8.0"
julia_version = "1.8.2"
manifest_format = "2.0"
project_hash = "50f4d97c12c5e4fcbfdd0d0aab004e966888a69b"
Expand Down Expand Up @@ -979,10 +979,10 @@ uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a"
version = "0.4.1"
[[deps.FFMPEG_jll]]
deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"]
git-tree-sha1 = "ccd479984c7838684b3ac204b716c89955c76623"
deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"]
git-tree-sha1 = "74faea50c1d007c85837327f6775bea60b5492dd"
uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5"
version = "4.4.2+0"
version = "4.4.2+2"
[[deps.FFTW]]
deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"]
Expand Down Expand Up @@ -1570,6 +1570,11 @@ git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.4.1"
[[deps.PCRE2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15"
version = "10.40.0+0"
[[deps.PCRE_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "b2a7af664e098055a7529ad1a900ded962bca488"
Expand Down Expand Up @@ -1659,9 +1664,9 @@ version = "1.7.2"
[[deps.Qt5Base_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "xkbcommon_jll"]
git-tree-sha1 = "c6c0f690d0cc7caddb74cef7aa847b824a16b256"
git-tree-sha1 = "0c03844e2231e12fda4d0086fd7cbe4098ee8dc5"
uuid = "ea2cea3b-5b76-57ae-a6ef-0a8af62496e1"
version = "5.15.3+1"
version = "5.15.3+2"
[[deps.QuadGK]]
deps = ["DataStructures", "LinearAlgebra"]
Expand Down Expand Up @@ -1926,7 +1931,7 @@ version = "1.7.0"
[[deps.Tar]]
deps = ["ArgTools", "SHA"]
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
version = "1.10.0"
version = "1.10.1"
[[deps.TensorCore]]
deps = ["LinearAlgebra"]
Expand Down
23 changes: 14 additions & 9 deletions section8_nonlinear.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### A Pluto.jl notebook ###
# v0.19.11
# v0.19.15

using Markdown
using InteractiveUtils
Expand Down Expand Up @@ -187,7 +187,7 @@ Compared with the polynomial basis functions which are *global* functions, the l
begin
plt_poly_basis = plot(title="Polynomial basis functions")
for k in 1:10
plot!(-1:0.01:1, (x) -> x^k, label="")
plot!(-1:0.05:1, (x) -> x^k, label="")
end


Expand Down Expand Up @@ -935,7 +935,7 @@ Turing = "~0.21.10"
PLUTO_MANIFEST_TOML_CONTENTS = """
# This file is machine-generated - editing it directly is not advised
julia_version = "1.8.0"
julia_version = "1.8.2"
manifest_format = "2.0"
project_hash = "501ffe42f70684df02e7d0563b10de854bdaffd3"
Expand Down Expand Up @@ -1343,10 +1343,10 @@ uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a"
version = "0.4.1"
[[deps.FFMPEG_jll]]
deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"]
git-tree-sha1 = "ccd479984c7838684b3ac204b716c89955c76623"
deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"]
git-tree-sha1 = "74faea50c1d007c85837327f6775bea60b5492dd"
uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5"
version = "4.4.2+0"
version = "4.4.2+2"
[[deps.FFTW]]
deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"]
Expand Down Expand Up @@ -1940,6 +1940,11 @@ git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.4.1"
[[deps.PCRE2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15"
version = "10.40.0+0"
[[deps.PCRE_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "b2a7af664e098055a7529ad1a900ded962bca488"
Expand Down Expand Up @@ -2029,9 +2034,9 @@ version = "1.7.2"
[[deps.Qt5Base_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "xkbcommon_jll"]
git-tree-sha1 = "c6c0f690d0cc7caddb74cef7aa847b824a16b256"
git-tree-sha1 = "0c03844e2231e12fda4d0086fd7cbe4098ee8dc5"
uuid = "ea2cea3b-5b76-57ae-a6ef-0a8af62496e1"
version = "5.15.3+1"
version = "5.15.3+2"
[[deps.QuadGK]]
deps = ["DataStructures", "LinearAlgebra"]
Expand Down Expand Up @@ -2302,7 +2307,7 @@ version = "1.7.0"
[[deps.Tar]]
deps = ["ArgTools", "SHA"]
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
version = "1.10.0"
version = "1.10.1"
[[deps.TensorCore]]
deps = ["LinearAlgebra"]
Expand Down

0 comments on commit 7fe8344

Please sign in to comment.