Beat-based PPG-ABP Cleaning Technique for Blood Pressure Estimation

ABSTRACTA growing attention is given to exploiting Photoplethysmography (PPG) signals in non-invasively measuring many physiological vital signs. Many machine deep learning models were trained for predicting the continuous arterial blood pressure (ABP) or just the systolic and diastolic blood pressure (BP) values based on a public database. However, jointly cleaning the PPG-ABP dataset that is the most critical pre-processing step for training quality is still in need for more investigations. There is a considerable amount of anomaly data that has to be excluded before any training stage. This paper introduces a two-level joint PPG-ABP cleaning technique conducted at a signal level and per-beat level. Many quality metrics have been checked successively for excluding improper data. These metrics achieve a coarse cleaning step. Finally, principal component analysis (PCA) is exploited for fine cleaning the remaining data from the former stage. The cleaning efficiency is evaluated by measuring its impact on the deep-learning-based BP estimation models. The trained model based on our cleaned data shows performance enhancement in terms of prediction error and the correlation between the predicted and ground-truth BP. Segmented and cleaned PPG/ABP dataset will be publicly available at both signal level and beat level. Based on the simulation results, the proposed cleaning technique enhances the standard deviation of the prediction error of systolic and diastolic blood pressure by 11.68 % and 10.81 %, respectively. Also, it enhances the mean absolute error of the prediction of systolic and diastolic blood pressure by 14.79 % and 11.70 %, respectively.

