Gaussian Discriminant Analysis
Gaussian Discriminant Analysis Algorithm
The Gaussian Discriminant Analysis assumes that $y$ and $x|y = 0$ and $x|y = 1$ are such that:
- $y \sim Bernoulli(\phi)$
- $x|y = 0 ~ N(\mu_{0}, \Sigma)$
- $x|y = 1 ~ N(\mu_{1}, \Sigma)$
- Fit model $p(x)$ by setting
\[ \mu = \frac{1}{m} \sum^{m}_{i = 1} x^{(i)} \]
\[ \Sigma = \frac{1}{m}\sum^{m}_{i = 1}( x^{(i)} - \mu)( x^{(i)} - \mu)^{T} \]
- Given a new example $x$, compute
\[ p(x) = \frac{1}{(2\pi)^{\frac{n}{2}}|\Sigma|^{\frac{1}{2}}}exp(-\frac{1}{2} (x-\mu)^{T} \Sigma^{-1}(x-\mu) ) \]
- Flag an anamoly if $p(x) < \epsilon$
Applications
Anamoly detection, Fraud detection, ...