# Systematic Review of Anomaly Detection in Hyperspectral Remote Sensing Applications
## 4 Mathematical Framework for Anomaly Detection
The probability of a type II error is usually denoted with \(\beta\), and it can be expressed as [11]:  
\[\beta=P\{\Lambda(\underline{x})\leq\eta|H_{1}\}=\int_{\lambda\leq\eta}f_{ \Lambda|H_{1}}(\lambda)d\lambda=\int_{\underline{x}\wedge(\underline{x})\leq \eta}f_{\underline{x}|H_{1}}(\underline{x})d\underline{x}. \tag{3}\]  
A type II error happens if an observed pixel is proclaimed as a background pixel when it is a target (anomaly), thus resulting in missed detection. When \(\beta\) is known, the probability of anomaly detection (\(P_{D}\)) can be directly determined as in [11]:  
\[P_{D}=1-\beta \tag{4}\]  
The ideal detection statistic could make the probabilities of both error types arbitrarily small, but no such statistical test exists. In statistical decision theory, it is well-accepted that decisions based on the likelihood ratio test (LRT) are optimum over numerous performance criteria [10; 42]. Let \(f(\underline{\chi}|H_{0})\) and \(f(\underline{\chi}|H_{1})\) be conditional probability distributions of observing \(\underline{x}\) under \(H_{0}\) and \(H_{1}\) respectively. Then, the LRT between \((\underline{\chi}|H_{0})\) and \(f(\underline{\chi}|H_{1})\) can be derived as [10]:  
\[\Lambda(\underline{x})=\frac{f_{\underline{\chi}|H_{1}}(\underline{x})}{f_{ \underline{\chi}|H_{0}}(\underline{x})} \begin{array}{rl}H_{1}\\ >\\ <\\ H_{0}\end{array} \eta. \tag{5}\]  
The classical approach in selecting optimum detection statistics is based on the well-known Neyman-Pearson (NP) lemma [43]. The NP lemma for a given significance level \(\alpha\) obtains the test that has the lowest possible probability of missed detection \(\beta\) for all parameters defined by the alternative hypothesis \(H_{1}\). In other words, NP is the optimum criterion that maximizes the probability of detection for any desired false alarm rate [42]. Solution of (5), in an NP sense, is only possible if both hypothesis \(H_{0}\) and \(H_{1}\) are simple hypotheses. Simple hypotheses have parameters of their conditional probability functions \(f(\underline{X}|H_{0})\) and \(f(\underline{X}|H_{1})\) known, but unfortunately, these requirements are rarely fulfilled in practical applications. In those cases, sub-optimum criteria that are based on the generalized likelihood ratio test (GLRT) are implemented. In GLRTs, unknown parameters are substituted with their maximum likelihood estimates (MLE) [11; 38]:  
\[\Lambda_{GLRT}(\underline{x})=\frac{f_{\underline{X}|H_{1}}(\underline{x}; \underline{\hat{\theta}}_{1})}{f_{\underline{X}|H_{0}}(\underline{x};\underline {\hat{\theta}}_{0})}=\frac{max_{\underline{\theta}_{1}}f_{\underline{X}|H_{1} }(\underline{x};\underline{\hat{\theta}}_{1})}{max_{\underline{\theta}_{0}}f_ {\underline{X}|H_{0}}(\underline{x};\underline{\hat{\theta}}_{0})}<\eta, \tag{6}\]  
where \(\underline{\hat{\theta}}_{0}\), \(\underline{\hat{\theta}}_{1}\) represent the vectors of unknown parameters. MLEs of unknown parameters are usually determined from the test and/or reference samples that should be independent and identically distributed (IID). In anomaly detection, no presumptions about the target model are made. Instead, background models are developed. In doing so, a wide variety of creative approaches were suggested, including the adoption of multivariate normal models [34], subspace projections [36], and kernel methods [26]. Although attempts have been made to provide the in-depth taxonomy of complex hyperspectral anomaly detection methods [10; 11] or background modeling for detection of anomalies in hyperspectral remotely sensed imagery [17], we suggest a simple distinction of anomaly detection methods in two basic categories: methods that implement unstructured background models and methods that adopt structured background models. Besides background models, methods could be further specified by the implemented spatial model. The spatial model can be one of the following: global, local, or quasi-local. If a global model is used, then all or most available hyperspectral pixels are used to characterize the background.