ABSTRACTA growing attention is given to exploiting Photoplethysmography (PPG) signals in noninvasively measuring many physiological vital signs. Many machine deep learning models were trained for predicting the continuous arterial blood pressure (ABP) or just the systolic and diastolic blood pressure (BP) values based on a public database. However, jointly cleaning the PPG-ABP dataset that is the most critical pre-processing step for training quality is still in need for more investigations. There is a considerable amount of anomaly data that has to be excluded before any training stage. This paper introduces a two-level joint PPG-ABP cleaning technique conducted at a signal level and per-beat level. Many quality metrics have been checked successively for excluding improper data. These metrics achieve a coarse cleaning step. Finally, principal component analysis (PCA) is exploited for fine cleaning the remaining data from the former stage. The cleaning efficiency is evaluated by measuring its impact on the deep-learning-based BP estimation models. The trained model based on our cleaned data shows performance enhancement in terms of prediction error and the correlation between the predicted and ground-truth BP. Segmented and cleaned PPG/ABP dataset will be publicly available at both signal level and beat level. Based on the simulation results, the proposed cleaning technique enhances the standard deviation of the prediction error of systolic and diastolic blood pressure by 11.68 % and 10.81 %, respectively. Also, it enhances the mean absolute error of the prediction of systolic and diastolic blood pressure by 14.79 % and 11.70 %, respectively. INTRODUCTION There is a growing demand for continuous health care monitoring through simple vital signs tracking without complicated clinical settings [1]. It provides early detection of clinical deterioration at a primary stage. That rising popularity of smart and continuous health care monitoring is met by technological advances in bio-signal sensing and processing.
Photoplethysmography (PPG) signal conveys information about changes in the volume of the blood in synchronous with heart pulsation mainly [2]. It can be measured simply using a contact fingerclip or wearable sensors. Also, it can be remotely estimated by a camera providing a remote-PPG (rPPG) signal. Whether being contact or remote PPG signal, it has been proved that PPG signal can be exploited for estimating important physiological vital signs such as blood pressure (BP) [3][4][5][6][7][8][9][10] oxygen saturation [11], and hemoglobin levels [12]. Even the multi-electrode electrocardiogram (ECG) signal, can be inferred via PPG signals [13]. These techniques guarantee the intended simplicity of non-clinical monitoring of health status. Thanks to the public availability of biomedical datasets [14][15][16] that enable training deep learning models [6]for inferring the relation between these data and the corresponding labeled physiological parameters. However, these huge datasets need to be cleaned effectively before any further deployment. It is collected and archived without paying attention to its quality. Hence, many techniques were introduced for data cleaning and abnormality/artifact detection [17][18][19][20][21][22][23].
By regarding our main interest in PPG-ABP dataset for BP estimation, there are still many opportunities for further data cleaning. Continuous non-invasive BP may be carried out through wearable devices [24]or remotely by camera [25][26][27].Other than BP estimation based on pulse arrival time (PAT) techniques [28][29][30][31][32]where the information resides in the phase shift between PPG and ECG signals, BP estimation from PPG only [5,33] imposes higher challenges in model fitting. PPG-based BP estimation is preferred over PPG-ECG approaches because ECG sensors can be relaxed by one PPG sensor. Camera-based BP estimation provides high flexibility on the user side while it incurs many technical challenges from the engineering perspective. It is required to reproduce the PPG signal from tiny variations of the reflected light from the face corresponding to blood volume changes. Moreover, that signal suffers from surrounding light variations, head movement, and respiration rate interference. Reproduced PPG signal in these difficult conditions has to preserve its main morphological construction that conveys the needed biological information [34][35][36]. Signal denoising remains an essential open problem in that field.
For contact/remote PPG-based BP estimation, all information is learned from the PPG morphological shape only. The quality of the training data has a critical impact on the performance of the deep-learning-based training models. Defected PPG training beats lead to unreliable modeling of BP. Model accuracy is highly dependent on training data quality.
Many techniques were introduced for enhancing PPGbased BP estimation accuracy. There are many claims on the achieved accuracy [6,37,38] according to the applied preprocessing and the training network. However, the employed dataset remains the main parameter that governs the training performance. In this paper, we are interested in realizing the impact of cleaning on the achieved BP estimation accuracy.
In this paper, we are introducing a joint PPG-ABP cleaning technique in two successive levels; signal level and per-beat level. The first level is carried on signal level. The spectral alignment between PPG and ABP signals is applied. Then, both PPG and ABP sets are segmented into beats. Some quality measures are imposed based on physiological thresholds. Each quality metric excludes apart from the defected beats successively. The defective PPG/ABP beat will be dropped out along with its corresponding beat PPG/ABP where the ABP beat represents the labeling of the corresponding PPG beat. To that end, coarse data cleaning is performed. Then, a simple principal component analysis (PCA) -based fine cleaning is applied. The proposed cleaning approach is evaluated by measuring the standard deviation and the mean of error of the estimated BP through some of the cleaning stages.
The main contributions in this paper can be summarized in:  Introducing a two-level cleaning technique for PPG and ABP signals.  Double cleaning strategy: Physiological limits are applied on both PPG/ABP signals/beats. If one signal/beat is defective, both signals/beats will be excluded for providing both trusted data and its label as well.  Temporal/spectral alignment: Data consistency is validated by checking the minimal time/spectral correlation between PPG and ABP signals/beats.  Introducing fine cleaning based on principal component analysis (PCA) representation.  Joint PPG/ABP beat-by-beat cleaned dataset is made publically available.  Essentially, we are interested in cleaning PPG/ABP datasets; however, many metrics can be employed for providing real-time PPG cleaning during actual BP estimation from PPG only. Signal-to-noise ratio, PPG beat similarity, and the minimum beat correlation with template PPG beat (1 st PCA component), can be applied jointly for online PPG clean.  Moreover, PPG beat quality can be measured by estimating the distance between that signal and the subspace spanned by the first PCA components.

