# A Review of Methods and Applications for a Heart Rate Variability Analysis
## 5 Dimensionality Reduction Techniques
### Principal Component Analysis (PCA)  
PCA is a renowned unsupervised ML technique that employs an orthogonal conversion algorithm to alter many associated features to a set of unrelated features identified as principal components [58]. The orthogonal alteration is performed utilizing the eigenvalue breakdown of the covariance matrix, which is produced using the features of the specified signal. PCA selects the dimensions containing the most significant information while discarding the dimensions containing the least important information. This, sequentially, assists to lessen the dimensionality of the data [70]. The samples in the PCA-based approach are placed in a lower-dimensional space, such as 2D or 3D. Because it makes use of the signal's variation and changes it to alternate dimensions with lesser characteristics, it is a useful tool for attribute choosing. However, the transformation preserves the variance of the signal components.  
The PCA technique is generally executed via either the matrix or data methods. The matrix method uses all the data contained in the signal to compute the variance-covariance structure and represents it in the matrix form. Here, the raw data are transformed using matrix operations through linear algebra and statistical methodologies. And yet, the data process works directly on the information and matrix-based operations are not required [70]. Various features like the mean, deviation, and covariance are involved in implementing a PCA-based algorithm. The mean or average (\(\mu\)) value of the data samples (\(x_{i}\)) calculated during the implementation of PCA is given in Equation (16) [70].  
\[\mu\ =\ \frac{1}{n}\sum_{i=1}^{n}x_{i} \tag{16}\]  
where \(x_{i}\) represents the data samples.  
The deviation (\(\phi_{i}\)) for the dataset can be mathematically expressed using Equation (17) [70].  
\[\phi_{i}\ =\ x_{i}\ -\ \mu \tag{17}\]  
where \(x_{i}\) represents the data samples, and \(\mu\) represents the deviation.  
Covariance (\(C\)) determines the variable value that has changed randomly and how much it has deviated from the original data [71]. This value may be either positive or negative and is based on the deviation it has gone through in the previous steps. The covariance matrix is calculated using the deviation formula and then transposing it [70].  
\[C=\frac{1}{n}\sum_{i=1}^{n}\left(x-\mu\right)\left(x-\mu\right)^{T}=\frac{1}{n }\sum_{i=1}^{n}\phi_{i}\phi_{i}^{T}=\frac{1}{n}AA^{T} \tag{18}\]  
where \(A\)= [\(\phi_{1}\), \(\phi_{2}\)... \(\phi_{n}\)] is the set of deviations observed from the original data.  
In order to apply PCA for dimensionality reduction purposes, the eigenvalues and the respective eigenvectors of the covariance matrix \(C\) need to be computed [70]. Among all the eigenvectors (say m), the first k number of eigenvectors with the highest eigenvalues are selected. This corresponds to the inherent dimensionality of the subspace regulating the signal. The rest of the dimensions (m-k) contain noise. For the representation of the signal using principal components, the signal is projected into the k-dimensional subspace using the rule given in Equation (19) [70].  
\[Y_{i}\ =\ U^{T}\left(x_{i}-\mu\right) \tag{19}\]  
where \(U\) represents an \(m\times k\) matrix whose columns comprise the \(k\) eigenvectors.  
PCA helps to obtain a set of uncorrelated linear combinations as given in the matrix form below (Equation (20)) [71].  
\[Y\ =\ A^{T}x \tag{20}\]  
where \(Y\) = (\(Y_{1}\), \(Y_{2}\),..., \(Y_{p}\))T, \(Y_{1}\) represents the first principal component, \(Y_{2}\) represents the second principal component, and so on. \(A\) is an orthogonal matrix having \(A^{T}A\) = \(I\).