Skip to main content
. 2016 Jan 19;11(1):e0146672. doi: 10.1371/journal.pone.0146672

Table 3. Pseudo-code of Algorithm 2.

Algorithm 2 Parameter learning for LEAE
Input: The training set {X(i)}i=1m.
Output: the parameter of embedding mapping W, b, c;
Randomly shuffle the training set. Randomly initialized W, b, c
For each epoch
For each batch instances {X(i)}i=1n
  Select the discriminative neighbors set of X(i);
  Calculate the activations for the hidden layer and output layer via a feedforward pass;
  Compute the partial derivatives in regard to the input as Eqs 11, 12 and 13
  Compute: ΔW=n,i,jJWij;Δb=n,iJbi;Δc=n,jJcj
  Update: W=Wα(1nΔW);b=bα(1nΔb);c=cα(1nΔc)
End for
End for