Skip to main content
. 2019 Feb 18;19(4):840. doi: 10.3390/s19040840
Algorithm 1. adaptive stride-length estimation based on LSTM-DAE
1 Input: training data with actual stride-length T={ti,i=1,2,,n}, test data without actual stride-length
2 Output: stride-length estimation of pedestrian
3 // Data preprocessing
4 Split the inertial sensor data according to the stride event.
5 For each stride do
6    Extract sensor data and corresponding ground truth to generate the training data and labels
7    Extract high-level feature
8    Infinity-pad or intercept the sensor samples of per stride to a fixed length
9    Construct Stride data as shown in Figure 5
10 End for
11 // Model training
12 build and train the pure LSTM model
13 build the DAE model and initialize the weights of LSTM layers by the pure LSTM model, set the LSTM layers to be untrainable and train DAE model
14 build the final regression model and initialize the weights of layers before Decoder, set all layers to be trainable and train to fine-tune
15 //Testing
16 Leverage trained model to predict stride-length of pedestrian