Skip to main content
. 2021 Oct 25;21(21):7053. doi: 10.3390/s21217053
Algorithm 1: Learning the best threshold level in the first learning hierarchy level.
1. Input:
  Initialize time step (n), α, γ,Thl, Thold, Threshold, and QTh matrices.
  Make Thc matrix as the accurate threshold matrix based on the transition states.
2. While not converged, do
 1. Generate two binary random values as zn and zm
 2. Determine the accurate threshold, Th, based on Thc
 3. With probability ɛ, randomly choose a value for the threshold from (2Thl−1) levels.
 4. Otherwise, Thnew=argmaxj∈ (2Thl−1) (Qth(Thold,j))
 5. If Th=Thnew
   RTh(n)=
   NTh−the number of nonzero elements of (Threshold−Thc)
 6. else
   RTh(n)=0
 7.  End
 8. Update the QTh matrix
   QTh(zn,zm,Thold,Thnew)=(1−α)QTh(zn,zm,Thold,Thnew)+α (RTh+γ(max (QTh(zn,zm,Thold,Thnew)))) 
 9. Threshold(zn,zm,Thold)=Thnew
 10. Increase the time step n by 1
3. End while