II. Related work
One of the main problems obstructing full exploitation of the available biomedical databases resides in archiving these data without any concern about its quality. The percentage of the defective beats is very large that is making any training based on these data unreliable. A distinct trial for assessing the data along its collection is conducted in china over 219 subjects only [39]. Other than that trial, there are many techniques for providing quality measures or just detecting abnormal signal intervals.
The signal abnormality index (SAI) algorithm [23] detects abnormality intervals in the ABP signal. It applies successive series of abnormality metrics based on the limits of living physiological parameters such as the extreme values of systolic and diastolic BP, the maximum difference between systolic and diastolic values and the extreme limits of heart rate. Detection of valid ABP beats was enhanced by combining the former SAI to signal-to-noise (SNR) measure. SNR is estimated as the percentage of the representation of the ABP beat in signal space compared to the noisy complementing space [40]. Signal space is spanned by the aid of singular-value decomposition (SVD) of 567 visually validated beats. In [41], correlation to updated template beat is employed for per-beat artifact detection. In [7], besides physiological criteria, template matching is employed for data cleaning. In [19], signal quality assessment for ABP and ECG signal is discussed based on physiological and morphological limits. The authors' main aim was to reduce the false alarm rate in the monitor of the intensive care unit (ICU). In [18], Engender studied many metrics for measuring the PPG signal quality index (SQI). He has concluded that the skeins metric outperforms other metrics in determining the signal quality. Also, combined metrics improve the overall performance.
Neural network-based PPG classification is presented in [21]. It provides signal labeling based on the difference between the estimated heart rate from PPG and ECG signals. Ten beats are the upper bound difference that can be allowed between the two signals for good labeling. However, this simple labeling ignores the minimum level of morphological quality completely. Both Machine learning and deep-learning techniques [17,18,22,42,43] are employed for data cleaning or classifying signals as acceptable or anomalous. However, most of these approaches rely on manual data labeling based on experts' annotation. Hence, it was performed on a limited number of signals. Also, the assessment relies on the annotators' view. Pure manual classification is presented in [20]. It is based on gathering views of 18 international researchers for determining the required minimum recording length and the minimum number of undistorted pulses.
PPG quality may be classified based on diagnosis possibility into; excellent (salient systolic and diastolic), acceptable (not salient systolic and diastolic along with determined HR), and unfit (noisy signal) [18]. However, rather than just detecting defective beats/signal intervals, we are interested in extracting trusted clean data with clear features for training deep learning models effectively.

III. Materials and Methods
This paper provides a joint PPG-ABP cleaning technique. It presents a consecutive two-level signal/per-beat cleaning for both PPG and the corresponding ABP signals where the ABP signal conveys the BP label of the corresponding PPG signal. So, any defective PPG/ABP beats will lead to exclusion of both of PPG and ABP signals.

A. Data set
Thanks to the Physionet's MIMIC II dataset (Multiparameter Intelligent Monitoring in Intensive Care) [14] that provides joint PPG-ABP data needed for feeding the deep learning models. A compiled version of that dataset 1 is introduced in [15] where it has a better presentation. It is assumed that this dataset was cleaned. However, by inspecting that dataset, it is shown that it still has a considerable amount of defective PPG and ABP signals. That dataset represents our main material that will be utilized for providing a jointly cleaned PPG-ABP dataset for feeding deep learning BP estimation models.
That dataset contains 12,000 records of different lengths. Each record includes ABP (invasive arterial blood pressure (mmHg)), PPG (photoplethysmograph from fingertip), and VOLUME XX, 2022 ECG (electrocardiogram from channel II) signals sampled at = 125 samples/sec. However, we are interested only in the PPG signals and their corresponding ABP signals as a label. For proper handling and filtering, records are segmented into sections of 1024 samples length. So, we have 318001 records belonging to 10874 subjects 2 .

