Skip to main content
. 2023 Jul 24;10:1160373. doi: 10.3389/fmed.2023.1160373

Table 1.

Fetal movement recognition algorithm.

Algorithm
Input: Pre-recognition signal Xi, i = 1, 2, …, 6.
Feature dictionary Dk, k = 1,2.
Sparsity coefficient T0.
Output: Recognition category Yi, i = 1, 2, …, 6.
Initialize the parameters.
for i = 1:6
for k = 1:2
while t < T0
Iteration number t = 1, reconstructed residual r0 = Xi, set Λ0 = Ø, D=Dk.
Find the index λt where the reconstructed residual rt-1 matches the feature dictionary D, i.e., λt=argmaxjΛt1|rt1,dj| .
Update the set of indexes Λt = Λt-1∪λt, reconstructing the dictionary Dt = [Dt-1, dλt].
Compute using least squares to obtain x^t=argminx^^yDx^22 .
Update the reconstructed residuals rt=yDtx^t .
t = t + 1.
end while
Cache the sparse residuals ek = rt.
end for
if e1 < e2, identify the signal as fetal Yi = 1,
else, identify the signal as non-fetal Yi = 0.
end for