-
-
Save Sanlap1997/4d00646ee612fa3ad4c3f7118a73a665 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pick the feature columns | |
sensor_cols = ['s' + str(i) for i in range(1,22)] | |
sequence_cols = ['setting1', 'setting2', 'setting3', 'cycle_norm'] | |
sequence_cols.extend(sensor_cols) | |
# generator for the sequences | |
seq_gen = (list(gen_sequence(train_df[train_df['id']==id], sequence_length, sequence_cols)) | |
for id in train_df['id'].unique()) | |
# generate sequences and convert to numpy array | |
seq_array = np.concatenate(list(seq_gen)).astype(np.float32) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment