Skip to main content
. 2018 Feb 26;18(3):693. doi: 10.3390/s18030693
Algorithm 1 Adaptive Weight DBN Based HSI Anomaly Detection
  • Input: 

    X HSI image dataset

    NX the number of pixels in X

    Nn the number of selected neighboring pixels

  • Output: 

    δ Detection results that anomaly score

   1: function Anomaly Detection(X)
   2:  MDBN ← Training via gradient descent with X
   3:  (C, R) ← EncodeDecode(MDBN,X)
   4:  for j = 1 to NX do
   5:    cn ← from C following Section 3.3
   6:    rn ← from R following Section 3.3
   7:    for i=1 to Nn do
   8:      wtn[i] ← Equation (9) and Equation (10) with rn
   9:      ii+1
 10:    end for
 11:    δ[j] ← Equation (7) by using wtn and cn
 12:    jj+1
 13:  end for
 14:  return δ
 15: end function
 16:
 17: function EncodeDecode(MDBN,X)
 18:  Initialize the auto_encode from MDBN
 19:  for j = 1 to NX do
 20:    x ← one pixel from X
 21:    Encode x with auto_encode
 22:    C[j] ← output of middle layer of auto_encode
 23:    Y^[j] ← decode C[j] with auto_encode
 24:    R[j] ← Equation (5) with h[j] and x
 25:    jj+1
 26:  end for
 27:  return R and C
 28: end function