diff --git a/_freeze/schedule/slides/00-quiz-0-wrap/execute-results/html.json b/_freeze/schedule/slides/00-quiz-0-wrap/execute-results/html.json new file mode 100644 index 0000000..39b2ad7 --- /dev/null +++ b/_freeze/schedule/slides/00-quiz-0-wrap/execute-results/html.json @@ -0,0 +1,20 @@ +{ + "hash": "00096b6cfd1ad274a2aab231017fbef6", + "result": { + "markdown": "---\nlecture: \"00 Quiz 0 fun\"\nformat: revealjs\nmetadata-files: \n - _metadata.yml\n---\n---\n---\n\n## {{< meta lecture >}} {.large background-image=\"gfx/smooths.svg\" background-opacity=\"0.3\"}\n\n[Stat 406]{.secondary}\n\n[{{< meta author >}}]{.secondary}\n\nLast modified -- 13 September 2023\n\n\n\n$$\n\\DeclareMathOperator*{\\argmin}{argmin}\n\\DeclareMathOperator*{\\argmax}{argmax}\n\\DeclareMathOperator*{\\minimize}{minimize}\n\\DeclareMathOperator*{\\maximize}{maximize}\n\\DeclareMathOperator*{\\find}{find}\n\\DeclareMathOperator{\\st}{subject\\,\\,to}\n\\newcommand{\\E}{E}\n\\newcommand{\\Expect}[1]{\\E\\left[ #1 \\right]}\n\\newcommand{\\Var}[1]{\\mathrm{Var}\\left[ #1 \\right]}\n\\newcommand{\\Cov}[2]{\\mathrm{Cov}\\left[#1,\\ #2\\right]}\n\\newcommand{\\given}{\\ \\vert\\ }\n\\newcommand{\\X}{\\mathbf{X}}\n\\newcommand{\\x}{\\mathbf{x}}\n\\newcommand{\\y}{\\mathbf{y}}\n\\newcommand{\\P}{\\mathcal{P}}\n\\newcommand{\\R}{\\mathbb{R}}\n\\newcommand{\\norm}[1]{\\left\\lVert #1 \\right\\rVert}\n\\newcommand{\\snorm}[1]{\\lVert #1 \\rVert}\n$$\n\n\n\n\n\n## Why this class?\n\n* Most say requirements.\n* Interest in ML/Stat learning\n* Expressions of love/affection for Stats/CS/ML\n* Enjoyment of past similar classes\n\n## Why this class?\n\nMore idiosyncratic:\n\n::: incremental\n\n- \"Professor received Phd from CMU, must be an awesome Ā researcher.\"\n- \"Learn strategies.\"\n- (paraphrase) \"Course structure with less weight on exam helps with anxiety\"\n- (paraphrase) \"I love coding in R and want more of it\"\n- \"Emmmmmmmmmmmmmmmm, to learn some skills from Machine Learning and finish my minoršŸ™ƒ.\"\n- \"destiny\"\n- \"challenges from ChatGPT\"\n- \"I thought Daniel Mcdonald is a cool prof...\"\n- \"I have heard this is the most useful stat course in UBC.\"\n\n:::\n\n\n## Syllabus Q\n\n\n\n\n::: {.cell layout-align=\"center\"}\n::: {.cell-output-display}\n![](00-quiz-0-wrap_files/figure-revealjs/unnamed-chunk-1-1.svg){fig-align='center'}\n:::\n:::\n\n\n\n## Programming languages\n\n\n::: {.cell layout-align=\"center\"}\n::: {.cell-output-display}\n![](00-quiz-0-wrap_files/figure-revealjs/unnamed-chunk-2-1.svg){fig-align='center'}\n:::\n:::\n\n\n---\n\n## Matrix inversion\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\nlibrary(MASS)\nX <- matrix(c(5, 3, 1, -1), nrow = 2)\nX\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n [,1] [,2]\n[1,] 5 1\n[2,] 3 -1\n```\n:::\n\n```{.r .cell-code}\nsolve(X)\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n [,1] [,2]\n[1,] 0.125 0.125\n[2,] 0.375 -0.625\n```\n:::\n\n```{.r .cell-code}\nginv(X)\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n [,1] [,2]\n[1,] 0.125 0.125\n[2,] 0.375 -0.625\n```\n:::\n\n```{.r .cell-code}\nX^(-1)\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n [,1] [,2]\n[1,] 0.2000000 1\n[2,] 0.3333333 -1\n```\n:::\n:::\n\n\n\n\n## Linear models\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\ny <- X %*% c(2, -1) + rnorm(2)\ncoefficients(lm(y ~ X))\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n(Intercept) X1 X2 \n 4.8953718 0.9380314 NA \n```\n:::\n\n```{.r .cell-code}\ncoef(lm(y ~ X))\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n(Intercept) X1 X2 \n 4.8953718 0.9380314 NA \n```\n:::\n\n```{.r .cell-code}\nsolve(t(X) %*% X) %*% t(X) %*% y\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n [,1]\n[1,] 2.161874\n[2,] -1.223843\n```\n:::\n\n```{.r .cell-code}\nsolve(crossprod(X), crossprod(X, y))\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n [,1]\n[1,] 2.161874\n[2,] -1.223843\n```\n:::\n:::\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\nX \\ y # this is Matlab\n```\n\n::: {.cell-output .cell-output-error}\n```\nError: :1:3: unexpected '\\\\'\n1: X \\\n ^\n```\n:::\n:::\n\n\n\n## Pets and plans\n\n\n::: {.cell layout-align=\"center\"}\n::: {.cell-output-display}\n![](00-quiz-0-wrap_files/figure-revealjs/unnamed-chunk-6-1.svg){fig-align='center'}\n:::\n:::\n\n\n---\n\n## Grade predictions\n\n\n::: {.cell layout-align=\"center\"}\n::: {.cell-output-display}\n![](00-quiz-0-wrap_files/figure-revealjs/unnamed-chunk-7-1.svg){fig-align='center'}\n:::\n:::\n\n\n* 4 people say 100%\n* 24 say 90%\n* 25 say 85%\n* 27 say 80%\n* Lots of clumping\n\n\n. . .\n\n1 said 35, and 1 said 50. Woof!\n\n## Prediction accuracy (last year)\n\n\n::: {.cell layout-align=\"center\"}\n::: {.cell-output-display}\n![](00-quiz-0-wrap_files/figure-revealjs/unnamed-chunk-8-1.svg){fig-align='center'}\n:::\n:::\n\n\n## Prediction accuracy (last year)\n\n\n::: {.cell layout-align=\"center\"}\n\n```{.r .cell-code}\nsummary(lm(actual ~ predicted - 1, data = acc))\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n\nCall:\nlm(formula = actual ~ predicted - 1, data = acc)\n\nResiduals:\n Min 1Q Median 3Q Max \n-63.931 -2.931 1.916 6.052 21.217 \n\nCoefficients:\n Estimate Std. Error t value Pr(>|t|) \npredicted 0.96590 0.01025 94.23 <2e-16 ***\n---\nSignif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1\n\nResidual standard error: 10.2 on 137 degrees of freedom\n (8 observations deleted due to missingness)\nMultiple R-squared: 0.9848,\tAdjusted R-squared: 0.9847 \nF-statistic: 8880 on 1 and 137 DF, p-value: < 2.2e-16\n```\n:::\n:::\n", + "supporting": [ + "00-quiz-0-wrap_files" + ], + "filters": [ + "rmarkdown/pagebreak.lua" + ], + "includes": { + "include-after-body": [ + "\n\n\n" + ] + }, + "engineDependencies": {}, + "preserve": {}, + "postProcess": true + } +} \ No newline at end of file diff --git a/_freeze/schedule/slides/00-quiz-0-wrap/figure-revealjs/unnamed-chunk-1-1.svg b/_freeze/schedule/slides/00-quiz-0-wrap/figure-revealjs/unnamed-chunk-1-1.svg new file mode 100644 index 0000000..ce7194d --- /dev/null +++ b/_freeze/schedule/slides/00-quiz-0-wrap/figure-revealjs/unnamed-chunk-1-1.svg @@ -0,0 +1,453 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_freeze/schedule/slides/00-quiz-0-wrap/figure-revealjs/unnamed-chunk-2-1.svg b/_freeze/schedule/slides/00-quiz-0-wrap/figure-revealjs/unnamed-chunk-2-1.svg new file mode 100644 index 0000000..7662430 --- /dev/null +++ b/_freeze/schedule/slides/00-quiz-0-wrap/figure-revealjs/unnamed-chunk-2-1.svg @@ -0,0 +1,484 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_freeze/schedule/slides/00-quiz-0-wrap/figure-revealjs/unnamed-chunk-5-1.svg b/_freeze/schedule/slides/00-quiz-0-wrap/figure-revealjs/unnamed-chunk-5-1.svg new file mode 100644 index 0000000..8cc3b48 --- /dev/null +++ b/_freeze/schedule/slides/00-quiz-0-wrap/figure-revealjs/unnamed-chunk-5-1.svg @@ -0,0 +1,944 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_freeze/schedule/slides/00-quiz-0-wrap/figure-revealjs/unnamed-chunk-6-1.svg b/_freeze/schedule/slides/00-quiz-0-wrap/figure-revealjs/unnamed-chunk-6-1.svg new file mode 100644 index 0000000..8cc3b48 --- /dev/null +++ b/_freeze/schedule/slides/00-quiz-0-wrap/figure-revealjs/unnamed-chunk-6-1.svg @@ -0,0 +1,944 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_freeze/schedule/slides/00-quiz-0-wrap/figure-revealjs/unnamed-chunk-7-1.svg b/_freeze/schedule/slides/00-quiz-0-wrap/figure-revealjs/unnamed-chunk-7-1.svg new file mode 100644 index 0000000..a650803 --- /dev/null +++ b/_freeze/schedule/slides/00-quiz-0-wrap/figure-revealjs/unnamed-chunk-7-1.svg @@ -0,0 +1,379 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_freeze/schedule/slides/00-quiz-0-wrap/figure-revealjs/unnamed-chunk-8-1.svg b/_freeze/schedule/slides/00-quiz-0-wrap/figure-revealjs/unnamed-chunk-8-1.svg new file mode 100644 index 0000000..37e62e4 --- /dev/null +++ b/_freeze/schedule/slides/00-quiz-0-wrap/figure-revealjs/unnamed-chunk-8-1.svg @@ -0,0 +1,403 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +