# A Review of Methods and Applications for a Heart Rate Variability Analysis
## 5 Dimensionality Reduction Techniques
### Kernel PCA (K-PCA)  
K-PCA is an extension of the principal component analysis (PCA) approach that may be used with non-linear information by employing several filters, including linear, polynomial, and Gaussian [58]. This method transforms the input signal into a novel feature space employing a non-linear transformation. A kernel matrix K is formed through the dot product of the newly generated features in the transformed space, which act as the covariance matrix [72]. For the construction of the kernel matrix, a non-linear transformation (say \(\varphi\)(x)) from the original D-dimensional feature space to an M-dimensional feature space (where M >> D) is performed. It is then assumed that the new features detected in the transformed domain have a zero mean (Equation (21)) [73]. The covariance matrix (C) of the newly projected features has an M \(\times\) M dimension and is calculated using Equation (22) [73]. The eigenvectors and eigenvalues of the covariance matrix represented in Equation (23) are calculated using Equation (24) [73]. The eigenvector term \(v_{k}\) in Equation (23) is expanded using Equation (24) [73]. By replacing the term \(v_{k}\) in Equation (23) with Equation (24), we obtain the expression in Equation (25) [73]. By defining a kernel function, \(k(x_{i},x_{j})=\phi(x_{i})^{T}\phi(x_{j})\), and multiplying both sides of Equation (25), we obtain Equation (26) [73]. Using matrix notation for the terms mentioned in Equation (26) and solving the equation, we obtain the principal components of the kernel (Equation (27)) [73]. If the projected dataset does not have a zero mean feature, the kernel matrix is replaced using a Gram matrix represented in Equation (28) [73].  
\[\frac{1}{N}\sum_{i=1}^{N}\phi(x_{i})\ =\ 0 \tag{21}\]  
\[C=\frac{1}{N}\sum_{i=1}^{N}\phi(x_{i})\phi(x_{i})^{T} \tag{22}\]  
\[Cv_{k}=\lambda_{k}v_{k} \tag{23}\]  
where \(k=1\), \(2\), \(\ldots\), M, \(v_{k}=\) k\({}_{\text{th}}\) eigenvector, and \(\lambda_{k}\) corresponds to its eigenvalue.  
\[v_{k}=\frac{1}{N}\sum_{i=1}^{N}a_{ki}\ \phi(x_{i}) \tag{24}\]  
\[\frac{1}{N}\sum_{i=1}^{N}\phi(x_{i})\phi(x_{i})^{T}\sum_{j=1}^{N}a_{kj}\ \phi(x_{j})=\lambda_{k}\sum_{i=1}^{N}a_{ki}\ \phi(x_{i}) \tag{25}\]  
\[\frac{1}{N}\sum_{i=1}^{N}k(x_{l},x_{i})\sum_{j=1}^{N}a_{kj}k(x_{i},x_{j})= \lambda_{k}\sum_{i=1}^{N}a_{ki}\ k(x_{l},x_{i}) \tag{26}\]  
\[y_{k}(x)\ =\ \phi(x)^{T}v_{k}\ =\ \sum_{i=1}^{N}a_{ki}k(x_{l},x_{i}) \tag{27}\]  
where \(a_{ki}\) represents the coefficient of the \(k_{th}\) eigenvector and \(k(x_{l},x_{i})\) represents the kernel function.  
\[\widetilde{K}\ =\ K-1_{N}K-K1_{N}+1_{N}K1_{N} \tag{28}\]  
where \(1_{N}\) represents the matrix with N \(\times\) N elements that equals \(1/\)N.  
Lastly, PCA is executed on the kernel matrix (K). In the K-PCA technique, the principal components are correlated, meaning the eigenvector is projected in an orthogonal direction with more variance than any other vectors in the sample data. The mean-square approximation error and the entropy representation are minimal in the principal components. Identifying new directions using the kernel matrix enhances accuracy compared to the traditional PCA algorithm.