B. PPG/ABP Pre-processing and Alignment
Only PPG signals can be pre-processed by enhancing techniques such as band pass filtering in the band [0. [5][6][7][8] Hz as long as its morphological shape does not alter. On the other hand, the ABP signal cannot be touched because any trial for enhancing its quality leads to changes in its magnitude that represents the BP value. Also, in the beat segmentation stage, PPG beats will be normalized while the corresponding ABP beats remain untouched. Heavily distorted ABP signals or beats have to be excluded.
It is worth emphasizing that there is some phase difference between the two signals corresponding to the difference in the sensing locations. Therefore, PPG and ABP signals alignment is needed for measuring similarity between the two signals and for segmentation purposes. However, this phase shift does not exceed the beat interval. So, to maintain correct beat correspondence, the ABP signal is shifted to get the maximum cross-correlation with the PPG signal as follows.
For the maximum shift 0 ≤ k ≤ , where N is the beat length. It is predicted that the maximum shift between the two signals does not exceed a half second.

C. Motivations
PPG signal quality can be measured based on many signal quality indices [18] such as spectral signal-to-noise ratio (SNR), skewness, and Kurtosis. Then, data cleaning may be converted into designing proper thresholds for these metrics. Signals that are breaking these thresholds can be excluded. However, strict cleaning based on the signal level only (fulllength PPG/ABP signal) seems improper for the following reasons: 1) Long recording of Physiological Data is highly susceptible to interference or distortion in some intervals due to sensor/patient movement or misconnection. 2) Intervals of defective data have a negative impact on the features related to the whole signal. 3) Excluding the whole signal that includes some defective beats leads to huge wastage of data resources. 4) For instance, a strict signal-based data cleaning algorithm that was applied in [8] on MIMIC III database, reduces the number of validated patient records from over 30000 to about 510 records only. 5) Under remote (camera-based) rPPG detection, the resulting SNR is too low to provide a long signal with acceptable features. It may be sufficient to predict BP from a few beats extracted with clear features. Therefore, the main goal of this paper is to present a cleaning technique that can be used in dataset cleaning for training as well as for prediction by testing the estimated rPPG beats.

IV. Proposed Methodology
In this paper, we follow a successive two-level cleaning technique. Signal level cleaning is based on mild thresholding and excludes signals with salient abnormality. Per-beat cleaning is applied by thresholding many per-beat features. At both levels, there is no unique metric that can provide perfect cleaning. Defected signals/beats will be identified based on the combination of some successive metrics. It is worth mentioning that the cleaning is performed on both PPG and ABP signals. In either case, physiological limits are also applied to both signals in the signal and beat levels.PPG/ABP signals and beats less than assumed thresholds will be dropped out along with their corresponding ABP/PPG records. To this end, coarse cleaning has been achieved. The final fine cleaning stage relay on PCA thresholding. Figure 1 shows the proposed cleaning sequence entirely. The details of the proposed cleaning technique are explained in the following subsections.

A. Signal Level Cleaning
In this stage, both PPG and ABP signals are inspected without any segmentation. The main idea resides in viewing both signals in the frequency domain where both signals have to exhibit similar spectral construction as follows. The exclusion logic for single-level cleaning is presented in Fig.  2.

1) SPECTRA ALIGNMENT PRINCIPAL
Both PPG and ABP signals are arising from the same pulsating source which is the heart. So, PPG and ABP signals can be considered quasi-periodic signals with identical fundamental frequencies. Hence, the estimated heart rate from the PPG signal ( ) has to coincide with that estimated from the ABP signal ( ).To account for spectral resolution and possible errors in the spectral estimation process, a tolerance of ten beats can be set as a maximum deviation between the two heart rates. So, records can be excluded for the condition stated in Eq.2, which refers to the HR estimation conflict.

2) HR OUT OF POSSIBLE RANGE
Physiological limits impose upper and lower bounds on the HR ranges. Often, the estimated fundamental frequency ( ) determines the estimated heart rate. Hence, the constraints on HR imply corresponding constraints on the spectral shape. So, records can be excluded under the following conditions

3) SNR THRESHOLDING
Traditionally, the signal-to-noise ratio (SNR) represents a common metric for measuring signal quality. Thanks to the semi-periodicity of PPG/ABP signals, most of the signal power is concentrated around the fundamental frequency and its harmonics with a very narrow bandwidth; of about 0.2 Hz.
Where represents spectral power density measured over the cardiac band and Ω=[0.5−8]Hz. The impact of any defective beat is reflected directly on the SNR level. As mentioned before, SNR thresholding is applied on PPG/ABP signals for excluding time intervals over which there is salient distortion. However, a light SNR threshold is followed for preserving undistorted beats from signals that have one or two defected beats only. Originally, the ABP signal cannot be filtered, the whole spectra band Ω=[0 − ] Hz contributes to the noise level except the components around the fundamental and the first two harmonics. The offset DC of the ABP signals will be ignored in computing the noise level because it is necessary for that signal. However, it does not contribute to the pulsating activities which represent the signal of interest. Signals with very low SNRs will be dropped because there is a low probability of extracting good beats from these signals.

4) PROBLEMS IN DETECTING HR
The exact estimation of HR has a critical impact on the overall assessment of signal quality. Wrong HR estimation fires false alarm of HR conflict and leads to underestimation of the SNR of these signals. Consequently, these signals may be excluded and lost. Other than remote (camera-based) signal detection, we assumed that we have signals extracted from contact sensors where the HR is salient enough to be detected without any special processing efforts. Simply, we rely on Fourier spectral estimation for detecting the fundamental frequency (F ) bin as the largest magnitude spectra component in the signal representation and the harmonics are located exactly at an integer multiple of the fundamental frequency. Often, the spectrum exhibits a sparse structure with high power concentration around the fundamental frequency and its harmonics. Unfortunately, under these simple assumptions, we encountered by false alarm of 1490 records with HR out-of-human band, and 2538 records with HR conflicts between the estimated HR from PPG and the corresponding ABP signals.
By inspecting these records, we have encountered other cases that break these naive assumptions: 1) The 1 st or 2 nd harmonic may have larger magnitudes than the fundamental frequency. 2) Fundamental component and the assumed harmonics may be observed out of perfect harmony that is not an exact integer multiple of . 3) Continuous (non-sparse) spectrum that arises from heart rate variability. So, for accounting for these observations, the algorithm starts by detecting the largest spectral bin in the possible range [0.665-3] Hz. Then, the spectral magnitude of possibly frequency bins for harmonic construction is checked for being in harmony or not. By these adaptations, the number of HR conflicts is reduced to 544 records without detecting any HR out-of-human band. Any detected case of HR conflict includes signal distortion either in PPG, ABP, or both. The detected conflict in HR is a sufficient indicator for dropping that record completely.

5) TIME/SPECTRAL SELF-SIMILARITY
As reported in [5,44], there are strong morphological correlations between PPG and corresponding ABP signals in both time and frequency domains. It worthies mentioning that both signals have to be aligned (shifted in phase) before measuring time similarity.
Time similarity is determined as follows, Where m and m are the mean values of the PPG and ABP signals, respectively.
Also, spectral correlation is performed on the magnitude spectra of both signals. Figure 4 shows a joint correlation histogram where most of the signals exhibit high similarity larger than 0.8. Similarity measures enhance cleaning performance in two ways; 1) Excluding Signals with low correlation coefficients, and 2) Re-assessment of signals violating previous metrics (SNR and HR conflict) for saving incorrectly classified signals from exclusion.
So, we assume that if the signal fails in satisfying the SNR threshold while exhibiting extremely high similarities in both time and spectral domains, that signal should not be excluded. That is because it is not highly probable to have the two signals (that are measured from independent sensors) jointly distorted and produce similar pulsation. Moreover, one or two bad beats may degrade the overall SNR of the record. These few beats will be dropped in the next stage. Also, SNR criteria fail in estimating signal quality effectively under heart rate variability. It is worth mentioning that the similarity criterion is not a necessary condition for accepting the signal as a valid signal however, it is a sufficient indication for inspecting it carefully before taking an exclusion decision. After signal level cleaning, the number of records is reduced to 225831 records belonging to 9867 subjects. VOLUME XX, 2022 (e) Low SNR signal (snr<1) in continous (non-sparse spectra), with high similarity in both time and spectra.
(i) Low SNR, HR variability, with high time/spectral similarity (>0.59). Per-beat cleaning is more effective than signal level cleaning because only defective beats will be dropped out while good beats can be preserved from the same signal. The PPG/ABP signals will be segmented into beats where each ABP beat represents the label for the corresponding PPG beat. Then, some cleaning metrics will be applied for excluding defective beats.

