Skip to main content
. 2022 Oct 14;22(20):7818. doi: 10.3390/s22207818
Algorithm 1: Bi-GRU- and Bi-LSTM-based Detection Scheme.
  •    1 

    Step 1:

  •    2 

    Input: Benign Consumers BC, Output: Fraudulent Consumers FC

  •    3 

    Step 2: Generating Theft Samples

  •    4 

    T1 = BCrandom(0.1,0.9);

  •    5 

    T2 = BCxt where  (xt=random(0.1,0.9));

  •    6 

    T3 = BCrandom[0,1];

  •    7 

    T4 = mean (BC)random(0.1,1.0);

  •    8 

    T5=Mean(S)  for  each  column;

  •    9 

    T6=S(T)t  revesing  a  time sequence;

  •  10 

    Step 3:  concatenation

  •  11 

    Concat (BC + FC);

  •  12 

    Step 4: Balancing Data

  •  13 

    BC = FC;

  •  14 

    Step 5:

  •  15 

    Sith of majority class having smaller EU Distance with decision boundary is removed;

  •  16 

    Step 6: Data Leakage

  •  17 

    p(s) = Ci  +  Cj;

  •  18 

    Ci  ⊆  p(s);

  •  19 

    Cj  ⊆  p(s);

  •  20 

    Sj1,Sj2,Sj3,,Sjn  ε  Cj;

  •  21 

    Si1,Si2,Si3,,Sin  ε   Ci;

  •  22 

    Si ∉Sj;

  •  23 

    Ci(Si1,,n) ∉  Cj(Sj1,,n);

  •  24 

    Step 7: Feature Engineering

  •  25 

    F1 = Mean of Ps   against  each row;

  •  26 

    F2 = Std of Ps   against  each row;

  •  27 

    F3 = MinCi  against  each row;

  •  28 

    F4 = MaxCj  against each row;

  •  29 

    Output: Honest Consumers εBC, Fraudulent Consumers εFC.