Research Article

Stacking-Based Ensemble Learning Method for the Recognition of the Pedestrian Crossing Intention

Table 1

Pseudocode of the stacking algorithm.

Input: training set Strain = {(x1,y1), (x2,y2),…, (xm,ym)};
  Base classifier: L1, L2,LT;
  Meta classifier: L (Bi-LSTM).
Process:
 for t = 1,2, …., T do
  ht=Lt (Strain)% train the base classifier separately using the training set
 end for
N = Ø; % create new datasets
 for i = 1, 2 m do
  for t= 1,2, …, T do
   zit=ht (xi)% use the classifier ht to test the validation set
  end for
  N = N∪{(zi1, zi2,… ziT), yi}
 end for
  h’ = L (N); % training a meta-classifier based on the Bi-LSTM algorithm with the newly combined dataset
Output: H(x) = h (h1 (x), h2 (x)…, hT (x))