| Algorithm 1 Generation of optimal ECG lengths and lead combinations based on GA |
|
Input: Feature data of each lead with different segment lengths extracted in Section 2.2.2. Algorithm settings, population size = 100, maximum number of iterations = 20 Output: Optimal combination of ECG leads and segment length |
| 1 G0: number of iterations: i = 0. Initialize the population with the given population size using the proposed encoding strategy. 2 for i = 0, 1, 2, …, 20 do 3 Calculate the fitness of each individual in the population Gi 4 Select the individuals with the top 50 fitness as the parent |
| 5 Generate Gi by the selected parents using crossover and mutation operations |
| 6 i = i + 1 |
| 7 if the maximum fitness in the population remains unchanged for three generations |
| 8 break from step 2 |
| 9 else 10 continue the iteration |
| 11 end |
| 12 Return the individual with the maximum fitness in the iterative process |