1) PPG/ABP SEGMENTATION
Segmentation is an effective task in the cleaning stage because improperly segmented beats will be misclassified as a bad beat. There are many efforts in the PPG beat segmentation area for providing accurate segmentation in presence of artifacts and distortion [45][46][47]. However, in this work, we follow the simple algorithm described in [48] for determining beats limits as local minima points.
First, PPG/ABP signals are aligned (as already explained in the pre-processing stage) for preserving accurate beat correspondence. Then, beat marks are estimated for one signal (PPG) then determining the beat limits for the other signal (ABP) by simple fine adaptation around the previously determined marks. Figure 7 demonstrates the alignment, beat marking, and beat segmentation steps.
Segmentation failure may occur due to beat artifacts, beat class, or algorithm weakness as shown in Fig.8 where improper segmentation leads to strange PPG beats as in Fig.8.b. According to the observation study [49], the PPG waveform is classified according to the amplitude and the position of the diacritic notch. Among these classes, vasodilatation case exhibits low or negative notch, hence, this class usually experiences poor segmentation. Anyway, the performance of the segmentation algorithm is out of the scope of our paper. Our main focus is to exclude badly segmented beats in the following stages irrespective of the error source.

2) SUCCESSIVE BEAT SIMILARITY
Regular PPG/ABP signals exhibit semi-regular pulsation with minimal variation between successive beats. Abrupt morphological change in successive beats may indicate sensor movement or unstable connection to the body. Hence, it has to be excluded. Usually, the first and last beats are dropped because dividing the signal into a fixed length of 1024 samples often induces incomplete beats. Then, beats exhibiting low similarity with others in the same section will be dropped.

3) PPG/ABP BEAT SIMILARITY
As reported [5,50], there is a high coherence between PPG and ABP beats. Based on this coherence, deep learning models [4,51]are induced for learning PPG/APB signal translation. Then, systolic (SysBP) and diastolic (DiaBP) can be estimated from the translated signal for each beat couple (ppg , abp ) as follows Where the systolic is the maximum BP and the diastolic is the minimum in the abp beat. Note; we use PPG/ABP for denoting signals (1024 samples), while ppg/abp stands for beats resized into 120 samples long.
Hence, a very low correlation between corresponding beats of the PPG and ABP signals indicates bad beats that should be excluded.
After the beat cleaning stage, the number of reserved records is reduced to 212707 records belonging to 9101 subjects. Also, the number of segmented beats is reduced from 1949492 beats to1774669 beats.

 Time Normalization
Beat length varies from one subject to another. Also, it may vary for the same subject. Hence, segmented beats have different lengths that can't be fed into a fixed-length training model. Also, we need to embed the beat interval as an essential feature that cannot be neglected. So, each beat is allowed to have a different length in the cardiac range (0.33 -1.5 sec). Time normalization can be performed by unifying the beat length to 120 sample/beat that corresponds to the maximum possible beat interval (1.5 sec). Consequently, the beat intervals are included as an extra feature so the length of the input data for each beat that is used for training, validation, and testing is 121 samples.

 Amplitude Normalization
Only the segmented PPG beats can be normalized to the amplitude [0-1] range.
While the ABP beats are kept without any modifications.

C. PCA-based Fine Cleaning
To this end, we have PPG/ABP segmented beats dataset. Many metrics are imposed for excluding abnormal beats. It is supposed that these beats have an accepted level of similarity between, PPG and ABP beats, and also between the PPG beats from the same record. However, there is no guarantee that all these beats are valid and belong to the same natural generating phenomena. That dataset will be employed as a training set for deep-learning models. So, the BP predicting performance relies mainly on the quality of the training dataset. Hence, more cleaned data with reduced anomaly percentage leads to better-trained models. In the first part of the work, we have applied a combination of metrics for excluding bad beats/signals. Now, the remaining set will be employed for cleaning itself.
Principal component analysis (PCA) [52] can be used for representing high dimensional data into smaller set orthogonal components. Often, the first and second components convey about 70% of data variability/variance, whereas the first component has a higher contribution to the signal representation than the second component. Based on this point, simple outlier detection can be performed through a biplot of these components as in [53]. Figure 9 shows the first two PCA components for both PPG/ABP sets. Figure 10 demonstrates the biplot of the first and second PCA components for PPG and ABP sets. By inspecting that biplot, we note that almost all the data is concentrated in certain distribution that should represent good beats. It seems an unsupervised classification strategy. This step excludes about 6% of the segmented beats. An example of the excluded PPG/ABP beats is shown in Fig.11. Some of the excluded beats exhibit systolic lowers than diastolic BP as in Fig. 11.

