## 3 Materials and Methods
### Discrete Blood Pressure Prediction
#### 3.4.1 Feature Extraction  
Both time domain and frequency domain features were extracted for the classical machine learning approach.  
Generalising the feature extraction proved challenging. [PERSON] [5] describes features in the PPG wave. As an example, the diastolic point appears as a zero in the PPG's first derivative [5]. However, in reality, feature extraction is difficult to generalise when the signals are not from young, healthy individuals with ideal waveforms [5]. For example, the dicrotic notch becomes less visible with increased arterial stiffness, such as in Figure 2. Feature extraction was built around reliable identification of the systolic point, diastolic point, and waveform foot. The systolic points correspond to signal peaks, separated by at least 0.24 s (giving a maximum heart rate of 250 bpm). The waveform foot was found by finding the local minimum before a systolic peak. Finally, the diastolic point was identified using a scoring matrix. The matrix considers all the local maxima between the systolic peak and the next foot and takes into account the points' amplitude, first derivative, and second derivative to find the highest point with the flattest derivative. Extracted systolic points, diastolic points, and feet are shown in Figure 2.  
The time domain features are based on those described by [PERSON] [5] and [PERSON] et al. [8]. The features considered include:  
* Time-related features: systolic upstroke duration, diastolic duration, and duration between systolic peak and diastolic peak.
* Amplitude-features: systolic peak, diastolic peak, foot, augmentation index (ratio of systolic peak-to-diastolic peak).
* Time and amplitude features: systolic width, diastolic width, total width (sum of the systolic and diastolic widths), ratio of systolic to diastolic widths.
* Area features: pulse area (total area under PPG curve over a cardiac cycle), inflection point area (ratio of area post dicrotic notch to area pre-dicrotic notch).
* Frequency-features: respiratory rate, heart rate.  
The time and amplitude features and the respiratory rate are worth discussing in more detail.  
For the time and amplitude features, a proportion of the total systolic peak amplitude is considered, namely 25, 33, 50, 66, 75, and 90%. The point corresponding to this amplitude is then found during the systolic upstroke and again during diastole. The systolic width is the time from the systolic upstroke point to systolic peak, and the diastolic width is the time from systolic peak to subsequent diastole.  
Figure 2: PPG waveform displaying poorly visible dicrotic notch and diastolic point. The extracted systolic points, diastolic points, and waveform feet are shown as circles, triangles, and squares, respectively.  
The respiratory rate is found using a frequency analysis. Respiration modulates the blood pressure and introduces a slowly varying sinusoidal component into the PPG signal [24]. Respiratory rates were assumed to have a maximum range between 2.97 breaths per minute and 28.02 breaths per minute [24], or 0.05 Hz to 0.47 Hz. The average respiratory rate was found by taking the Fourier transform of the PPG signal and finding the largest frequency in this band.