generate_lstm_model
Generate LSTM model
This module implements functions to generate a LSTM model for trajectory classification.
- generate_lstm_model.generate_lstm_model(sim_df, parms)
Prepares the dataset, defines the neural network, trains and evaluates the model. Best model is automatically saved.
- Parameters:
sim_df (pd.DataFrame) – Dataframe containing the simulated tracks for the training.
parms (dict) – Stored parameters containing global variables and instructions.
- generate_lstm_model.plot_accuracy_over_window(path, booleans, window_size)
Plots a bar graph of the accuracy gradient over the tracks.
- Parameters:
path (str) – Output path.
booleans (np.array) – Array of true and false based on ‘predicted_states_test == true_states_test’.
window_size (int) – Used window size.
- generate_lstm_model.plot_training_curves(path, history, patience)
Plots loss and accuracy training curves.
- Parameters:
path (str) – Output path.
history (History keras object) – History of the training to be plotted.
patience (int) – Value of the EarlyStopping criterion used here to trim the axis.