| Algorithm 1 Oversampling adjustment algorithm. |
|
Input: Adaptive sampling: , Array of features of each block: , Block size: , Number of blocks: Output: Nonoversampled adaptive sampling: 1: for each AS 2: if the sampling in AS is larger than 3: OS ← 0 //This variable is used to store the amount of oversampling among all blocks 4: NOSI [] ← empty //This variable stores the indices of nonoversampled blocks 5: for counter←1 to TB 6: if 7: 8: 9: //Subtract the excess sampling from oversampled blocks 10: Else 11: NOSI [] ← counter //Add counter to the array NOSI 12: end if 13: end for 14: NOSF ← 0 //This variable stores the total feature values of nonoversampled blocks 15: for counter←1 to count(NOSI) 16: 17 end for 18: for counter ←1 to count(NOSI) 19: 20: end for 21: end if 22: end for 23: |