D. Real-time Quality measure
The impact of the PPG/ABP cleaned dataset is not limited to feeding the training models for BP learning from corresponding PPG. That cleaned set can be employed for assessing any PPG signal/beat quality. Hence, any PPG signal (extracted from contact PPG or remotely sensed from a camera) can be validated as an artifact-free signal/beat for clinical diagnosis. The subspace spanned by the first PCA components can be employed for measuring beat quality. Normal beat shapes belong to that subspace. The distance between the beat and the subspace represents how far that beat is from the normal beat shape. So, it can be applied to exclude bad beats and bypassing wrong BP measurements.

V. Cleaning Evaluation
The cleaning efficiency represents the percentage of the normal beats to the whole number of beats in the dataset. However, it cannot be measured directly. But, it can be evaluated by measuring its impact on the accuracy of the deep-learning-based BP estimation models. Similar to [54], the long short-term memory (LSTM) model [55] is employed for training our dataset. However, in [54] the training is performed on extracted features from the PPG time domain and PCA features. On the other hand, we are carrying training on the PPG data directly. As mentioned before, all segmented beats are resized into 120 sample lengths while the beat interval is embedded in sample #121 in the input data. The model will be trained for systolic prediction from segmented PPG beats. The LSTM model is trained independently by the extracted/segmented PPG beats datasets in three different stages: 1) All segmented beats before cleaning.
2) After signal and beat cleaning stages (coarse cleaning). 3) After PCA fine cleaning (final stage). Table I summarizes the standard deviations and mean errors encountered in the systolic BP prediction of segmented beats for three cleaning states of the dataset. Based on these results, it can be shown that the proposed cleaning technique enhances the standard deviation of the prediction error of systolic and diastolic blood pressure by 11.68 %, 10.81 %, respectively. Also, it enhances the mean absolute error of the prediction of systolic and diastolic blood pressure by 14.79 %, 11.70 %, respectively. Figure 12 demonstrates the performance enhancement in terms of the Bland-Altman plot and correlation plot. As it is shown in Fig. 12c, the two-levels cleaning leads to more correlation between the predicted BP and the ground truth values. Also, the error in the standard range achieved by the proposed cleaning technique is lower than that achieved by uncleaned data. In addition, the error achieved by the proposed cleaning technique is less spreading compared to that of the uncleaned data. Moreover, to achieve a standard deviation of 2, the range of error achieved by the proposed cleaning technique is -41~39 while using uncleaned data achieved error range -45~46. From these results, it can be demonstrated that uncleaned data can make an illusion for the deep learning network even with using a huge data set. On the other hand, using a less number of samples in the datasets can lead to better learning for the deep learning networks if properly cleaned.

VI. Data Availability
Our cleaned and pre-processed data are available at: https://cibpm.com/

VII. Conclusion
This paper introduces a joint PPG-ABP cleaning strategy. The key idea resides in making use of the fact that both signals are arising from the same cardiac source. Hence, time/spectral similarity validates the signal as a normal signal and allows simple exclusion of defective signals/beats. The cleaning is performed on two levels; signal level and beat level. Signal level cleaning alone is not enough. One or two defected beats degrade the signal-to-noise ratio of the whole signal. So, in the beat level cleaning, bad beats are dropped only while good beats are preserved. There is no unique metric that can identify anomaly signals/beats. A combination of successive metrics is applied for coarse cleaning. Fine cleaning is performed based on the data itself on beat-level. It is supposed that a coarse cleaned dataset has a small percentage of anomalies while the major part of the dataset is assumed valid data that forms the PCA representation. Anomaly detection is adapted as unsupervised classification based on the biplot of the first two PCA components. Cleaning evaluation is performed by noting the