# Systematic Review of Anomaly Detection in Hyperspectral Remote Sensing Applications
## 4 Mathematical Framework for Anomaly Detection  
The mathematical framework for anomaly detection arises from the signal detection theory [42], and is based on the field of statistical or binary hypothesis testing. A hyper \begin{table}
\begin{tabular}{c c} \hline \hline
**Year** & **Document** \\ \hline
2017 & 3-D ROC, Band Subset Selection, Convolutional Neural Network (NN), Differential Morphology, Edge-Preserving Filtering, Joint SR, K-SVD, Multiple Graphs, Autoencoders, Tensor Decomposition \\ \hline
2018 & A Posteriori AD, Band Selection, Deep Learning, Feature Extraction, Inverse PCA, Iterative AD, L-R Representation, Multiple Dictionaries, R-T Applications, Sparse Coding, Structured SR \\ \hline
2019 & Adaptive Weighting, Constrained SR, Deep Brief Network, Dictionary Learning, Fractional Fourier, Local Summation, Low Dimensional Manifold Model, Structure Tensor \\ \hline
2020 & Density Peak Clustering, Isolation Forest, Radiative Transfer Modeling \\ \hline \hline \end{tabular}
\end{table} 
Table 6: _Cont._  
Figure 5: Word cloud generated from the most frequent keywords found in the titles of the analyzed documents. The size of the word is proportional to its frequency. The figure was created using the bibliometrix R-package [23]. spectral image or a hyperspectral cube can be regarded as a rank-3 tensor arranged in two spatial dimensions and one spectral dimension. If we consider a hyperspectral cube having \(N\) pixels and \(K\) spectral bands (\(\underline{\underline{X}}\in\mathbb{R}^{N\times K}\)), then a pixel spectrum could be represented as the realization of a random vector (\(\underline{\underline{X}}\)) that can be denoted as \(\underline{\underline{x}}=[x_{1},\ x_{2},\ldots,x_{K}\ ]^{T}\). Given an observed pixel \(\underline{x}\), it needs to be decided between two disjunct premises:  
\[\hat{H}(\underline{x})=\left\{ \begin{array}{rl}H_{0}:&\text{target absent }\left(\ \underline{x}\text{ is a background pixel }\right)\\ H_{1}:&\text{target present }\left(\ \underline{x}\text{ is a target pixel }\right) \end{array} \right.. \tag{1}\]  
In general, a statistical hypothesis test is a rule for division of input \(K\)-dimensional feature space in two segments: space \((A)\) consistent with the null hypothesis \(H_{0}\) and its complement (\(B\)) that contains values consistent with the alternative hypothesis \(H_{1}\). In signal detection theory terminology, it can be stated that a decision about the proper hypothesis is determined by a test or detection statistic (\(\Lambda,\ \Lambda\ (\underline{x})=\lambda\)) whose detection threshold or critical value (\(\eta\)) splits input feature space into segments \(A\) (\(H_{0}:\Lambda\ (\underline{x})\leq\eta\)) and \(B\) (\(H_{1}:\Lambda(\underline{x})>\eta\)). The detection statistic usually maps input \(n\)-dimensional feature space (\(K\)-dimensional in our specific case) into 1-dimensional space, thus enabling separation of spaces \(A\) and \(B\) on a line instead of some high dimensional space. Upon hypothesis testing, two types of erroneous inferences could arise: a type I error occurs if a null hypothesis \(H_{0}\) is rejected while being true, and a type II error occurs if the \(H_{0}\) is accepted when the alternative hypothesis \(H_{1}\) is true. The probability of a type I error is usually denoted with \(\alpha\), commonly called the significance level. It can be mathematically formulated as [11]:  
\[\alpha=P\{\Lambda(\underline{x})>\eta|H_{0}\}=\int_{\lambda\leq\eta}f_{\Lambda |H_{0}}(\lambda)d\lambda=\int_{\underline{x}\wedge(\underline{x})>\eta}f_{ \underline{x}|H_{0}}(\underline{x})d\underline{x}. \tag{2}\]  
In hyperspectral anomaly detection, a type I error occurs if an observed pixel is proclaimed as a target (anomaly) when it actually belongs to the background. Therefore, a type I error is also called a false alarm (\(P_{FA}=\alpha\)).