Skip to content

Instantly share code, notes, and snippets.

@suhaskv
Created December 23, 2020 11:39
Show Gist options
  • Save suhaskv/1d61011bbfaf8cffebaed9aa73e0d1ba to your computer and use it in GitHub Desktop.
Save suhaskv/1d61011bbfaf8cffebaed9aa73e0d1ba to your computer and use it in GitHub Desktop.
VSB Power Line Blog - Plot the raw signal for a measurement id
sig_list = metadata_train.head(6).values
plt.figure(figsize=(25,10))
n_rows = 2
n_cols = 1
for ind, val in enumerate(sig_list):
plt.subplot(n_rows, n_cols, (ind//3)+1)
plt.plot(train[str(val[0])], label=f"signal_id-{val[0]}, phase-{val[2]}, id_measurement-{val[1]}")
plt.legend()
plt.title(f'Power Line Signal with target={val[3]}')
plt.xlabel('Samples')
plt.ylabel('Amplitude')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment