Algorithm 1. adaptive stride-length estimation based on LSTM-DAE
|
1 |
Input: training data with actual stride-length , 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 |