Skip to content

Commit

Permalink
Merge pull request #111 from SmashingBumpkin/main
Browse files Browse the repository at this point in the history
Small changes to allow correct parsing, exam dates
  • Loading branch information
iacopomasi authored Jun 7, 2024
2 parents 36e1bd9 + 48ce28e commit d0e9e65
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@
"source": [
"# The Maximum Likelihood Principle\n",
"\n",
"This has a Bayesian interpretation which can be helpful to think about. Suppose that we have a model with parameters $\\boldsymbol{\\theta}\\doteq\\mu,\\Sigma$ and a collection of data examples $X=\\{\\mbf{x}_1,\\ldots,\\mbf{x}_N \\}$. \n",
"This has a Bayesian interpretation which can be helpful to think about. Suppose that we have a model with parameters $\\boldsymbol{\\theta}\\doteq\\mu,\\Sigma$ and a collection of data examples $X=\\{\\mbf{x}_1,\\ldots,\\mbf{x}_N \\}$.\n",
"\n",
"If we want to find the **most likely value for the parameters of our model, given the data**, that means we want to find\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2152,7 +2152,8 @@
"# Gradient Descent and [Stochastic] GD\n",
"\n",
"1. **Initialization - Very Important if the function is not strictly convex** \n",
"$$\\bmf{\\theta} \\doteq \\mbf{0}^T$$ Set it to all zeros or random initialization from a distribution.\n",
"$$\\bmf{\\theta} \\doteq \\mbf{0}^T$$\n",
"Set it to all zeros or random initialization from a distribution.\n",
"2. Repeat until **convergence**:\n",
" - Compute the gradient of the loss wrt the parameters $\\bmf{\\theta}$ given **all the training set**\n",
" - Take a small step in the opposite direction of steepest ascent **(so steepest descent).**<br/><br/>\n",
Expand Down Expand Up @@ -2750,7 +2751,7 @@
"# Now we can still solve it with LS but $m=2$\n",
"\n",
"\n",
"We can have another dimensionality $m$ instead of $d$ by using **Basis Functions $\\bmf{\\phi}(\\mbf{x})$**.\n",
"We can have another dimensionality $m$ instead of $d$ by using **Basis Functions** $\\bmf{\\phi}(\\mbf{x})$ .\n",
"\n",
"With $\\bmf{\\phi}(\\mbf{x} = [1,\\phi(x_1),\\ldots,\\phi(x_m)]$ and $\\mbf{\\theta} = [\\theta_0,\\theta_1,\\ldots,\\theta_m]$, we have:\n",
"\n",
Expand Down Expand Up @@ -2837,7 +2838,7 @@
"# Now we can still solve it with LS but $m=3$\n",
"\n",
"\n",
"We can have another dimensionality $m$ instead of $d$ by using **Basis Functions $\\bmf{\\phi}(\\mbf{x})$**.\n",
"We can have another dimensionality $m$ instead of $d$ by using **Basis Functions** $\\bmf{\\phi}(\\mbf{x})$ .\n",
"\n",
"With $\\bmf{\\phi}(\\mbf{x} = [1,\\phi(x_1),\\ldots,\\phi(x_m)]$ and $\\mbf{\\theta} = [\\theta_0,\\theta_1,\\ldots,\\theta_m]$, we have:\n",
"\n",
Expand Down Expand Up @@ -2924,7 +2925,7 @@
"# We can analyze what happens in function of $m$\n",
"\n",
"\n",
"We can have another dimensionality $m$ instead of $d$ by using **Basis Functions $\\bmf{\\phi}(\\mbf{x})$**.\n",
"We can have another dimensionality $m$ instead of $d$ by using **Basis Functions** $\\bmf{\\phi}(\\mbf{x})$.\n",
"\n",
"With $\\bmf{\\phi}(\\mbf{x} = [1,\\phi(x_1),\\ldots,\\phi(x_m)]$ and $\\mbf{\\theta} = [\\theta_0,\\theta_1,\\ldots,\\theta_m]$, we have:\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,11 @@
"\n",
"\n",
"1. **<ins>Initialization - Very Important if the function is not strictly convex</ins>** \n",
"$\\bmf{\\theta} \\sim \\mathcal{N}(\\cdot)~~~\\text{omit details for now}$$ With NN random initialization from a distribution (There are different methods). **We do not set them all to zero**\n",
"\n",
"$$\\bmf{\\theta} \\sim \\mathcal{N}(\\cdot)~~~\\text{omit details for now}$$\n",
"\n",
"With NN random initialization from a distribution (There are different methods). **We do not set them all to zero**\n",
"\n",
"2. Repeat until **convergence**:\n",
" - Compute the gradient of the loss wrt the parameters $\\bmf{\\theta}$ given **the mini-batch**\n",
" - Take a small step in the opposite direction of steepest ascent **(so steepest descent).**<br/><br/>\n",
Expand Down Expand Up @@ -1775,7 +1779,7 @@
"source": [
"# Universal Approximation Theorem [Informal]\n",
"\n",
"Given a continuous function $\\mbf{y}=f(\\mbf{x})$ where $\\mbf{x} \\in \\mathbb{R}^d$ and $\\mbf{y} \\in \\mathbb{R}^k$, considering only a bounded region of $\\mbf{x}$, **there exists** a single-hidden-layer NN$_\\theta$ with a **finite number of neurons/units in the hidden layer**, such that:\n",
"Given a continuous function $\\mbf{y}=f(\\mbf{x})$ where $\\mbf{x} \\in \\mathbb{R}^d$ and $\\mbf{y} \\in \\mathbb{R}^k$, considering only a bounded region of $\\mbf{x}$, **there exists** a single-hidden-layer $NN_\\theta$ with a **finite number of neurons/units in the hidden layer**, such that:\n",
"\n",
"$$\\vert f(\\mbf{x}) - NN_\\theta(\\mbf{x}) \\vert \\le \\epsilon $$\n",
"<br><br>\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3179,11 +3179,11 @@
},
"source": [
"# 🏁 END of the LINE 🏁\n",
"### Soon it will be your turn on 13 June 2023\n",
"### Soon it will be your turn on 13 June 2024\n",
"\n",
"## Do not worry there are also\n",
"- Exam session on **6 July 2023**\n",
"- Exam session on **14 September 2023**\n",
"- Exam session on **16 July 2024**\n",
"- Exam session on **18 September 2024**\n",
"\n",
"[Million Dollar 🤑 link](https://iacopomasi.github.io/AI-ML-Unit-2/AA2122/exams.html)"
]
Expand Down

0 comments on commit d0e9e65

Please sign in to comment.