diff --git a/semester4/ps/ps-rb/main.pdf b/semester4/ps/ps-rb/main.pdf index 0355064..9abb3f0 100644 Binary files a/semester4/ps/ps-rb/main.pdf and b/semester4/ps/ps-rb/main.pdf differ diff --git a/semester4/ps/ps-rb/parts/02_variables.tex b/semester4/ps/ps-rb/parts/02_variables.tex index 6c3659b..1baea9e 100644 --- a/semester4/ps/ps-rb/parts/02_variables.tex +++ b/semester4/ps/ps-rb/parts/02_variables.tex @@ -279,6 +279,12 @@ $$ Z &\sim \mathcal{N}\Biggl( \underbrace{m_0 + \sum_{i=1}^n \lambda_iX_i}_{m_Z}\quad,\quad \underbrace{\sum_{i=1}^n \lambda_i^2 \sigma_i^2}_{\sigma^2_Z} \Biggr) \end{align*} +{\footnotesize + \remark $X_1,\ldots,X_n \overset{\text{i.i.d.}}{\sim} \mathcal{N}(\mu, \sigma^2) \implies \Bigl(\displaystyle\sum_{i=1}^n X_i\Bigr) \sim \mathcal{N}(n\mu,n\sigma^2)$ + + \remark $X_1,\ldots,X_n \overset{\text{i.i.d.}}{\sim} \mathcal{N}(\mu, \sigma^2) \implies \Bigl(\underbrace{\frac{1}{n}\sum_{i=1}^n X_i}_{\bar{X}_n}\Bigr) \sim \mathcal{N}(\mu,\frac{\sigma^2}{n})$ +} + \definition \textbf{Standardnormalverteilung} $$X \sim \mathcal{N}(0,1) \qquad \Phi(x) := \P[X \leq x]$$ diff --git a/semester4/ps/ps-rb/parts/03_expectation.tex b/semester4/ps/ps-rb/parts/03_expectation.tex index 699df28..53dc602 100644 --- a/semester4/ps/ps-rb/parts/03_expectation.tex +++ b/semester4/ps/ps-rb/parts/03_expectation.tex @@ -84,8 +84,8 @@ $$ \begin{align*} \V[X] &= \E\bigl[X^2\bigr] - \E[X]^2 & (X \sim \text{Poisson}(\lambda)) \\ \lambda &= \E\bigl[X^2\bigr] - \lambda^2 \\ - \lambda + \lambda^2 &= \E\bigl[X^2\bigr] \\ - \end{align*} + \boxed{\lambda + \lambda^2} &= \E\bigl[X^2\bigr] \\ + \end{align*} } \lemma \textbf{Eigenschaften} diff --git a/semester4/ps/ps-rb/parts/06_limits.tex b/semester4/ps/ps-rb/parts/06_limits.tex index 5d3dfb6..1cacfcd 100644 --- a/semester4/ps/ps-rb/parts/06_limits.tex +++ b/semester4/ps/ps-rb/parts/06_limits.tex @@ -58,4 +58,18 @@ $$ \newpage -div % s.d. Statistik auf einer Seite bleibt \ No newline at end of file +{\footnotesize + \textbf{Beispiel}: Zentraler Grenzwertsatz als Teststatistik + + $X_1,\ldots,X_{72} \overset{\text{i.i.d.}}{\sim} \text{Ber}(\theta)$, $S_{72} = \sum_{i=1}^{72} X_i$. Stichprobe $\bar{s}_{72}=32$. + $$ + H_0: \theta = \frac{1}{3} \qquad H_A: \theta > \frac{1}{3} + $$ + Mit ZGS, wobei wir $\theta = \frac{1}{3}$ ($H_0$) nutzen, erhalten wir $T$: + $$ + T \overset{\text{ZGS}}{=} \frac{S_n - n\mu}{\sigma\sqrt{n}} = \frac{S_n - n\E[X_i]}{\sqrt{\V[X_i]n}} \overset{\text{Ber.}}{=} \frac{S_n - 72\cdot\frac{1}{3}}{\sqrt{\frac{2}{9}\cdot 72}} = \boxed{\frac{S_n-24}{4}} + $$ + Der Vorteil hiervon ist, der ZGS garantiert: $T \sim \mathcal{N}(n\mu, n\sigma^2)$: + + Realisierungen $T(\omega) = T(\bar{s}_n) = T(32) = 2$ bilden mit $z_{1-\alpha}$: $K = (z_{1-\alpha},\infty)$ und können direkt ausgewertet werden, z.B. für $p$-Wert. +} \ No newline at end of file diff --git a/semester4/ps/ps-rb/parts/07_stats.tex b/semester4/ps/ps-rb/parts/07_stats.tex index 184e99a..1633dce 100644 --- a/semester4/ps/ps-rb/parts/07_stats.tex +++ b/semester4/ps/ps-rb/parts/07_stats.tex @@ -94,6 +94,7 @@ $$ \item $f(\vartheta) := \ln\Bigl( L(x_1,\ldots,x_n;\vartheta) \Bigr)$ \item $\vartheta^*$ finden, s.d. $f'(\vartheta^*) = 0$ \item Argumentieren, dass $\vartheta^*$ das Maximum ist (z.B. via $f''$) + \item Folglich: $T_\text{ML} = \theta^*$ \end{enumerate} } @@ -370,7 +371,7 @@ $$ \remark \textbf{Interpretation} \begin{align*} \alpha > p &\implies (T, K_t) \text{ lehnt } H_0 \text{ ab} \\ - \alpha \leq p &\implies (T, K_t) \text{ akzeptier } H_0 + \alpha \leq p &\implies (T, K_t) \text{ akzeptiert } H_0 \end{align*} {\footnotesize diff --git a/semester6/iml/main.pdf b/semester6/iml/main.pdf index c2415a8..a4eb1a4 100644 Binary files a/semester6/iml/main.pdf and b/semester6/iml/main.pdf differ diff --git a/semester6/iml/parts/00_intro.tex b/semester6/iml/parts/00_intro.tex index fdbd303..b670aac 100644 --- a/semester6/iml/parts/00_intro.tex +++ b/semester6/iml/parts/00_intro.tex @@ -1 +1 @@ -\textit{placeholder} \ No newline at end of file +\subtext{Wherever $\Vert\cdot\Vert_p$ isn't specified, $p=2$.} \ No newline at end of file diff --git a/semester6/iml/parts/04_networks.tex b/semester6/iml/parts/04_networks.tex index 435a090..8f9d5ad 100644 --- a/semester6/iml/parts/04_networks.tex +++ b/semester6/iml/parts/04_networks.tex @@ -501,6 +501,35 @@ $$ $$ } +\newpage + +\subsection{Network sizes} + + + +{\footnotesize + \textbf{Example}: CNN vs FCNN (MLP) Parameter counts. + + We can model an RGB Image as $\mathbf{I}\in\R^{1920\times1080\times3}$ where + $(\mathbf{I}_{i,j,1},\mathbf{I}_{i,j,2},\mathbf{I}_{i,j,3})$ are the RGB values of pixel $(i,j)$. We use a CNN \& FCNN to analyze. + + For an FCNN $N$ with $1$ hidden layer with $h$ nodes, and $o$ output nodes: + $$ + \text{size}(N) = \underbrace{(1920 \cdot 1080 \cdot h)}_{\text{All-to-All}} + \underbrace{(h \cdot o)}_\text{Output} + \underbrace{(h + o)}_\text{Bias} + $$ + For a CNN $N'$ with an $n\times n$ Filter, padding $p$ and stride $s$: + $$ + \text{size}(N') = \biggl(\frac{1920 + 2\cdot p - n}{s}+1\biggr)\cdot\biggl(\frac{1080+2\cdot p - n}{s}+1\biggr) + $$ + The advantage of CNNs becomes clear when plugging in values, e.g. + $$ + N:\ h=256, o=10 \qquad N':\ n=4, p=2, s=2 + $$ + $$ + \text{size}(N) = 1'592'527'626 \qquad \text{size}(N') = 519'901 + $$ +} + \subsubsection{Multidimensional Convolution} \textbf{TODO} add explanation diff --git a/semester6/iml/parts/05_unsupervised.tex b/semester6/iml/parts/05_unsupervised.tex index 4ab74e5..c133ee5 100644 --- a/semester6/iml/parts/05_unsupervised.tex +++ b/semester6/iml/parts/05_unsupervised.tex @@ -18,6 +18,8 @@ There are many use-cases: The goal here is to group inputs into clusters, based on some definiton of similarity, e.g. $l_2$ distance for $\mathcal{D} \subset \R^2$.\\ \subtext{This can be seen as the unsupervised analogy to classification} +\subsubsection{Basic Methods} + \method \textbf{Hierarchical Clustering} A simple method, using the "similarity" measure directly. @@ -58,11 +60,14 @@ $$ $$ \subtext{(minimize the sum of sq. distances between points \& their centers)} -So we are searching: +{\footnotesize + \remark $\Vert\cdot\Vert_2$ corresponds to the \textit{mean}. $\Vert\cdot\Vert_1$ would use the \textit{median}. +} + +So we are searching: (non-convex \& NP-hard) $$ \underset{\mu}{\text{arg min}} \Bigl( \hat{R}(\mu) \Bigr) \qquad {\color{gray}\footnotesize \text{(optimal $k$-means cluster)}} $$ -\remark This is non-convex \& NP-hard. \method \textbf{Lloyd's Heuristic}