Skip to main content
. 2022 May 30;22(11):4156. doi: 10.3390/s22114156
Algorithm 1: The overlap algorithm to generate training samples.
Input: Given one long signal Sig witha length of l, whose fault type is F; the training sample’s number N; and the training sample’s length w.
Output: N training samples {xi,yi}.
1. calculating the overlap step k=lwN1; defined each sample’s starting index s=0 and ending index e=w; defined Input and Label matrix to save training features xi and corresponding fault type yi.
2. For i in 1 to l:{
3.  Inputi=Sigs:e
4.  Labeli=F
5.  s=s+k
6.  e=s+w}
7. End for
8. Return Input and Label