# Investigating Feature Selection and Random Forests for Inter-Patient Heartbeat Classification
## 4 Discussion  
In this work, the application of RF for recognizing heartbeats using selected time-domain features extracted from the single-lead ECG signal was investigated following the AAMI guidelines and the inter-patient paradigm. This probably represents the first known attempt to study the performance of RF for heartbeat classification following the AAMI guidelines and the inter-patient paradigm. In the present investigation, a total of 85 features were explored. We implemented all the features used by [PERSON] et al. (2018), which is one of the most recent relevant works, and additional morphological features proposed or based on the works of [PERSON] et al. (2019) and [PERSON] et al. (2018). Unlike the feature normalization done by [PERSON] et al. (2018) where normalization is done by dividing values by the patient average (whole record average), in this work, normalization was performed mainly by dividing values by the average of the most recent beats which is an approach that can be more realistically implemented in real-time wearable monitors and screening devices. In order to consider more information about the instantaneous heart rate variation, additional normalizations for R-R intervals were included. In the case of the previous and next R-R interval (\(RR_{-1}\) and \(RR_{+1}\)), the additional normalization consisted of dividing them by the current R-R interval (\(RR_{0}\)). This was introduced in an attempt to include the timing relationship between successive R waves as considered in the rules proposed by [PERSON] et al. (2018). In the case of the current R-R interval, the additional normalization was the t-statistic (\(tRR_{0}\)) which was introduced in order to include a measure of the number of standard deviations a given interval is from the average. Since most of these new normalizations appeared in the top ten most informative features (see Table 2), our results suggest that those newly introduced normalizations for R-R intervals give more information and are more discriminative for heartbeat classification than values of the R-R intervals alone. Features were selected using the filter approach with mutual information ranking proposed by [PERSON] et al. (2018) and only the top ten most informative ones were considered in the experiments. Results showed that as few as six features were enough to obtain the best performance (see Figure 3). This agrees with the findings of [PERSON] et al. (2018) and [PERSON] et al. (2018) which has shown that the number of discriminative features in a set is usually small and that removing the less informative ones can significantly improve the performance of a classifier. In addition to the features based normalized R-R intervals, most of the features among the top ten most informative are relative to the width of the \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \(+P\) & \(Se\) & \(F_{1}\) & \(Acc\) \\ \hline
**NB** & 97.68\% & 98.27\% & 97.97\% & \\
**SVEB** & 68.29\% & 78.55\% & 73.06\% & 96.14\% \\
**VEB** & 94.62\% & 87.36\% & 90.85\% & \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Performance details obtained on the test set DS2. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & & \multicolumn{3}{c}{**Prediction**} \\  & & **NB** & **SVEB** & **VEB** \\ \hline \multirow{4}{*}{Label} & **NB** & 43,494 & 655 & 67 \\  & **SVEB** & 369 & 1443 & 25 \\  & **VEB** & 383 & 13 & 2814 \\  & **FB** & 277 & 0 & 65 \\  & **QB** & 4 & 2 & 3 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Confusion matrix of obtained on the test set DS2. QRS complex peak wave measured at fixed proportions of the peak amplitude. This suggests that those features are probably a more reliable descriptor of QRS morphology than other features based on fiducial points defined by low amplitude changes which can be easily masked by the baseline noise.