## 4 Results
### Fitting Distribution to the Dataset  
To obtain a representative sample of execution times, we needed diverse inputs. We used the CinC 2017 training and validation sets, so we had 8828 ECG recordings. We constructed a histogram of the execution times with a 0.001 precision that is also presented in Figure 7.  
The histogram shows a Gaussian-like distribution of execution times, but there is also a long-tail end. An interesting fact is that there is also a small bell curve at the beginning of the histogram. In order to explain these phenomena, we have dived into the dataset and analyzed it from different perspectives. We found that the database contains data windows in which some records are missing or contain 0 values. This may happen because  
Figure 6: Weibull PDFs with different network types. Figure 7: Histogram of execution times in AF detection algorithm. of sensor failures or due to connection issues between the sender and the receiver. If too much data is missing, a smaller window section must be dropped. In such cases, the start and end time of the window does not change, but there are fewer records to be processed, so the execution time is shortened. In addition, when the algorithm reaches the end of the measurement data series, shorter data windows can be found, so the algorithm can return results much more quickly. A detailed analysis can be seen in Figure 8. Axis-X displays the execution time in seconds with a precision of 0.001, whereas axis-y shows the number of ECG signal data for which a given execution time was recorded. To enable straightforward comprehension of the phenomenon, we utilized a subset of the entire dataset containing windows with and without AF as well as windows with less valuable records. ECG data in which AF is detected are colored with a yellow-red gradient, whereas ECG data without AF signals are colored with a white-black gradient. The precise color of a point is determined by the number of dropped window components. The size of the points indicates the number of AFs detected in the ECG data. It is observed that both the number of deleted window components and the number of AF signs can have a significant impact on the execution duration. The long-tail feature of the distribution is primarily caused by ECG data containing AFs; therefore, if an ECG window contains an AF, it requires more time to be processed. The execution time is shorter if the ECG signal is shortened due to missing windows, as indicated by the black and red points. The minor bell curve at the start of the histogram is caused primarily by the corrupt data windows. An accurate histogram is the basis of finding the fitting PDF. Initially, the form of the histogram looks like a Gaussian-like PDF, so we wanted to make sure if it is a Gaussian distribution or not. We implemented a component that is now an important part of our framework that uses a selected approximation method to find the best parameters of a given PDF that may fit the shape of the histogram. Here, we used the Gaussian PDF as a basis that is presented in Equation (9). \[\frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^{2}},\:\: \text{where}\:\mu\in\mathbb{R}\:\:\text{and}\:\sigma^{2}\in\mathbb{R}_{>0} \tag{9}\]  
The bell curve is determined by two parameters, \(\mu\) and \(\sigma\). \(\mu\) defines the position of the peak of the curve on the axis-X and must be a real number, and \(\sigma\) controls the width of the curve and must be a positive real number. It is important that the PDFs can have values ranging from 0 to 1. Since our histogram is not in this range, we have to normalize our results first and then assign probability values to the bins. After comparing the effectiveness of global optimization methods, PSO was set as default. Unfortunately, PSO did not find a fitting PDF, but in order to ensure that the algorithm works properly, we proved that the  
Figure 8: Distribution of execution times considering the dropped windows and the detected number of AFs. distribution is not Gaussian by using tests.